From d50feaa2ef00fef66851850e19cd102be5790242 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 13 Nov 2020 15:44:43 +0900 Subject: [PATCH] canutils/candump/candump.c: Fix printf format warnings --- canutils/candump/candump.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/canutils/candump/candump.c b/canutils/candump/candump.c index c0f6bd323..3538d4725 100644 --- a/canutils/candump/candump.c +++ b/canutils/candump/candump.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -689,12 +690,12 @@ int main(int argc, char **argv) __u32 frames = dropcnt[i] - last_dropcnt[i]; if (silent != SILENT_ON) - printf("DROPCOUNT: dropped %d CAN frame%s on '%s' socket (total drops %d)\n", - frames, (frames > 1)?"s":"", devname[idx], dropcnt[i]); + printf("DROPCOUNT: dropped %" PRId32 " CAN frame%s on '%s' socket (total drops %" PRId32 ")\n", + (uint32_t)frames, (frames > 1)?"s":"", devname[idx], (uint32_t)dropcnt[i]); if (log) - fprintf(logfile, "DROPCOUNT: dropped %d CAN frame%s on '%s' socket (total drops %d)\n", - frames, (frames > 1)?"s":"", devname[idx], dropcnt[i]); + fprintf(logfile, "DROPCOUNT: dropped %" PRId32 " CAN frame%s on '%s' socket (total drops %" PRId32 ")\n", + (uint32_t)frames, (frames > 1)?"s":"", devname[idx], (uint32_t)dropcnt[i]); last_dropcnt[i] = dropcnt[i]; }