[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (96de391be052275b6355e8b4778ea0a43a66b53c)
The branch, master has been updated
via 96de391be052275b6355e8b4778ea0a43a66b53c (commit)
via d6b396c4a34bb619c8e91da1e9cd9bd27ff54657 (commit)
from ad325bd9f04707b91490038fc75307a08d61c72c (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
=========
src/hid/gtk/gui-dialog.c | 8 ++++----
src/hid/gtk/gui-top-window.c | 14 +++++++-------
2 files changed, 11 insertions(+), 11 deletions(-)
=================
Commit Messages
=================
commit 96de391be052275b6355e8b4778ea0a43a66b53c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
hid/gtk: Don't pass non-literat format argument to printf style functions.
:100644 100644 32ec48e... 7fcbf6d... M src/hid/gtk/gui-dialog.c
:100644 100644 0734427... 69e1909... M src/hid/gtk/gui-top-window.c
commit d6b396c4a34bb619c8e91da1e9cd9bd27ff54657
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
Pass correct length to strncat
We need to pass "sizeof (string) - 1", due to the NULL pointer.
:100644 100644 b950a25... 0734427... M src/hid/gtk/gui-top-window.c
=========
Changes
=========
commit 96de391be052275b6355e8b4778ea0a43a66b53c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
hid/gtk: Don't pass non-literat format argument to printf style functions.
diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c
index 32ec48e..7fcbf6d 100644
--- a/src/hid/gtk/gui-dialog.c
+++ b/src/hid/gtk/gui-dialog.c
@@ -97,8 +97,7 @@ ghid_dialog_about (void)
| GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
GTK_BUTTONS_OK,
- GetInfoString ()
- );
+ "%s", GetInfoString ());
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -142,7 +141,7 @@ ghid_dialog_message (gchar * message)
GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
- message);
+ "%s", message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -169,7 +168,8 @@ ghid_dialog_confirm (gchar * message, gchar * cancelmsg, gchar * okmsg)
GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_NONE, message);
+ GTK_BUTTONS_NONE,
+ "%s", message);
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
cancelmsg, GTK_RESPONSE_CANCEL,
okmsg, GTK_RESPONSE_OK,
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 0734427..69e1909 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -2509,7 +2509,7 @@ ghid_create_pcb_widgets (void)
ghidgui->bg_pixbuf = gdk_pixbuf_new_from_file(bg_image_file, &err);
if (err)
{
- g_error(err->message);
+ g_error("%s", err->message);
g_error_free(err);
}
ghid_build_pcb_top_window ();
commit d6b396c4a34bb619c8e91da1e9cd9bd27ff54657
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
Pass correct length to strncat
We need to pass "sizeof (string) - 1", due to the NULL pointer.
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index b950a25..0734427 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -3198,17 +3198,17 @@ add_resource_to_menu (char * menu, Resource * node, void * callback, int indent)
}
else if (strncmp (p, "Ctrl", 4) == 0)
{
- strncat (accel, "<control>", sizeof (accel));
+ strncat (accel, "<control>", sizeof (accel) - 1);
p += 4;
}
else if (strncmp (p, "Shift", 5) == 0)
{
- strncat (accel, "<shift>", sizeof (accel));
+ strncat (accel, "<shift>", sizeof (accel) - 1);
p += 5;
}
else if (strncmp (p, "Alt", 3) == 0)
{
- strncat (accel, "<alt>", sizeof (accel));
+ strncat (accel, "<alt>", sizeof (accel) - 1);
p += 3;
}
else
@@ -3239,7 +3239,7 @@ add_resource_to_menu (char * menu, Resource * node, void * callback, int indent)
case KEY:
if (strncmp (p, "Enter", 5) == 0)
{
- strncat (accel, "Return", sizeof (accel));
+ strncat (accel, "Return", sizeof (accel) - 1);
p += 5;
}
else
@@ -3249,13 +3249,13 @@ add_resource_to_menu (char * menu, Resource * node, void * callback, int indent)
{
if ( *p == key_table[j].in)
{
- strncat (accel, key_table[j].out, sizeof (accel));
+ strncat (accel, key_table[j].out, sizeof (accel) - 1);
j = n_key_table;
}
}
if (j == n_key_table)
- strncat (accel, ch, sizeof (accel));
+ strncat (accel, ch, sizeof (accel) - 1);
p++;
}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs