Skip to content

Commit

Permalink
Fix the warnings when building the UNIX rundriver
Browse files Browse the repository at this point in the history
This explicitly casts `__LINE__` as `size_t` so that the `printf(3)`
format does not complain about arguments.
  • Loading branch information
lhchavez committed Jul 12, 2020
1 parent 31a0ec1 commit 4c558bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define LABEL_FORMAT "[%@(maxNameLength)s] "

#define print_error(fmt, ...) fprintf(stderr, LABEL_FORMAT " (%s:%" PRIuS ") " fmt ": %s\n", \
"ERROR", __FILE__, __LINE__, ##__VA_ARGS__, strerror(errno))
"ERROR", __FILE__, (size_t)__LINE__, ##__VA_ARGS__, strerror(errno))

static const char* interfaces[] = {
@idl.allInterfaces.map('"' + _.name + '"').mkString(", ")
Expand Down

0 comments on commit 4c558bb

Please sign in to comment.