diff --git a/logger.c b/logger.c index 5420c27..17ccf9a 100644 --- a/logger.c +++ b/logger.c @@ -100,6 +100,7 @@ static inline int log_write_raw(int target, const char *text) /* We should never get here. */ assert(0); } + return 0; } @@ -187,8 +188,9 @@ static inline void put_timestamp(int level) { if(l_targets[l_levels[level].target].flags & LOG_TIMESTAMP) { - char buf[16]; - snprintf(buf, sizeof(buf)-1, "[%d] ", SDL_GetTicks() - start_time); + char buf[24]; + snprintf(buf, sizeof(buf)-1, "[%llu] ", + (unsigned long long)(SDL_GetTicks() - start_time)); log_write_raw(l_levels[level].target, buf); } }