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 565904 - gnumeric 1.9.3 does not build with CFLAGS="-Werror=format-security"
gnumeric 1.9.3 does not build with CFLAGS="-Werror=format-security"
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
1.9.x
Other All
: Normal normal
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2008-12-29 05:47 UTC by Funda Wang
Modified: 2008-12-29 15:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Funda Wang 2008-12-29 05:47:54 UTC
I'm currently building gnumeric 1.9.3 in Mandriva cooker, and its default CFLAGS is:
-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4

Please note that "-Werror=format-security" option[1], which will make following usage of function impossible:
	g_warning (msg);

Instead, you must use
	g_warning ("%s", msg);


For the record, I've put the patch here:
http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gnumeric/current/SOURCES/gnumeric-1.9.3-fix-str-fmt.patch

[1] http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments
Comment 1 Funda Wang 2008-12-29 05:50:51 UTC

*** This bug has been marked as a duplicate of 559291 ***
Comment 2 Morten Welinder 2008-12-29 15:03:28 UTC
We might still have issues in lpsolve.c
Comment 3 Morten Welinder 2008-12-29 15:17:37 UTC
Fixed.  And -Werror=format-security added.