coredump: fix format string on 32 bits

In file included from ./src/basic/macro.h:415:0,
                 from ./src/shared/acl-util.h:28,
                 from src/coredump/coredump.c:36:
src/coredump/coredump.c: In function ‘submit_coredump’:
src/coredump/coredump.c:711:26: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 7 has type ‘uint64_t {aka long long unsigned int}’ [-Wformat=]
                 log_info("The core will not be stored: size %zu is greater than %zu (the configured maximum)",
                          ^
./src/basic/log.h:175:82: note: in definition of macro ‘log_full_errno’
                         ? log_internal(_level, _e, __FILE__, __LINE__, __func__, __VA_ARGS__) \
                                                                                  ^~~~~~~~~~~
./src/basic/log.h:183:28: note: in expansion of macro ‘log_full’
 #define log_info(...)      log_full(LOG_INFO,    __VA_ARGS__)
                            ^~~~~~~~
src/coredump/coredump.c:711:17: note: in expansion of macro ‘log_info’
                 log_info("The core will not be stored: size %zu is greater than %zu (the configured maximum)",
                 ^~~~~~~~
src/coredump/coredump.c:711:26: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 8 has type ‘uint64_t {aka long long unsigned int}’ [-Wformat=]
                 log_info("The core will not be stored: size %zu is greater than %zu (the configured maximum)",
                          ^
./src/basic/log.h:175:82: note: in definition of macro ‘log_full_errno’
                         ? log_internal(_level, _e, __FILE__, __LINE__, __func__, __VA_ARGS__) \
                                                                                  ^~~~~~~~~~~
./src/basic/log.h:183:28: note: in expansion of macro ‘log_full’
 #define log_info(...)      log_full(LOG_INFO,    __VA_ARGS__)
                            ^~~~~~~~
src/coredump/coredump.c:711:17: note: in expansion of macro ‘log_info’
                 log_info("The core will not be stored: size %zu is greater than %zu (the configured maximum)",
                 ^~~~~~~~
src/coredump/coredump.c:741:27: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 7 has type ‘uint64_t {aka long long unsigned int}’ [-Wformat=]
                 log_debug("Not generating stack trace: core size %zu is greater than %zu (the configured maximum)",
                           ^
./src/basic/log.h:175:82: note: in definition of macro ‘log_full_errno’
                         ? log_internal(_level, _e, __FILE__, __LINE__, __func__, __VA_ARGS__) \
                                                                                  ^~~~~~~~~~~
./src/basic/log.h:182:28: note: in expansion of macro ‘log_full’
 #define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
                            ^~~~~~~~
src/coredump/coredump.c:741:17: note: in expansion of macro ‘log_debug’
                 log_debug("Not generating stack trace: core size %zu is greater than %zu (the configured maximum)",
                 ^~~~~~~~~
src/coredump/coredump.c:741:27: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 8 has type ‘uint64_t {aka long long unsigned int}’ [-Wformat=]
                 log_debug("Not generating stack trace: core size %zu is greater than %zu (the configured maximum)",
                           ^
./src/basic/log.h:175:82: note: in definition of macro ‘log_full_errno’
                         ? log_internal(_level, _e, __FILE__, __LINE__, __func__, __VA_ARGS__) \
                                                                                  ^~~~~~~~~~~
./src/basic/log.h:182:28: note: in expansion of macro ‘log_full’
 #define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
                            ^~~~~~~~
src/coredump/coredump.c:741:17: note: in expansion of macro ‘log_debug’
                 log_debug("Not generating stack trace: core size %zu is greater than %zu (the configured maximum)",
                 ^~~~~~~~~
src/coredump/coredump.c:768:34: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 7 has type ‘uint64_t {aka long long unsigned int}’ [-Wformat=]
                         log_info("The core will not be stored: size %zu is greater than %zu (the configured maximum)",
                                  ^
./src/basic/log.h:175:82: note: in definition of macro ‘log_full_errno’
                         ? log_internal(_level, _e, __FILE__, __LINE__, __func__, __VA_ARGS__) \
                                                                                  ^~~~~~~~~~~
./src/basic/log.h:183:28: note: in expansion of macro ‘log_full’
 #define log_info(...)      log_full(LOG_INFO,    __VA_ARGS__)
                            ^~~~~~~~
src/coredump/coredump.c:768:25: note: in expansion of macro ‘log_info’
                         log_info("The core will not be stored: size %zu is greater than %zu (the configured maximum)",
                         ^~~~~~~~
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2016-11-07 11:46:38 -05:00
parent f97b34a629
commit 5206a724a0

View file

@ -708,7 +708,7 @@ static int submit_coredump(
coredump_filename = strjoina("COREDUMP_FILENAME=", filename);
IOVEC_SET_STRING(iovec[n_iovec++], coredump_filename);
} else if (arg_storage == COREDUMP_STORAGE_EXTERNAL)
log_info("The core will not be stored: size %zu is greater than %zu (the configured maximum)",
log_info("The core will not be stored: size %"PRIu64" is greater than %"PRIu64" (the configured maximum)",
coredump_size, arg_external_size_max);
/* Vacuum again, but exclude the coredump we just created */
@ -738,7 +738,7 @@ static int submit_coredump(
else
log_warning_errno(r, "Failed to generate stack trace: %m");
} else
log_debug("Not generating stack trace: core size %zu is greater than %zu (the configured maximum)",
log_debug("Not generating stack trace: core size %"PRIu64" is greater than %"PRIu64" (the configured maximum)",
coredump_size, arg_process_size_max);
if (!core_message)
@ -765,7 +765,7 @@ log:
} else
log_warning_errno(r, "Failed to attach the core to the journal entry: %m");
} else
log_info("The core will not be stored: size %zu is greater than %zu (the configured maximum)",
log_info("The core will not be stored: size %"PRIu64" is greater than %"PRIu64" (the configured maximum)",
coredump_size, arg_journal_size_max);
}