From 465bf0b889b8718318b636763464d0dd78c088c8 Mon Sep 17 00:00:00 2001 From: Arulanbu Balusamy Date: Sat, 8 Jul 2023 23:13:36 +0530 Subject: [PATCH] event.c: format specifier modify in printf statement The variable declares in long long int but exist format specifier is unsigned long int. So modify the format specifier by declaring local variable. Signed-off-by: Arulanbu Balusamy --- event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/event.c +++ b/event.c @@ -929,7 +929,7 @@ #endif if (args->time || args->reltime || args->ctime) { - unsigned long long usecs, previous; + unsigned long long usecs, previous, tvusec; previous = 1000000ULL * args->ts.tv_sec + args->ts.tv_usec; gettimeofday(&args->ts, NULL); @@ -949,7 +949,8 @@ memset(buf, 0, 255); strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", tm); - printf("[%s.%06lu]: ", buf, args->ts.tv_usec); + tvusec=args->ts.tv_usec; + printf("[%s.%06llu]: ", buf, tvusec); } else { printf("%llu.%06llu: ", usecs/1000000, usecs % 1000000); }