diff --git a/lib/nodes/influxdb.c b/lib/nodes/influxdb.c index 01427c90d..da1461655 100644 --- a/lib/nodes/influxdb.c +++ b/lib/nodes/influxdb.c @@ -21,6 +21,7 @@ *********************************************************************************/ #include +#include #include "node.h" #include "plugin.h" @@ -159,7 +160,7 @@ int influxdb_write(struct node *n, struct sample *smps[], unsigned cnt) switch (sample_get_data_format(smps[k], j)) { case SAMPLE_DATA_FORMAT_FLOAT: strcatf(&buf, "%f", smps[k]->data[j].f); break; - case SAMPLE_DATA_FORMAT_INT: strcatf(&buf, "%ld", smps[k]->data[j].i); break; + case SAMPLE_DATA_FORMAT_INT: strcatf(&buf, "%" PRIi64, smps[k]->data[j].i); break; } } diff --git a/lib/nodes/test_rtt.c b/lib/nodes/test_rtt.c index 84e1e77d9..e3747cb62 100644 --- a/lib/nodes/test_rtt.c +++ b/lib/nodes/test_rtt.c @@ -319,7 +319,7 @@ int test_rtt_read(struct node *n, struct sample *smps[], unsigned cnt) /* Wait */ steps = task_wait(&t->task); if (steps > 1) - warn("Skipped %zu steps", steps - 1); + warn("Skipped %ld steps", (long) (steps - 1)); struct timespec now = time_now(); diff --git a/lib/task.c b/lib/task.c index 9b05e5da6..0013bed10 100644 --- a/lib/task.c +++ b/lib/task.c @@ -95,7 +95,7 @@ int task_set_rate(struct task *t, double rate) next = time_add(&now, &t->period); - return time_set_next(t, &next); + return task_set_next(t, &next); #elif PERIODIC_TASK_IMPL == TIMERFD int ret; struct itimerspec its = { @@ -158,8 +158,6 @@ uint64_t task_wait(struct task *t) if (ret < 0) return 0; - struct timespec now; - ret = clock_gettime(t->clock, &now); if (ret) return 0;