[libgda] Fix format string warnings
- From: Vivien Malerba <vivien src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgda] Fix format string warnings
- Date: Tue, 25 Aug 2009 17:25:56 +0000 (UTC)
commit 38d14934d10490ac48668f889790e6b078086a6b
Author: Vivien Malerba <malerba gnome-db org>
Date: Tue Aug 25 19:13:31 2009 +0200
Fix format string warnings
Applying patch by Götz Waschk for bug #592952
control-center/main.c | 2 +-
libgda-ui/data-entries/plugins/common-pict.c | 2 +-
libgda-ui/demos/ddl_queries.c | 2 +-
libgda-ui/gdaui-raw-grid.c | 2 +-
libgda/gda-data-model-bdb.c | 2 +-
providers/mysql/gda-mysql-provider.c | 4 ++--
testing/gdaui-test-data-entries.c | 2 +-
tools/browser/support.c | 2 +-
8 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/control-center/main.c b/control-center/main.c
index 555d1f6..086e423 100644
--- a/control-center/main.c
+++ b/control-center/main.c
@@ -65,7 +65,7 @@ show_error (GtkWindow *parent, const gchar *format, ...)
dialog = gtk_message_dialog_new_with_markup (parent,
GTK_DIALOG_DESTROY_WITH_PARENT |
GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE, str);
+ GTK_BUTTONS_CLOSE, "%s", str);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog),
gtk_button_new_from_stock (GTK_STOCK_OK),
GTK_RESPONSE_OK);
diff --git a/libgda-ui/data-entries/plugins/common-pict.c b/libgda-ui/data-entries/plugins/common-pict.c
index 12fda2d..5d8eb4a 100644
--- a/libgda-ui/data-entries/plugins/common-pict.c
+++ b/libgda-ui/data-entries/plugins/common-pict.c
@@ -264,7 +264,7 @@ common_pict_make_pixbuf (PictOptions *options, PictBinData *bindata, PictAllocat
loc_error && loc_error->message ? loc_error->message : _("No detail"));
g_error_free (loc_error);
*stock = GTK_STOCK_DIALOG_WARNING;
- g_set_error (error, 0, 0, notice_msg);
+ g_set_error_literal (error, 0, 0, notice_msg);
g_free (notice_msg);
}
diff --git a/libgda-ui/demos/ddl_queries.c b/libgda-ui/demos/ddl_queries.c
index f307d63..65455a6 100644
--- a/libgda-ui/demos/ddl_queries.c
+++ b/libgda-ui/demos/ddl_queries.c
@@ -469,7 +469,7 @@ show_sql (GtkButton *button, DemoData *data)
dlg = gtk_message_dialog_new_with_markup (GTK_WINDOW (data->top_window),
GTK_DIALOG_MODAL,
- msg_type, GTK_BUTTONS_CLOSE, msg);
+ msg_type, GTK_BUTTONS_CLOSE, "%s", msg);
g_free (sql);
g_free (msg);
diff --git a/libgda-ui/gdaui-raw-grid.c b/libgda-ui/gdaui-raw-grid.c
index 8ff0f3d..45bd456 100644
--- a/libgda-ui/gdaui-raw-grid.c
+++ b/libgda-ui/gdaui-raw-grid.c
@@ -2232,7 +2232,7 @@ confirm_file_overwrite (GtkWindow *parent, const gchar *path)
dialog = gtk_message_dialog_new_with_markup (parent,
GTK_DIALOG_DESTROY_WITH_PARENT |
GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_CLOSE, str);
+ GTK_BUTTONS_CLOSE, "%s", str);
g_free (str);
button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
diff --git a/libgda/gda-data-model-bdb.c b/libgda/gda-data-model-bdb.c
index 7828fe9..47c0253 100644
--- a/libgda/gda-data-model-bdb.c
+++ b/libgda/gda-data-model-bdb.c
@@ -273,7 +273,7 @@ gda_data_model_bdb_get_type (void)
"db_strerror");
}
if (err) {
- g_warning (err);
+ g_warning ("%s", err);
g_free (err);
libdb_db_create = NULL;
libdb_db_strerror = NULL;
diff --git a/providers/mysql/gda-mysql-provider.c b/providers/mysql/gda-mysql-provider.c
index 5294eaa..d7e7ba0 100644
--- a/providers/mysql/gda-mysql-provider.c
+++ b/providers/mysql/gda-mysql-provider.c
@@ -497,7 +497,7 @@ real_open_connection (const gchar *host,
(port > 0) ? port : 0,
socket, flags);
if (!return_mysql || mysql != return_mysql) {
- g_set_error (error, 0, 0, "%s", mysql_error (mysql));
+ g_set_error_literal (error, 0, 0, mysql_error (mysql));
g_free (mysql);
mysql = NULL;
}
@@ -1020,7 +1020,7 @@ gda_mysql_provider_perform_operation (GdaServerProvider *provider,
g_free (sql);
if (res) {
- g_set_error (error, 0, 0, mysql_error (mysql));
+ g_set_error (error, 0, 0, "%s", mysql_error (mysql));
mysql_close (mysql);
return FALSE;
}
diff --git a/testing/gdaui-test-data-entries.c b/testing/gdaui-test-data-entries.c
index 3ab3352..d7cca33 100644
--- a/testing/gdaui-test-data-entries.c
+++ b/testing/gdaui-test-data-entries.c
@@ -436,7 +436,7 @@ build_test_for_plugin_struct (GdauiPlugin *plugin)
error && error->message ? error->message : "No detail");
label = gtk_label_new (str);
gtk_table_attach (GTK_TABLE (table), label, 1, 2, 2, 3, GTK_FILL, 0, 0, 0);
- g_warning (str);
+ g_warning ("%s", str);
g_error_free (error);
}
else {
diff --git a/tools/browser/support.c b/tools/browser/support.c
index 9548c62..63ae98e 100644
--- a/tools/browser/support.c
+++ b/tools/browser/support.c
@@ -125,7 +125,7 @@ browser_show_error (GtkWindow *parent, const gchar *format, ...)
dialog = gtk_message_dialog_new_with_markup (parent,
GTK_DIALOG_DESTROY_WITH_PARENT |
GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE, tmp);
+ GTK_BUTTONS_CLOSE, "%s", tmp);
g_free (tmp);
gtk_widget_show_all (dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]