GNOME Bugzilla – Bug 664151
Fails to build with -Werror=format-security
Last modified: 2011-11-15 22:48:56 UTC
aisleriot fails to build when -Werror=format-security is used (which is the default in the next Ubuntu release): > gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../src/lib -Ilib -DDOC_MODULE=\"aisleriot\" -I./smclient -Ismclient -D_FORTIFY_SOURCE=2 -pthread -DGSEAL_ENABLE -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-3.0 -I/usr/include/launchpad-integration-3.0 -pthread -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -pthread -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gconf/2 -pthread -I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/libpng12 -I/usr/include/pixman-1 -I/usr/include/freetype2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -c -o sol-sol.o `test -f 'sol.c' || echo './'`sol.c >game.c: In function 'game_scm_pre_unwind_handler': >game.c:412:24: error: format not a string literal and no format arguments [-Werror=format-security]
Created attachment 201486 [details] [review] Patch to fix the build failure
Already fixed on master with commit 3e6a3c973992905a25a24102423322f8a4a01977 which I'll backport to gnome-3-2 too (but 3.2.2 is already done).