mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-07 08:13:07 +02:00
Merge branch 'clang-format-nonliteral' into 'master'
Silence clang errors about -Wformat-nonliteral due to missing intermediate attributes See merge request GNOME/glib!1440
This commit is contained in:
commit
89f964e333
@ -201,7 +201,7 @@ trace (const char *format,
|
|||||||
* equivalent function for g_warning because none of the registry errors can
|
* equivalent function for g_warning because none of the registry errors can
|
||||||
* result from programmer error (Microsoft programmers don't count), instead
|
* result from programmer error (Microsoft programmers don't count), instead
|
||||||
* they will mostly occur from people messing with the registry by hand. */
|
* 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,
|
g_message_win32_error (DWORD result_code,
|
||||||
const gchar *format,
|
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. */
|
/* file not found means key value not set, this isn't an error for us. */
|
||||||
if (result != ERROR_FILE_NOT_FOUND)
|
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);
|
path_name, value_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#include <sys/cygwin.h>
|
#include <sys/cygwin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void G_GNUC_PRINTF (1, 2)
|
||||||
set_error (const gchar *format,
|
set_error (const gchar *format,
|
||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
|
@ -396,6 +396,8 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
|
|||||||
# Due to function casts through (void*) we cannot support -Wpedantic:
|
# Due to function casts through (void*) we cannot support -Wpedantic:
|
||||||
# https://wiki.gnome.org/Projects/GLib/CompilerRequirements#Function_pointer_conversions.
|
# https://wiki.gnome.org/Projects/GLib/CompilerRequirements#Function_pointer_conversions.
|
||||||
'-Wno-pedantic',
|
'-Wno-pedantic',
|
||||||
|
# A zero-length format string shouldn't be considered an issue.
|
||||||
|
'-Wno-format-zero-length',
|
||||||
'-Werror=declaration-after-statement',
|
'-Werror=declaration-after-statement',
|
||||||
'-Werror=format=2',
|
'-Werror=format=2',
|
||||||
'-Werror=implicit-function-declaration',
|
'-Werror=implicit-function-declaration',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user