After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769029 - gmessage: compiler complains about -Wformat-nonliteral
gmessage: compiler complains about -Wformat-nonliteral
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-07-21 10:43 UTC by Víctor Manuel Jáquez Leal
Modified: 2016-07-21 11:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
suppress -Wformat-nonliteral warning (1.03 KB, patch)
2016-07-21 10:43 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description Víctor Manuel Jáquez Leal 2016-07-21 10:43:05 UTC
Created attachment 331868 [details] [review]
suppress -Wformat-nonliteral warning

Compiling with clang 3.6.2 against current master, I got this error:

gmessages.c:1446:53: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
      size = _g_vsnprintf (buffer, sizeof (buffer), format, args);
                                                    ^~~~~~
gmessages.c:1451:55: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
      message = message_allocated = g_strdup_vprintf (format, args);
                                                      ^~~~~~

The patch is attached.