mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fixed several format string compiler warnings / errors emitted by Ubuntu's GCC 5.4.0
This commit is contained in:
parent
03012d06b7
commit
c1154faf40
5 changed files with 8 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#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)
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue