diff --git a/lib/hist.c b/lib/hist.c index 349486ab4..46885ec69 100644 --- a/lib/hist.c +++ b/lib/hist.c @@ -182,7 +182,7 @@ void hist_plot(struct hist *h) for (int i = 0; i < bar; i++) buf = strcatf(&buf, "\u2588"); - stats(buf); + stats("%s", buf); free(buf); } diff --git a/lib/hooks/jitter_calc.c b/lib/hooks/jitter_calc.c index f87fcab3a..23ef825ed 100644 --- a/lib/hooks/jitter_calc.c +++ b/lib/hooks/jitter_calc.c @@ -24,6 +24,8 @@ * @{ */ +#include + #include "hook.h" #include "plugin.h" #include "timing.h" @@ -73,7 +75,7 @@ int hook_jitter_ts(struct hook *h, struct sample *smps[], size_t *cnt) */ jitter_val[(curr_count+1)%GPS_NTP_DELAY_WIN_SIZE] = jitter_val[curr_count] + (abs(curr_delay_us) - jitter_val[curr_count])/16; - info("jitter %ld usec, moving average %ld usec, moving variance %ld usec\n", jitter_val[(curr_count+1)%GPS_NTP_DELAY_WIN_SIZE], moving_avg[curr_count], moving_var[curr_count]); + stats("%s: jitter=%" PRId64 " usec, moving average=%" PRId64 " usec, moving variance=%" PRId64 " usec", __FUNCTION__, jitter_val[(curr_count+1)%GPS_NTP_DELAY_WIN_SIZE], moving_avg[curr_count], moving_var[curr_count]); curr_count++; if(curr_count >= GPS_NTP_DELAY_WIN_SIZE) diff --git a/lib/nodes/file.c b/lib/nodes/file.c index ed223a634..0d4d53e4b 100644 --- a/lib/nodes/file.c +++ b/lib/nodes/file.c @@ -22,6 +22,7 @@ #include #include +#include #include "nodes/file.h" #include "utils.h" @@ -335,7 +336,7 @@ retry: values = sample_io_villas_fscan(f->read.handle->file, s, &flags); /* Get if (ex == 0) serror("Failed to wait for timer"); else if (ex != 1) - warn("Overrun: %lu", ex - 1); + warn("Overrun: %" PRIu64, ex - 1); } return 1; diff --git a/lib/nodes/websocket.c b/lib/nodes/websocket.c index 4002aceb5..2b65c6e77 100644 --- a/lib/nodes/websocket.c +++ b/lib/nodes/websocket.c @@ -159,7 +159,7 @@ static void websocket_connection_close(struct websocket_connection *c, struct lw msg = strcatf(&msg, ": status=%u, reason=%s", status, reason); - warn(msg); + warn("%s", msg); free(msg); } diff --git a/src/hook.c b/src/hook.c index a12d36623..78f35121c 100644 --- a/src/hook.c +++ b/src/hook.c @@ -53,7 +53,7 @@ static int hook_parse_cli(struct hook *h, char *params[], int paramlen) /* Concat all params */ str = NULL; for (int i = 0; i < paramlen; i++) - str = strcatf(&str, params[i]); + str = strcatf(&str, "%s", params[i]); config_set_auto_convert(&cfg, 1);