From 552a0a3a284194dc4f9dac3d72259e9d622813e1 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 30 Apr 2024 14:18:03 +0200 Subject: lib: fix `time_t` print without cast The gcc plugin wasn't warning about printing `suseconds_t` (which is `time_t`, but in `struct timeval`.) It needs to be printed with a cast, just like `time_t`. Luckily there is only one such usage. Signed-off-by: David Lamparter --- lib/northbound_oper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/northbound_oper.c') diff --git a/lib/northbound_oper.c b/lib/northbound_oper.c index 7e7190f5a..5f38c970c 100644 --- a/lib/northbound_oper.c +++ b/lib/northbound_oper.c @@ -1556,8 +1556,9 @@ static enum nb_error nb_op_yield(struct nb_op_yield_state *ys) unsigned long min_us = MAX(1, NB_OP_WALK_INTERVAL_US / 50000); struct timeval tv = { .tv_sec = 0, .tv_usec = min_us }; - DEBUGD(&nb_dbg_events, "NB oper-state: yielding %s for %lus (should_batch %d)", - ys->xpath, tv.tv_usec, ys->should_batch); + DEBUGD(&nb_dbg_events, + "NB oper-state: yielding %s for %lldus (should_batch %d)", + ys->xpath, (long long)tv.tv_usec, ys->should_batch); if (ys->should_batch) { /* -- cgit v1.2.3