summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-07-29 15:02:41 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-07-29 16:50:19 +0200
commit769f7602dc5762fe1df3c44a0dd2f2b2fcc39dd8 (patch)
treeb980e56514bd70d0595ee2b26e7d2737105367a6
parentdaa2f2b3933bcefdd48dab21ac2f1c841a3d1f5a (diff)
downloadgobject-introspection-769f7602dc5762fe1df3c44a0dd2f2b2fcc39dd8.tar.gz
build: enable -Wsuggest-attribute=format
And use G_GNUC_PRINTF for the suggested function.
-rw-r--r--configure.ac2
-rw-r--r--girepository/girwriter.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 995e26aa..80475973 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,7 +66,7 @@ AX_COMPILER_FLAGS(,, [yes])
AX_APPEND_COMPILE_FLAGS([-Wno-duplicated-branches -Wno-switch-enum])
# FIXME: Fix the warnings and remove the flags
AX_APPEND_COMPILE_FLAGS([-Wno-redundant-decls -Wno-switch-default -Wno-shadow -Wno-deprecated-declarations -Wno-cast-function-type -Wno-type-limits])
-AX_APPEND_COMPILE_FLAGS([-Wno-implicit-fallthrough -Wno-suggest-attribute=format -Wno-sign-compare])
+AX_APPEND_COMPILE_FLAGS([-Wno-implicit-fallthrough -Wno-sign-compare])
WARN_CFLAGS_PYTHON="$WARN_CFLAGS"
AX_APPEND_COMPILE_FLAGS([-Wno-discarded-qualifiers], [WARN_CFLAGS_PYTHON])
diff --git a/girepository/girwriter.c b/girepository/girwriter.c
index 1b61de03..bb82a46f 100644
--- a/girepository/girwriter.c
+++ b/girepository/girwriter.c
@@ -62,6 +62,9 @@ xml_element_free (XmlElement *elem)
}
static void
+xml_printf (Xml *xml, const char *fmt, ...) G_GNUC_PRINTF (2, 3);
+
+static void
xml_printf (Xml *xml, const char *fmt, ...)
{
va_list ap;