diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-04 12:21:20 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-04 12:21:20 +0200 |
commit | 222b90d2f4150db2482a860d9d8c3e8f8aae4cb3 (patch) | |
tree | dcf2e61ce132b31ab59a69dd97eed5bf3004a81d /src/log.c | |
parent | docker: don't run Valgrind tests (diff) | |
download | cimple-222b90d2f4150db2482a860d9d8c3e8f8aae4cb3.tar.gz cimple-222b90d2f4150db2482a860d9d8c3e8f8aae4cb3.zip |
fix a compiler warning
Diffstat (limited to '')
-rw-r--r-- | src/log.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); } |