From 222b90d2f4150db2482a860d9d8c3e8f8aae4cb3 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 4 Jul 2023 12:21:20 +0200 Subject: fix a compiler warning --- src/log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/log.c b/src/log.c index 3886a1a..3acb3cf 100644 --- a/src/log.c +++ b/src/log.c @@ -28,7 +28,8 @@ static inline void log_prefix_timestamp(FILE *dest) buf[0] = '\0'; used += strftime(buf + used, sizeof(buf) - used, "%F %T", &tm); - used += snprintf(buf + used, sizeof(buf) - used, ".%03ld | ", tv.tv_usec / 1000); + long long msec = (long long)tv.tv_usec / 1000; + used += snprintf(buf + used, sizeof(buf) - used, ".%03lld | ", msec); fprintf(dest, "%s", buf); } -- cgit v1.2.3