From ef019b6ecd005f9c89bc3f74fff0aaf11958d070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 23 Jul 2017 16:39:13 +0200 Subject: [PATCH] api: add cast of time_t to long in info "uptime" This fixes a compiler warning on OpenBSD. --- src/plugins/plugin-api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index 370b7fd41..a7fe2c771 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -890,7 +890,7 @@ plugin_api_info_uptime_cb (const void *pointer, void *data, { /* return the number of seconds */ util_get_uptime (&total_seconds, NULL, NULL, NULL, NULL); - snprintf (value, sizeof (value), "%ld", total_seconds); + snprintf (value, sizeof (value), "%ld", (long)total_seconds); return value; }