gtk+ r21642 - in trunk: . gtk gtk/tests modules/other/gail tests



Author: chpe
Date: Mon Oct 13 12:54:45 2008
New Revision: 21642
URL: http://svn.gnome.org/viewvc/gtk+?rev=21642&view=rev

Log:
Bug 555386 â format not a string literal and no format arguments

Modified:
   trunk/ChangeLog
   trunk/gtk/gtkiconfactory.c
   trunk/gtk/gtkprintbackend.c
   trunk/gtk/gtkprintoperation.c
   trunk/gtk/gtkthemes.c
   trunk/gtk/tests/builder.c
   trunk/modules/other/gail/gailtextview.c
   trunk/tests/testmerge.c

Modified: trunk/gtk/gtkiconfactory.c
==============================================================================
--- trunk/gtk/gtkiconfactory.c	(original)
+++ trunk/gtk/gtkiconfactory.c	Mon Oct 13 12:54:45 2008
@@ -2863,7 +2863,7 @@
 		 error_domain,
 		 tmp);
 #else
-    g_warning (tmp);
+    g_warning ("%s", tmp);
 #endif    
     g_free (tmp);
     g_free (stock_id);

Modified: trunk/gtk/gtkprintbackend.c
==============================================================================
--- trunk/gtk/gtkprintbackend.c	(original)
+++ trunk/gtk/gtkprintbackend.c	Mon Oct 13 12:54:45 2008
@@ -119,7 +119,7 @@
   pb_module->library = g_module_open (pb_module->path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
   if (!pb_module->library)
     {
-      g_warning (g_module_error());
+      g_warning ("%s", g_module_error());
       return FALSE;
     }
   
@@ -131,7 +131,7 @@
       !g_module_symbol (pb_module->library, "pb_module_create", 
 			&createp))
     {
-      g_warning (g_module_error());
+      g_warning ("%s", g_module_error());
       g_module_close (pb_module->library);
       
       return FALSE;

Modified: trunk/gtk/gtkprintoperation.c
==============================================================================
--- trunk/gtk/gtkprintoperation.c	(original)
+++ trunk/gtk/gtkprintoperation.c	Mon Oct 13 12:54:45 2008
@@ -1848,10 +1848,10 @@
 				      width, height);
   if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS)
     {
-      g_set_error (&priv->error,
-		   GTK_PRINT_ERROR,
-		   GTK_PRINT_ERROR_GENERAL,
-		   cairo_status_to_string (cairo_surface_status (surface)));
+      g_set_error_literal (&priv->error,
+                           GTK_PRINT_ERROR,
+                           GTK_PRINT_ERROR_GENERAL,
+                           cairo_status_to_string (cairo_surface_status (surface)));
       *do_print = FALSE;
       return GTK_PRINT_OPERATION_RESULT_ERROR;
     }

Modified: trunk/gtk/gtkthemes.c
==============================================================================
--- trunk/gtk/gtkthemes.c	(original)
+++ trunk/gtk/gtkthemes.c	Mon Oct 13 12:54:45 2008
@@ -81,7 +81,7 @@
   g_free(engine_path);
   if (!engine->library)
     {
-      g_warning (g_module_error());
+      g_warning ("%s", g_module_error());
       return FALSE;
     }
   
@@ -93,7 +93,7 @@
       !g_module_symbol (engine->library, "theme_create_rc_style", 
 			(gpointer *)&engine->create_rc_style))
     {
-      g_warning (g_module_error());
+      g_warning ("%s", g_module_error());
       g_module_close (engine->library);
       
       return FALSE;

Modified: trunk/gtk/tests/builder.c
==============================================================================
--- trunk/gtk/tests/builder.c	(original)
+++ trunk/gtk/tests/builder.c	Mon Oct 13 12:54:45 2008
@@ -2293,7 +2293,7 @@
 
   if (!gtk_builder_add_from_file (builder, filename, &error))
     {
-      g_error (error->message);
+      g_error ("%s", error->message);
       g_error_free (error);
       return;
     }

Modified: trunk/modules/other/gail/gailtextview.c
==============================================================================
--- trunk/modules/other/gail/gailtextview.c	(original)
+++ trunk/modules/other/gail/gailtextview.c	Mon Oct 13 12:54:45 2008
@@ -1733,11 +1733,11 @@
 	    gio = g_io_channel_unix_new (fd);
 	    g_io_channel_set_encoding (gio, NULL, &err);
 	    if (!err) g_io_channel_write_chars (gio, (const char *) cbuf, (gssize) len, &written, &err);
-	    else g_message (err->message);
+	    else g_message ("%s", err->message);
 	    if (!err) g_io_channel_seek_position (gio, 0, G_SEEK_SET, &err);
-	    else g_message (err->message);
+	    else g_message ("%s", err->message);
 	    if (!err) g_io_channel_flush (gio, &err);
-	    else g_message (err->message);
+	    else g_message ("%s", err->message);
 	    if (err) {
 		g_message ("<error writing to stream [%s]>", tname);
 		g_error_free (err);

Modified: trunk/tests/testmerge.c
==============================================================================
--- trunk/tests/testmerge.c	(original)
+++ trunk/tests/testmerge.c	Mon Oct 13 12:54:45 2008
@@ -43,7 +43,7 @@
   gchar *dump;
 
   dump = gtk_ui_manager_get_ui (merge);
-  g_message (dump);
+  g_message ("%s", dump);
   g_free (dump);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]