diff options
-rw-r--r-- | src/basic/log.h | 2 | ||||
-rw-r--r-- | src/core/selinux-access.c | 7 | ||||
-rw-r--r-- | src/locale/localed.c | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/basic/log.h b/src/basic/log.h index 72714e02e5..e578258114 100644 --- a/src/basic/log.h +++ b/src/basic/log.h @@ -115,7 +115,7 @@ int log_object_internalv( const char *extra_field, const char *extra, const char *format, - va_list ap) _printf_(9,0); + va_list ap) _printf_(10,0); int log_struct_internal( int level, diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c index 2b96a9551b..0f8a2d68e2 100644 --- a/src/core/selinux-access.c +++ b/src/core/selinux-access.c @@ -135,7 +135,12 @@ _printf_(2, 3) static int log_callback(int type, const char *fmt, ...) { fmt2 = strjoina("selinux: ", fmt); va_start(ap, fmt); - log_internalv(LOG_AUTH | callback_type_to_priority(type), 0, __FILE__, __LINE__, __FUNCTION__, fmt2, ap); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" + log_internalv(LOG_AUTH | callback_type_to_priority(type), + 0, __FILE__, __LINE__, __FUNCTION__, + fmt2, ap); +#pragma GCC diagnostic pop va_end(ap); return 0; diff --git a/src/locale/localed.c b/src/locale/localed.c index 1cb049e74a..b4798d674c 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -436,7 +436,10 @@ static void log_xkb(struct xkb_context *ctx, enum xkb_log_level lvl, const char const char *fmt; fmt = strjoina("libxkbcommon: ", format); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" log_internalv(LOG_DEBUG, 0, __FILE__, __LINE__, __func__, fmt, args); +#pragma GCC diagnostic pop } #define LOAD_SYMBOL(symbol, dl, name) \ |