Fixup for
4b58153dd22172d817055d2a09a0cdf3f4bd9db3.
I saw this because of a clang warning. With gcc the -Wformat-nonliteral warning
doesn't seem to work as expected.
In two places, a string constructed with strjoina is used as the pattern. This
is safe, because we're taking a pattern which was already marked with _printf_
and prepending a known value to it. Those places are marked with #pragma to
silence the warning.
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,
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;
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) \