[planner] Don't pass strings to be printed in format string parameter.
- From: Maurice van der Pot <mvdpot src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [planner] Don't pass strings to be printed in format string parameter.
- Date: Sat, 24 Oct 2009 09:43:03 +0000 (UTC)
commit e1c5e8b8d14575d0b0152b2effc1b790538eb1b5
Author: Patric Theune <patric theune gmail com>
Date: Fri Oct 23 23:49:18 2009 +0200
Don't pass strings to be printed in format string parameter.
libplanner/mrp-storage-module-factory.c | 4 ++--
libplanner/mrp-task.c | 2 ++
src/planner-window.c | 4 ++++
3 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/libplanner/mrp-storage-module-factory.c b/libplanner/mrp-storage-module-factory.c
index c12521d..e1e8628 100644
--- a/libplanner/mrp-storage-module-factory.c
+++ b/libplanner/mrp-storage-module-factory.c
@@ -90,7 +90,7 @@ storage_module_factory_load (GTypeModule *module)
factory->library = g_module_open (factory->name, 0);
if (!factory->library) {
- g_warning (g_module_error ());
+ g_warning ("%s", g_module_error ());
return FALSE;
}
@@ -98,7 +98,7 @@ storage_module_factory_load (GTypeModule *module)
if (!g_module_symbol (factory->library, "module_init", (gpointer)&factory->init) ||
!g_module_symbol (factory->library, "module_new", (gpointer)&factory->new) ||
!g_module_symbol (factory->library, "module_exit", (gpointer)&factory->exit)) {
- g_warning (g_module_error ());
+ g_warning ("%s", g_module_error ());
g_module_close (factory->library);
return FALSE;
diff --git a/libplanner/mrp-task.c b/libplanner/mrp-task.c
index 92a95b8..c57ed66 100644
--- a/libplanner/mrp-task.c
+++ b/libplanner/mrp-task.c
@@ -1086,6 +1086,7 @@ mrp_task_add_predecessor (MrpTask *task,
g_set_error (error,
MRP_ERROR,
MRP_ERROR_TASK_RELATION_FAILED,
+ "%s",
tmp);
return NULL;
@@ -1104,6 +1105,7 @@ mrp_task_add_predecessor (MrpTask *task,
g_set_error (error,
MRP_ERROR,
MRP_ERROR_TASK_RELATION_FAILED,
+ "%s",
tmp);
return NULL;
diff --git a/src/planner-window.c b/src/planner-window.c
index e178602..21c1863 100644
--- a/src/planner-window.c
+++ b/src/planner-window.c
@@ -1479,6 +1479,7 @@ window_do_save (PlannerWindow *window, gboolean force)
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_YES_NO,
+ "%s",
error->message);
response = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -1495,6 +1496,7 @@ window_do_save (PlannerWindow *window, gboolean force)
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
+ "%s",
error->message);
gtk_dialog_run (GTK_DIALOG (dialog));
@@ -1594,6 +1596,7 @@ window_do_save_as (PlannerWindow *window)
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
+ "%s",
error->message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -1699,6 +1702,7 @@ planner_window_open (PlannerWindow *window,
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
+ "%s",
error->message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]