diff --git a/src/log.c b/src/log.c index c58dff8..8ad340e 100644 --- a/src/log.c +++ b/src/log.c @@ -122,8 +122,8 @@ void logit(int severity, int syserr, const char *format, ...) thyme = localtime(&now_sec); // if (!debug) fprintf(stderr, "%s: ", log_name); - fprintf(stderr, "%02d:%02d:%02d.%03ld %s", thyme->tm_hour, - thyme->tm_min, thyme->tm_sec, now.tv_usec / 1000, msg); + fprintf(stderr, "%02d:%02d:%02d.%03d %s", thyme->tm_hour, + thyme->tm_min, thyme->tm_sec, (int)(now.tv_usec / 1000), msg); if (syserr == 0) fprintf(stderr, "\n"); else diff --git a/src/main.c b/src/main.c index 99e8efa..d7fcb14 100644 --- a/src/main.c +++ b/src/main.c @@ -635,7 +635,8 @@ char *scaletime(time_t t) else buf = buf1; - snprintf(p, SCALETIMEBUFLEN, "%2ld:%02ld:%02ld", t / 3600, (t % 3600) / 60, t % 60); + snprintf(p, SCALETIMEBUFLEN, "%2d:%02d:%02d", (int)(t / 3600), + (int)((t % 3600) / 60), (int)(t % 60)); return p; }