Skip to content

Commit

Permalink
Cast 32-bit time_t on FreeBSD i386
Browse files Browse the repository at this point in the history
src/vabackend.c:183:65: error: format specifies type 'long' but the argument has type 'time_t' (aka 'int') [-Werror,-Wformat]
    fprintf(LOG_OUTPUT, "%10ld.%09ld [%d-%d] %s:%4d %24s %s\n", tp.tv_sec, tp.tv_nsec, getpid(), gettid(), filename, line, function, formattedMessage);
                         ~~~~~                                  ^~~~~~~~~
                         %10d
  • Loading branch information
jbeich committed Jul 3, 2023
1 parent fc1afd9 commit 9743084
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vabackend.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ void logger(const char *filename, const char *function, int line, const char *ms
struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp);

fprintf(LOG_OUTPUT, "%10ld.%09ld [%d-%d] %s:%4d %24s %s\n", tp.tv_sec, tp.tv_nsec, getpid(), gettid(), filename, line, function, formattedMessage);
fprintf(LOG_OUTPUT, "%10ld.%09ld [%d-%d] %s:%4d %24s %s\n", (long)tp.tv_sec, tp.tv_nsec, getpid(), gettid(), filename, line, function, formattedMessage);
fflush(LOG_OUTPUT);
}

Expand Down

0 comments on commit 9743084

Please sign in to comment.