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 559291 - warning: format not a string literal and no format arguments
warning: format not a string literal and no format arguments
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Compilation
git master
Other All
: Normal enhancement
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2008-11-04 16:03 UTC by Hib Eris
Modified: 2009-01-11 20:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix no string literal compile warnings (6.05 KB, patch)
2008-11-04 16:04 UTC, Hib Eris
committed Details | Review
Patch for libgoffice (1.31 KB, patch)
2008-11-04 17:43 UTC, Hib Eris
none Details | Review
Patch for libgsf (3.71 KB, patch)
2008-11-04 17:44 UTC, Hib Eris
committed Details | Review

Description Hib Eris 2008-11-04 16:03:42 UTC
If I compile Gnumeric, I get a lot of warnings. The following patch will fix the warnings on 'format not a string literal and no format arguments'.
Comment 1 Hib Eris 2008-11-04 16:04:49 UTC
Created attachment 121963 [details] [review]
Fix no string literal compile warnings
Comment 2 Morten Welinder 2008-11-04 16:47:04 UTC
I don't know how you got those warnings, but could you please do the
same thing for libgsf and goffice?
Comment 3 Morten Welinder 2008-11-04 17:33:40 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 4 Hib Eris 2008-11-04 17:43:31 UTC
Created attachment 121966 [details] [review]
Patch for libgoffice
Comment 5 Hib Eris 2008-11-04 17:44:17 UTC
Created attachment 121967 [details] [review]
Patch for libgsf
Comment 6 Andreas J. Guelzow 2008-11-04 19:56:10 UTC
I am reopening to make sure we do not miss the last two patches.
Comment 7 Morten Welinder 2008-11-05 20:43:35 UTC
libgsf handled.  I used g_error_new_literal a few places.
Comment 8 Morten Welinder 2008-11-08 15:28:04 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 9 Funda Wang 2008-12-29 05:50:51 UTC
*** Bug 565904 has been marked as a duplicate of this bug. ***
Comment 10 Morten Welinder 2009-01-11 20:15:39 UTC
That goffice patch is actually wrong.  Using %s kills the formatting.
Undoing.

Index: goffice/gtk/goffice-gtk.c
===================================================================
--- goffice/gtk/goffice-gtk.c	(revision 2263)
+++ goffice/gtk/goffice-gtk.c	(working copy)
@@ -922,7 +922,7 @@
 			 GTK_DIALOG_DESTROY_WITH_PARENT,
 			 GTK_MESSAGE_WARNING,
 			 GTK_BUTTONS_OK_CANCEL,
-			 msg);
+			 "%s", msg);
 		gtk_dialog_set_default_response (GTK_DIALOG (dialog),
 			overwrite_by_default ? GTK_RESPONSE_OK : GTK_RESPONSE_CANCEL);
 		result = GTK_RESPONSE_OK ==