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

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-205-g3f89274)



The branch, master has been updated
       via  3f89274f7493610059a70bd29ac26bbd28bc7958 (commit)
      from  392dd3354812e812f548eadac2c83d8430acd7bf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gattrib/src/s_toplevel.c |    2 +-
 gattrib/src/x_dialog.c   |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)


=================
 Commit Messages
=================

commit 3f89274f7493610059a70bd29ac26bbd28bc7958
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 29 01:26:51 2008 +0100

    gattrib: Fix more non-literal format strings which cause compiler warnings.
    
    We should be careful to avoid passing arbitrary strings into functions
    which take printf style arguments. In that case, always use the construct
    ("%s", string) rather than passing string as the format argument.
    
    Admittedly, some of the cases fixed were fine anyway, as the string passed
    was a known constant. In any case, less noise from the compiler leads to
    easier spotting of real problems.

:100644 100644 716e29b... 31cf91b... M	gattrib/src/s_toplevel.c
:100644 100644 e3f484e... 78ba74e... M	gattrib/src/x_dialog.c

=========
 Changes
=========

commit 3f89274f7493610059a70bd29ac26bbd28bc7958
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Mon Sep 29 01:26:51 2008 +0100

    gattrib: Fix more non-literal format strings which cause compiler warnings.
    
    We should be careful to avoid passing arbitrary strings into functions
    which take printf style arguments. In that case, always use the construct
    ("%s", string) rather than passing string as the format argument.
    
    Admittedly, some of the cases fixed were fine anyway, as the string passed
    was a known constant. In any case, less noise from the compiler leads to
    easier spotting of real problems.

diff --git a/gattrib/src/s_toplevel.c b/gattrib/src/s_toplevel.c
index 716e29b..31cf91b 100644
--- a/gattrib/src/s_toplevel.c
+++ b/gattrib/src/s_toplevel.c
@@ -67,7 +67,7 @@ int s_toplevel_read_page(char *filename)
 
   /* If an error occurred, print message */
   if (err != NULL) {
-    g_warning (err->message);
+    g_warning ("%s", err->message);
     g_error_free (err);
   }
 
diff --git a/gattrib/src/x_dialog.c b/gattrib/src/x_dialog.c
index e3f484e..78ba74e 100644
--- a/gattrib/src/x_dialog.c
+++ b/gattrib/src/x_dialog.c
@@ -176,7 +176,7 @@ void x_dialog_missing_sym()
   dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
                                   GTK_MESSAGE_WARNING,
                                   GTK_BUTTONS_NONE,
-                                  string);
+                                  "%s", string);
 
   gtk_dialog_add_buttons(GTK_DIALOG(dialog), 
                   GTK_STOCK_QUIT, GTK_RESPONSE_REJECT,
@@ -277,7 +277,7 @@ void x_dialog_unimplemented_feature()
   dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
                                   GTK_MESSAGE_INFO,
                                   GTK_BUTTONS_OK,
-                                  string);
+                                  "%s", string);
 
   gtk_window_set_title(GTK_WINDOW(dialog), "Unimplemented feature!");
 
@@ -302,7 +302,7 @@ void x_dialog_fatal_error(gchar *string, gint return_code)
   dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
                                   GTK_MESSAGE_ERROR,
                                   GTK_BUTTONS_OK,
-                                  string);
+                                  "%s", string);
 
   gtk_window_set_title(GTK_WINDOW(dialog), "Fatal error");
 




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs