diff --git a/gio/gregistrysettingsbackend.c b/gio/gregistrysettingsbackend.c index 0afe54b27..b0e295a04 100644 --- a/gio/gregistrysettingsbackend.c +++ b/gio/gregistrysettingsbackend.c @@ -201,7 +201,7 @@ trace (const char *format, * equivalent function for g_warning because none of the registry errors can * result from programmer error (Microsoft programmers don't count), instead * they will mostly occur from people messing with the registry by hand. */ -static void +static void G_GNUC_PRINTF (2, 3) g_message_win32_error (DWORD result_code, const gchar *format, ...) @@ -312,7 +312,7 @@ handle_read_error (LONG result, { /* file not found means key value not set, this isn't an error for us. */ if (result != ERROR_FILE_NOT_FOUND) - g_message_win32_error (result, "Unable to query value %s/%s: %s.\n", + g_message_win32_error (result, "Unable to query value %s/%s", path_name, value_name); } diff --git a/gmodule/gmodule-win32.c b/gmodule/gmodule-win32.c index 5057d256e..fef4d893d 100644 --- a/gmodule/gmodule-win32.c +++ b/gmodule/gmodule-win32.c @@ -39,7 +39,7 @@ #include #endif -static void +static void G_GNUC_PRINTF (1, 2) set_error (const gchar *format, ...) { diff --git a/meson.build b/meson.build index 34d830c21..b13739792 100644 --- a/meson.build +++ b/meson.build @@ -396,6 +396,8 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang' # Due to function casts through (void*) we cannot support -Wpedantic: # https://wiki.gnome.org/Projects/GLib/CompilerRequirements#Function_pointer_conversions. '-Wno-pedantic', + # A zero-length format string shouldn't be considered an issue. + '-Wno-format-zero-length', '-Werror=declaration-after-statement', '-Werror=format=2', '-Werror=implicit-function-declaration',