aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-07-04 12:21:20 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-07-04 12:21:20 +0200
commit222b90d2f4150db2482a860d9d8c3e8f8aae4cb3 (patch)
treedcf2e61ce132b31ab59a69dd97eed5bf3004a81d /src
parentdocker: don't run Valgrind tests (diff)
downloadcimple-222b90d2f4150db2482a860d9d8c3e8f8aae4cb3.tar.gz
cimple-222b90d2f4150db2482a860d9d8c3e8f8aae4cb3.zip
fix a compiler warning
Diffstat (limited to 'src')
-rw-r--r--src/log.c3
1 files changed, 2 insertions, 1 deletions
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);
}