mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-08 18:36:17 +01:00
6cae01c2f5
By default, meson builds glib with -Werror=format=2, which implies -Werror=format-nonliteral. With these flags, clang errors out on e.g. the g_message_win32_error function, due to "format string is not a string literal". This function takes a format string, and passes the va_list of the arguments onwards to g_strdup_vprintf, which is annotated with printf attributes. When passing a string+va_list to another function, GCC doesn't warn with -Wformat-nonliteral. Clang however does warn, unless the functions themselves (g_message_win32_error and set_error) are decorated with similar printf attributes (to force the same checks upon the caller) - see https://clang.llvm.org/docs/AttributeReference.html#format for reference. Adding these attributes revealed one existing mismatched format string (fixed in the preceding commit). |
||
---|---|---|
.. | ||
AUTHORS | ||
COPYING | ||
gmodule-ar.c | ||
gmodule-dl.c | ||
gmodule-win32.c | ||
gmodule.c | ||
gmodule.h | ||
gmodule.rc.in | ||
gmoduleconf.h.in | ||
meson.build |