[libgda] Always use a format string when calling g_set_error()



commit 8f8f21b8400cb54cc677464a104f2b5b416eab9f
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sun Jan 22 18:50:58 2012 +0100

    Always use a format string when calling g_set_error()

 doc/C/examples/blobtest.c                        |    2 +-
 libgda/gda-meta-store.c                          |    6 +++---
 libgda/gda-set.c                                 |    2 +-
 libgda/gda-sql-builder.c                         |    2 +-
 libgda/gda-tree-mgr-columns.c                    |    8 ++++----
 libgda/gda-tree-mgr-schemas.c                    |    4 ++--
 libgda/gda-tree-mgr-select.c                     |    6 +++---
 libgda/gda-tree-mgr-tables.c                     |    4 ++--
 libgda/gda-util.c                                |    6 +++---
 libgda/sqlite/gda-sqlite-recordset.c             |    2 +-
 libgda/sqlite/virtual/gda-ldap-connection.c      |    6 +++---
 libgda/sqlite/virtual/gda-vconnection-hub.c      |    2 +-
 providers/ldap/gdaprov-data-model-ldap.c         |    4 ++--
 providers/mysql/gda-mysql-recordset.c            |    2 +-
 providers/oracle/gda-oracle-provider.c           |    2 +-
 providers/postgres/gda-postgres-provider.c       |    2 +-
 providers/reuseable/postgres/gda-postgres-meta.c |    2 +-
 samples/Blobs/blobtest.c                         |    2 +-
 testing/gdaui-test-rt-editor.c                   |    4 ++--
 tests/value-holders/check_holder.c               |   12 ++++++------
 tools/browser/auth-dialog.c                      |    2 +-
 tools/browser/browser-connection.c               |    6 +++---
 tools/browser/browser-virtual-connection.c       |    2 +-
 tools/browser/common/fk-declare.c                |    4 ++--
 tools/browser/common/ui-formgrid.c               |    2 +-
 tools/browser/connection-binding-properties.c    |    2 +-
 tools/browser/data-manager/data-source.c         |   12 ++++++------
 tools/browser/data-manager/xml-spec-editor.c     |    2 +-
 tools/browser/ldap-browser/mgr-ldap-classes.c    |    4 ++--
 tools/browser/login-dialog.c                     |    4 ++--
 tools/browser/schema-browser/mgr-columns.c       |    6 +++---
 tools/browser/schema-browser/relations-diagram.c |    4 ++--
 tools/gda-sql.c                                  |   10 +++++-----
 33 files changed, 70 insertions(+), 70 deletions(-)
---
diff --git a/doc/C/examples/blobtest.c b/doc/C/examples/blobtest.c
index df7fcb4..e554758 100644
--- a/doc/C/examples/blobtest.c
+++ b/doc/C/examples/blobtest.c
@@ -82,7 +82,7 @@ do_store (GdaConnection *cnc, const gchar *filename, GError **error)
 	if (! g_file_test (filename, G_FILE_TEST_EXISTS) ||
 	    g_file_test (filename, G_FILE_TEST_IS_DIR)) {
 		g_set_error (error, 0, 0,
-			     "File does not exist or is a directory");
+			     "%s", "File does not exist or is a directory");
 		return FALSE;
 	}
 
diff --git a/libgda/gda-meta-store.c b/libgda/gda-meta-store.c
index 2cb2b5a..0e4ca61 100644
--- a/libgda/gda-meta-store.c
+++ b/libgda/gda-meta-store.c
@@ -4109,7 +4109,7 @@ _gda_meta_store_validate_context (GdaMetaStore *store, GdaMetaContext *context,
 
 	if (!context->table_name || !(*context->table_name)) {
 		g_set_error (error, GDA_META_STORE_ERROR, GDA_META_STORE_META_CONTEXT_ERROR,
-			     _("Missing table name in meta data context"));
+			     "%s", _("Missing table name in meta data context"));
 		return NULL;
 	}
 
@@ -4136,7 +4136,7 @@ _gda_meta_store_validate_context (GdaMetaStore *store, GdaMetaContext *context,
 
 			if (!context->column_names [i]) {
 				g_set_error (error, GDA_META_STORE_ERROR, GDA_META_STORE_META_CONTEXT_ERROR,
-					     _("Missing column name in meta data context"));
+					     "%s", _("Missing column name in meta data context"));
 				goto onerror;
 			}
 			lcontext->column_names [i] = g_strdup (context->column_names [i]);
@@ -4216,7 +4216,7 @@ _gda_meta_store_validate_context (GdaMetaStore *store, GdaMetaContext *context,
 	}
 	else {
 		g_set_error (error, GDA_META_STORE_ERROR, GDA_META_STORE_META_CONTEXT_ERROR,
-			     _("Unknown table in meta data context"));
+			     "%s", _("Unknown table in meta data context"));
 		return NULL;
 	}
 }
diff --git a/libgda/gda-set.c b/libgda/gda-set.c
index 4969773..808c3a7 100644
--- a/libgda/gda-set.c
+++ b/libgda/gda-set.c
@@ -1053,7 +1053,7 @@ validate_change_holder_cb (GdaHolder *holder, const GValue *value, GdaSet *set)
 	/* signal the holder validate-change */
 	GError *error = NULL;
 	if (set->priv->read_only)
-		g_set_error (&error, GDA_SET_ERROR, GDA_SET_READ_ONLY_ERROR, _("Data set does not allow modifications"));
+		g_set_error (&error, GDA_SET_ERROR, GDA_SET_READ_ONLY_ERROR, "%s", _("Data set does not allow modifications"));
 	else {
 #ifdef GDA_DEBUG_signal
 		g_print (">> 'VALIDATE_HOLDER_CHANGE' from %s\n", __FUNCTION__);
diff --git a/libgda/gda-sql-builder.c b/libgda/gda-sql-builder.c
index 10453b5..f242cc7 100644
--- a/libgda/gda-sql-builder.c
+++ b/libgda/gda-sql-builder.c
@@ -341,7 +341,7 @@ gda_sql_builder_get_statement (GdaSqlBuilder *builder, GError **error)
 	g_return_val_if_fail (GDA_IS_SQL_BUILDER (builder), NULL);
 	if (!builder->priv->main_stmt) {
 		g_set_error (error, GDA_SQL_BUILDER_ERROR, GDA_SQL_BUILDER_MISUSE_ERROR,
-			     _("SqlBuilder is empty"));
+			     "%s", _("SqlBuilder is empty"));
 		return NULL;
 	}
 	if (! gda_sql_statement_check_structure (builder->priv->main_stmt, error))
diff --git a/libgda/gda-tree-mgr-columns.c b/libgda/gda-tree-mgr-columns.c
index 7790c6a..4d62487 100644
--- a/libgda/gda-tree-mgr-columns.c
+++ b/libgda/gda-tree-mgr-columns.c
@@ -299,7 +299,7 @@ gda_tree_mgr_columns_update_children (GdaTreeManager *manager, GdaTreeNode *node
 
 	if (!mgr->priv->cnc && !mgr->priv->mstore) {
 		g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-			     _("No connection and no GdaMetaStore specified"));
+			     "%s", _("No connection and no GdaMetaStore specified"));
 		if (out_error)
 			*out_error = TRUE;
 		return NULL;
@@ -385,7 +385,7 @@ gda_tree_mgr_columns_update_children (GdaTreeManager *manager, GdaTreeNode *node
 
 	if (!schema_specified) {
 		g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-			     _("No schema specified"));
+			     "%s", _("No schema specified"));
 		if (out_error)
 			*out_error = TRUE;
 		return NULL;
@@ -393,7 +393,7 @@ gda_tree_mgr_columns_update_children (GdaTreeManager *manager, GdaTreeNode *node
 
 	if (!table_specified) {
 		g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-			     _("No table specified"));
+			     "%s", _("No table specified"));
 		if (out_error)
 			*out_error = TRUE;
 		return NULL;
@@ -422,7 +422,7 @@ gda_tree_mgr_columns_update_children (GdaTreeManager *manager, GdaTreeNode *node
 			if (out_error)
 				*out_error = TRUE;
 			g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-				     _("Unable to get column name"));
+				     "%s", _("Unable to get column name"));
 			return NULL;
 		}
 
diff --git a/libgda/gda-tree-mgr-schemas.c b/libgda/gda-tree-mgr-schemas.c
index 63ef3cb..30053f8 100644
--- a/libgda/gda-tree-mgr-schemas.c
+++ b/libgda/gda-tree-mgr-schemas.c
@@ -252,7 +252,7 @@ gda_tree_mgr_schemas_update_children (GdaTreeManager *manager, GdaTreeNode *node
 
 	if (!mgr->priv->cnc && !mgr->priv->mstore) {
 		g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-			     _("No connection and no GdaMetaStore specified"));
+			     "%s", _("No connection and no GdaMetaStore specified"));
 		if (out_error)
 			*out_error = TRUE;
 		return NULL;
@@ -307,7 +307,7 @@ gda_tree_mgr_schemas_update_children (GdaTreeManager *manager, GdaTreeNode *node
 			if (out_error)
 				*out_error = TRUE;
 			g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-				     _("Unable to get schema name"));
+				     "%s", _("Unable to get schema name"));
 			return NULL;
 		}
 
diff --git a/libgda/gda-tree-mgr-select.c b/libgda/gda-tree-mgr-select.c
index 49653cc..004f4ff 100644
--- a/libgda/gda-tree-mgr-select.c
+++ b/libgda/gda-tree-mgr-select.c
@@ -297,7 +297,7 @@ gda_tree_mgr_select_update_children (GdaTreeManager *manager, GdaTreeNode *node,
 
 	if (!mgr->priv->cnc) {
 		g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-			     _("No connection specified"));
+			     "%s", _("No connection specified"));
 		if (out_error)
 			*out_error = TRUE;
 		return NULL;
@@ -305,7 +305,7 @@ gda_tree_mgr_select_update_children (GdaTreeManager *manager, GdaTreeNode *node,
 
 	if (!mgr->priv->stmt) {
 		g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-			     _("No SELECT statement specified"));
+			     "%s", _("No SELECT statement specified"));
 		if (out_error)
 			*out_error = TRUE;
 		return NULL;
@@ -361,7 +361,7 @@ gda_tree_mgr_select_update_children (GdaTreeManager *manager, GdaTreeNode *node,
 				if (out_error)
 					*out_error = TRUE;
 				g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-					     _("Unable to get iterator's value"));
+					     "%s", _("Unable to get iterator's value"));
 				return NULL;
 			}
 
diff --git a/libgda/gda-tree-mgr-tables.c b/libgda/gda-tree-mgr-tables.c
index e187124..ec38e42 100644
--- a/libgda/gda-tree-mgr-tables.c
+++ b/libgda/gda-tree-mgr-tables.c
@@ -284,7 +284,7 @@ gda_tree_mgr_tables_update_children (GdaTreeManager *manager, GdaTreeNode *node,
 
 	if (!mgr->priv->cnc && !mgr->priv->mstore) {
 		g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-			     _("No connection and no GdaMetaStore specified"));
+			     "%s", _("No connection and no GdaMetaStore specified"));
 		if (out_error)
 			*out_error = TRUE;
 		return NULL;
@@ -388,7 +388,7 @@ gda_tree_mgr_tables_update_children (GdaTreeManager *manager, GdaTreeNode *node,
 			if (out_error)
 				*out_error = TRUE;
 			g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-				     _("Unable to get table name"));
+				     "%s", _("Unable to get table name"));
 			return NULL;
 		}
 
diff --git a/libgda/gda-util.c b/libgda/gda-util.c
index ad221a5..3f9fe2d 100644
--- a/libgda/gda-util.c
+++ b/libgda/gda-util.c
@@ -1726,7 +1726,7 @@ gda_statement_rewrite_for_default_values (GdaStatement *stmt, GdaSet *params, gb
 		if (remove)
 			g_set_error (error, GDA_SERVER_PROVIDER_ERROR,
 				     GDA_SERVER_PROVIDER_DEFAULT_VALUE_HANDLING_ERROR,
-				     _("Can't rewrite UPDATE statement to handle default values"));
+				     "%s", _("Can't rewrite UPDATE statement to handle default values"));
 		else
 			ok = stmt_rewrite_update_default_keyword ((GdaSqlStatementUpdate*) sqlst->contents,
 								  params, error);
@@ -1734,7 +1734,7 @@ gda_statement_rewrite_for_default_values (GdaStatement *stmt, GdaSet *params, gb
 	default:
 		g_set_error (error, GDA_SERVER_PROVIDER_ERROR,
 			     GDA_SERVER_PROVIDER_DEFAULT_VALUE_HANDLING_ERROR,
-			     "Can't rewrite statement is not INSERT or UPDATE");
+			     "%s", _("Can't rewrite statement which is not INSERT or UPDATE"));
 		break;
 	}
 
@@ -1761,7 +1761,7 @@ stmt_rewrite_insert_remove (GdaSqlStatementInsert *ins, GdaSet *params, GError *
 		TO_IMPLEMENT;
 		g_set_error (error, GDA_SERVER_PROVIDER_ERROR,
 			     GDA_SERVER_PROVIDER_DEFAULT_VALUE_HANDLING_ERROR,
-			     "Not yet implemented");
+			     "%s", "Not yet implemented");
 		return FALSE;
 	}
 
diff --git a/libgda/sqlite/gda-sqlite-recordset.c b/libgda/sqlite/gda-sqlite-recordset.c
index 95fed5c..ef073ff 100644
--- a/libgda/sqlite/gda-sqlite-recordset.c
+++ b/libgda/sqlite/gda-sqlite-recordset.c
@@ -635,7 +635,7 @@ fetch_next_sqlite_row (GdaSqliteRecordset *model, gboolean do_store, GError **er
 		SQLITE3_CALL (sqlite3_reset) (ps->sqlite_stmt);
 		if (rc == SQLITE_IOERR_TRUNCATE)
 			g_set_error (&lerror, GDA_DATA_MODEL_ERROR,
-				     GDA_DATA_MODEL_TRUNCATED_ERROR, _("Truncated data"));
+				     GDA_DATA_MODEL_TRUNCATED_ERROR, "%s", _("Truncated data"));
 		else
 			g_set_error (&lerror, GDA_SERVER_PROVIDER_ERROR,
 				     GDA_SERVER_PROVIDER_INTERNAL_ERROR, 
diff --git a/libgda/sqlite/virtual/gda-ldap-connection.c b/libgda/sqlite/virtual/gda-ldap-connection.c
index 68c08f1..855c061 100644
--- a/libgda/sqlite/virtual/gda-ldap-connection.c
+++ b/libgda/sqlite/virtual/gda-ldap-connection.c
@@ -770,7 +770,7 @@ gda_ldap_connection_undeclare_table (GdaLdapConnection *cnc, const gchar *table_
 	if (specs && ! g_slist_find (cnc->priv->maps, specs)) {
 		g_set_error (error, GDA_SERVER_PROVIDER_ERROR,
 			     GDA_SERVER_PROVIDER_MISUSE_ERROR,
-			     _("Can't remove non LDAP virtual table"));
+			     "%s", _("Can't remove non LDAP virtual table"));
 		return FALSE;
 	}
 	return gda_vconnection_data_model_remove (GDA_VCONNECTION_DATA_MODEL (cnc), table_name, error);
@@ -818,14 +818,14 @@ gda_ldap_connection_describe_table (GdaLdapConnection *cnc, const gchar *table_n
 	if (specs && ! g_slist_find (cnc->priv->maps, specs)) {
 		g_set_error (error, GDA_SERVER_PROVIDER_ERROR,
 			     GDA_SERVER_PROVIDER_MISUSE_ERROR,
-			     _("Can't describe non LDAP virtual table"));
+			     "%s", _("Can't describe non LDAP virtual table"));
 		return FALSE;
 	}
 	
 	if (!specs) {
 		g_set_error (error, GDA_SERVER_PROVIDER_ERROR,
 			     GDA_SERVER_PROVIDER_MISUSE_ERROR,
-			     _("Unknown LDAP virtual table"));
+			     "%s", _("Unknown LDAP virtual table"));
 		return FALSE;
 	}
 
diff --git a/libgda/sqlite/virtual/gda-vconnection-hub.c b/libgda/sqlite/virtual/gda-vconnection-hub.c
index 4947823..e3134b5 100644
--- a/libgda/sqlite/virtual/gda-vconnection-hub.c
+++ b/libgda/sqlite/virtual/gda-vconnection-hub.c
@@ -652,7 +652,7 @@ create_value_from_sqlite3_gvalue (GType type, GValue *svalue, GError **error)
 	else if (type == GDA_TYPE_BLOB) {
 		g_set_error (error, GDA_SERVER_PROVIDER_ERROR,
 			     GDA_SERVER_PROVIDER_DATA_ERROR,
-			     _("Blob constraints are not handled in virtual table condition"));
+			     "%s", _("Blob constraints are not handled in virtual table condition"));
 		allok = FALSE;
 	}
 	else if (type == G_TYPE_BOOLEAN) {
diff --git a/providers/ldap/gdaprov-data-model-ldap.c b/providers/ldap/gdaprov-data-model-ldap.c
index a4ff290..09e6846 100644
--- a/providers/ldap/gdaprov-data-model-ldap.c
+++ b/providers/ldap/gdaprov-data-model-ldap.c
@@ -853,7 +853,7 @@ update_iter_from_ldap_row (GdaDataModelLdap *imodel, GdaDataModelIter *iter)
 			GError *e;
 			g_set_error (&e, GDA_DATA_MODEL_ERROR,
 				     GDA_DATA_MODEL_TRUNCATED_ERROR,
-				     _("Truncated result because LDAP server limit encountered"));
+				     "%s", _("Truncated result because LDAP server limit encountered"));
 			add_exception (imodel, e);
 		}
 	}
@@ -1110,7 +1110,7 @@ gda_data_model_ldap_iter_next (GdaDataModel *model, GdaDataModelIter *iter)
 			GError *e;
 			g_set_error (&e, GDA_DATA_MODEL_ERROR,
 				     GDA_DATA_MODEL_TRUNCATED_ERROR,
-				     _("Truncated result because LDAP server limit encountered"));
+				     "%s", _("Truncated result because LDAP server limit encountered"));
 			add_exception (imodel, e);
 		}
 		g_signal_emit_by_name (iter, "end-of-data");
diff --git a/providers/mysql/gda-mysql-recordset.c b/providers/mysql/gda-mysql-recordset.c
index 05828f3..700275b 100644
--- a/providers/mysql/gda-mysql-recordset.c
+++ b/providers/mysql/gda-mysql-recordset.c
@@ -733,7 +733,7 @@ new_row_from_mysql_stmt (GdaMysqlRecordset *imodel, G_GNUC_UNUSED gint rownum, G
 	if (res == MYSQL_NO_DATA) {
 		/* should not happen */
 		g_set_error (error, GDA_DATA_MODEL_ERROR, GDA_DATA_MODEL_ACCESS_ERROR,
-			     "No more data, please report this bug to "
+			     "%s", "No more data, please report this bug to "
 			     "http://bugzilla.gnome.org/ for the \"libgda\" product and the MySQL provider.");
 	}
 	else if (res == MYSQL_DATA_TRUNCATED) {
diff --git a/providers/oracle/gda-oracle-provider.c b/providers/oracle/gda-oracle-provider.c
index 94280ef..8e8413f 100644
--- a/providers/oracle/gda-oracle-provider.c
+++ b/providers/oracle/gda-oracle-provider.c
@@ -1413,7 +1413,7 @@ oracle_render_select (GdaSqlStatementSelect *stmt, GdaSqlRenderingContext *conte
 		
 		if (stmt->limit_offset) {
 			g_set_error (error, GDA_STATEMENT_ERROR, GDA_STATEMENT_SYNTAX_ERROR,
-				     _("Oracle does not support the offset with a limit"));
+				     "%s", _("Oracle does not support the offset with a limit"));
 			goto err;
 		}
 		else {
diff --git a/providers/postgres/gda-postgres-provider.c b/providers/postgres/gda-postgres-provider.c
index 64f0c98..ac69ab1 100644
--- a/providers/postgres/gda-postgres-provider.c
+++ b/providers/postgres/gda-postgres-provider.c
@@ -1924,7 +1924,7 @@ gda_postgres_provider_statement_execute (GdaServerProvider *provider, GdaConnect
 			gda_connection_event_set_description (event, _("Missing parameter(s) to execute query"));
 			g_set_error (error, GDA_SERVER_PROVIDER_ERROR,
 				     GDA_SERVER_PROVIDER_MISSING_PARAM_ERROR,
-				     _("Missing parameter(s) to execute query"));
+				     "%s", _("Missing parameter(s) to execute query"));
 			break;
 		}
 
diff --git a/providers/reuseable/postgres/gda-postgres-meta.c b/providers/reuseable/postgres/gda-postgres-meta.c
index 0c65bcd..9f25150 100644
--- a/providers/reuseable/postgres/gda-postgres-meta.c
+++ b/providers/reuseable/postgres/gda-postgres-meta.c
@@ -2111,7 +2111,7 @@ concatenate_index_details (G_GNUC_UNUSED GdaServerProvider *prov, GdaConnection
 	nrows = gda_data_model_get_n_rows (index_oid_model);
 	if (nrows == 0) {
 		g_set_error (error, GDA_SERVER_PROVIDER_ERROR, GDA_SERVER_PROVIDER_INTERNAL_ERROR,
-			     _("could not determine the indexed columns for index"));
+			     "%s", _("could not determine the indexed columns for index"));
 		return NULL;
 	}
 	for (i = 0; i < nrows; i++) {
diff --git a/samples/Blobs/blobtest.c b/samples/Blobs/blobtest.c
index a0a455f..08285a4 100644
--- a/samples/Blobs/blobtest.c
+++ b/samples/Blobs/blobtest.c
@@ -95,7 +95,7 @@ do_store (GdaConnection *cnc, const gchar *filename, GError **error)
 	if (! g_file_test (filename, G_FILE_TEST_EXISTS) ||
 	    g_file_test (filename, G_FILE_TEST_IS_DIR)) {
 		g_set_error (error, 0, 0,
-			     "File does not exist or is a directory");
+			     "%s", "File does not exist or is a directory");
 		return FALSE;
 	}
 
diff --git a/testing/gdaui-test-rt-editor.c b/testing/gdaui-test-rt-editor.c
index a5e34aa..48d09d6 100644
--- a/testing/gdaui-test-rt-editor.c
+++ b/testing/gdaui-test-rt-editor.c
@@ -96,11 +96,11 @@ textbuffers_equal (GtkTextBuffer *buffer1, GtkTextBuffer *buffer2, GError **erro
 	gtk_text_buffer_get_end_iter (buffer1, &end1);
 	gtk_text_buffer_get_end_iter (buffer2, &end2);
 	if (gtk_text_iter_compare (&iter1, &end1)) {
-		g_set_error (error, 0, 0, "textbuffer1 is shorter than textbuffer2");
+		g_set_error (error, 0, 0, "%s", "textbuffer1 is shorter than textbuffer2");
 		return FALSE;
 	}
 	if (gtk_text_iter_compare (&iter2, &end2)) {
-		g_set_error (error, 0, 0, "textbuffer2 is shorter than textbuffer1");
+		g_set_error (error, 0, 0, "%s", "textbuffer2 is shorter than textbuffer1");
 		return FALSE;
 	}
 	return TRUE;
diff --git a/tests/value-holders/check_holder.c b/tests/value-holders/check_holder.c
index 37b11ba..606acb2 100644
--- a/tests/value-holders/check_holder.c
+++ b/tests/value-holders/check_holder.c
@@ -1034,7 +1034,7 @@ test13 (GError **error)
 	g_object_set (h2, "g-type", G_TYPE_STRING, NULL);
 	if (gda_holder_get_g_type (h1) != G_TYPE_STRING) {
 		g_set_error (error, 0, 0,
-			     "Bind-to holder type set did not propagate to holder's type, case 1");
+			     "%s", "Bind-to holder type set did not propagate to holder's type, case 1");
 		g_object_unref (h1);
 		g_object_unref (h2);
 		return FALSE;
@@ -1052,7 +1052,7 @@ test13 (GError **error)
 	}
 	if (gda_holder_get_g_type (h1) != G_TYPE_INT) {
 		g_set_error (error, 0, 0,
-			     "Bind-to holder type set did not propagate to holder's type, case 2");
+			     "%s", "Bind-to holder type set did not propagate to holder's type, case 2");
 		g_object_unref (h1);
 		g_object_unref (h2);
 		return FALSE;
@@ -1071,14 +1071,14 @@ test13 (GError **error)
 	g_object_set (h2, "g-type", G_TYPE_STRING, NULL);
 	if (gda_holder_get_g_type (h1) != G_TYPE_STRING) {
 		g_set_error (error, 0, 0,
-			     "Holder type changed when it should not have, case 1");
+			     "%s", "Holder type changed when it should not have, case 1");
 		g_object_unref (h1);
 		g_object_unref (h2);
 		return FALSE;
 	}
 	if (gda_holder_get_bind (h1) != h2) {
 		g_set_error (error, 0, 0,
-			     "Bind broken when it should not have been");
+			     "%s", "Bind broken when it should not have been");
 		g_object_unref (h1);
 		g_object_unref (h2);
 		return FALSE;
@@ -1097,14 +1097,14 @@ test13 (GError **error)
 	g_object_set (h2, "g-type", G_TYPE_INT, NULL);
 	if (gda_holder_get_g_type (h1) != G_TYPE_STRING) {
 		g_set_error (error, 0, 0,
-			     "Holder type changed when it should not have, case 2");
+			     "%s", "Holder type changed when it should not have, case 2");
 		g_object_unref (h1);
 		g_object_unref (h2);
 		return FALSE;
 	}
 	if (gda_holder_get_bind (h1) == h2) {
 		g_set_error (error, 0, 0,
-			     "Bind not broken when it should have been");
+			     "%s", "Bind not broken when it should have been");
 		g_object_unref (h1);
 		g_object_unref (h2);
 		return FALSE;
diff --git a/tools/browser/auth-dialog.c b/tools/browser/auth-dialog.c
index b53df30..7df220d 100644
--- a/tools/browser/auth-dialog.c
+++ b/tools/browser/auth-dialog.c
@@ -317,7 +317,7 @@ sub_thread_open_cnc (AuthData *ad, GError **error)
 	return cnc;
 #else
 	sleep (5);
-	g_set_error (error, 0, 0, "Oooo");
+	g_set_error (error, 0, 0, "%s", "Oooo");
 	return NULL;
 #endif
 }
diff --git a/tools/browser/browser-connection.c b/tools/browser/browser-connection.c
index ea93c30..2d0a598 100644
--- a/tools/browser/browser-connection.c
+++ b/tools/browser/browser-connection.c
@@ -1365,7 +1365,7 @@ wrapper_statement_execute (StmtExecData *data, GError **error)
 		else {
 			g_warning (_("Execution reported an undefined error, please report error to "
 				     "http://bugzilla.gnome.org/ for the \"libgda\" product"));
-			g_set_error (error, 0, 0, _("No detail"));
+			g_set_error (error, 0, 0, "%s", _("No detail"));
 		}
 	}
 	return obj ? obj : (gpointer) 0x01;
@@ -1760,7 +1760,7 @@ meta_store_addons_init (BrowserConnection *bcnc, GError **error)
 
 	if (!bcnc->priv->cnc) {
 		g_set_error (error, 0, 0,
-			     _("Connection not yet opened"));
+			     "%s", _("Connection not yet opened"));
 		return FALSE;
 	}
 	store = gda_connection_get_meta_store (bcnc->priv->cnc);
@@ -2462,7 +2462,7 @@ wrapper_ldap_search (LdapSearchData *data, GError **error)
 					 data->filter, data->attributes, data->scope);
 	if (!model) {
 		g_set_error (error, 0, 0,
-			     _("Could not execute LDAP search"));
+			     "%s", _("Could not execute LDAP search"));
 		return (gpointer) 0x01;
 	}
 	else {
diff --git a/tools/browser/browser-virtual-connection.c b/tools/browser/browser-virtual-connection.c
index d3364c8..ea50a5c 100644
--- a/tools/browser/browser-virtual-connection.c
+++ b/tools/browser/browser-virtual-connection.c
@@ -315,7 +315,7 @@ sub_thread_open_cnc (BrowserVirtualConnectionSpecs *specs, GError **error)
 	return virtual;
 #else
         sleep (5);
-        g_set_error (error, 0, 0, "Timeout!!!");
+        g_set_error (error, 0, 0, "%s", "Timeout!!!");
         return NULL;
 #endif
 }
diff --git a/tools/browser/common/fk-declare.c b/tools/browser/common/fk-declare.c
index 032d4f2..8e3d1d2 100644
--- a/tools/browser/common/fk-declare.c
+++ b/tools/browser/common/fk-declare.c
@@ -557,7 +557,7 @@ fk_declare_write (FkDeclare *decl, BrowserWindow *bwin, GError **error)
 
 	if (! decl->priv->dialog_sensitive) {
 		g_set_error (error, 0, 0,
-			     _("Missing information to declare foreign key"));
+			     "%s", _("Missing information to declare foreign key"));
 		return FALSE;
 	}
 
@@ -639,7 +639,7 @@ fk_declare_undeclare (GdaMetaStruct *mstruct, BrowserWindow *bwin, GdaMetaTableF
 	    !decl_fk->depend_on->obj_schema ||
 	    !decl_fk->depend_on->obj_name) {
 		g_set_error (error, 0, 0,
-			     _("Missing information to undeclare foreign key"));
+			     "%s", _("Missing information to undeclare foreign key"));
 		return FALSE;
 	}
 
diff --git a/tools/browser/common/ui-formgrid.c b/tools/browser/common/ui-formgrid.c
index e2dc590..540972d 100644
--- a/tools/browser/common/ui-formgrid.c
+++ b/tools/browser/common/ui-formgrid.c
@@ -650,7 +650,7 @@ exec_end_timeout_cb (ActionExecutedData *aed)
                 else {
 			g_object_unref (obj);
                         g_set_error (&error, 0, 0,
-                                     _("Statement to execute is not a selection statement"));
+                                     "%s", _("Statement to execute is not a selection statement"));
                 }
         }
 
diff --git a/tools/browser/connection-binding-properties.c b/tools/browser/connection-binding-properties.c
index 8e676ae..36d4b7c 100644
--- a/tools/browser/connection-binding-properties.c
+++ b/tools/browser/connection-binding-properties.c
@@ -472,7 +472,7 @@ part_for_cnc_validate_holder_change_cb (G_GNUC_UNUSED GdaSet *set, GdaHolder *ho
 			    ((ptr != str) && (*ptr != '_') && !g_ascii_isalnum (*ptr))) {
 				GError *error = NULL;
 				g_set_error (&error, 0, 0,
-					     _("Invalid schema name"));
+					     "%s", _("Invalid schema name"));
 				return error;
 			}
 		}
diff --git a/tools/browser/data-manager/data-source.c b/tools/browser/data-manager/data-source.c
index 69d3335..d047a77 100644
--- a/tools/browser/data-manager/data-source.c
+++ b/tools/browser/data-manager/data-source.c
@@ -434,7 +434,7 @@ get_meta_table (DataSource *source, const gchar *table_name, GError **error)
 	mstruct = browser_connection_get_meta_struct (source->priv->bcnc);
 	if (! mstruct) {
 		g_set_error (error, 0, 0,
-			     _("Not ready"));
+			     "%s", _("Not ready"));
 		return NULL;
 	}
 
@@ -482,7 +482,7 @@ init_from_table_node (DataSource *source, xmlNodePtr node, GError **error)
 	if (!tname) {
 		g_set_error (error, 0, 0,
 			     /* Translators: Do not translate "name" */
-			     _("Missing attribute \"name\" for table"));
+			     "%s", _("Missing attribute \"name\" for table"));
 		return FALSE;
 	}
 
@@ -808,7 +808,7 @@ exec_end_timeout_cb (DataSource *source)
 		else {
 			g_object_unref (obj);
 			g_set_error (&source->priv->exec_error, 0, 0,
-				     _("Statement to execute is not a selection statement"));
+				     "%s", _("Statement to execute is not a selection statement"));
 		}
 
 		source->priv->exec_id = 0;
@@ -948,7 +948,7 @@ data_source_execute (DataSource *source, GError **error)
 			g_propagate_error (error, source->priv->init_error);
 		else
 			g_set_error (error, 0, 0,
-				     _("No SELECT statement to execute"));
+				     "%s", _("No SELECT statement to execute"));
 	}
 
 	if (source->priv->model) {
@@ -1218,7 +1218,7 @@ data_source_set_table (DataSource *source, const gchar *table, GError **error)
 	source->priv->builder = b;
 	if (! gda_sql_builder_select_add_target (b, table, NULL)) {
 		g_set_error (error, 0, 0,
-			     _("Could not build SELECT statement"));
+			     "%s", _("Could not build SELECT statement"));
 		return FALSE;
 	}
 	gda_sql_builder_select_set_limit (b,
@@ -1285,7 +1285,7 @@ data_source_set_query (DataSource *source, const gchar *sql, GError **warning)
 
 	if (remain)
 		g_set_error (warning, 0, 0,
-			     _("Multiple statements detected, only the first will be used"));
+			     "%s", _("Multiple statements detected, only the first will be used"));
 
 	/* try to normalize the statement */
 	GdaSqlStatement *sqlst;
diff --git a/tools/browser/data-manager/xml-spec-editor.c b/tools/browser/data-manager/xml-spec-editor.c
index 153b843..bdc931a 100644
--- a/tools/browser/data-manager/xml-spec-editor.c
+++ b/tools/browser/data-manager/xml-spec-editor.c
@@ -168,7 +168,7 @@ signal_editor_changed (XmlSpecEditor *sped)
 	if (!doc) {
 		TO_IMPLEMENT;
 		g_set_error (&lerror, 0, 0,
-			     _("Error parsing XML specifications"));
+			     "%s", _("Error parsing XML specifications"));
 		goto out;
 	}
 
diff --git a/tools/browser/ldap-browser/mgr-ldap-classes.c b/tools/browser/ldap-browser/mgr-ldap-classes.c
index 65cfab0..bbaad4d 100644
--- a/tools/browser/ldap-browser/mgr-ldap-classes.c
+++ b/tools/browser/ldap-browser/mgr-ldap-classes.c
@@ -183,7 +183,7 @@ mgr_ldap_classes_update_children_nonflat (MgrLdapClasses *mgr, GdaTreeNode *node
 	gchar *real_class = NULL;
 	if (!mgr->priv->bcnc) {
 		g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-			     _("No LDAP connection specified"));
+			     "%s", _("No LDAP connection specified"));
 		if (out_error)
 			*out_error = TRUE;
 		goto onerror;
@@ -271,7 +271,7 @@ mgr_ldap_classes_update_children_flat (MgrLdapClasses *mgr, GdaTreeNode *node,
 {
 	if (!mgr->priv->bcnc) {
 		g_set_error (error, GDA_TREE_MANAGER_ERROR, GDA_TREE_MANAGER_UNKNOWN_ERROR,
-			     _("No LDAP connection specified"));
+			     "%s", _("No LDAP connection specified"));
 		if (out_error)
 			*out_error = TRUE;
 		goto onerror;
diff --git a/tools/browser/login-dialog.c b/tools/browser/login-dialog.c
index 4096608..b38b800 100644
--- a/tools/browser/login-dialog.c
+++ b/tools/browser/login-dialog.c
@@ -251,7 +251,7 @@ login_dialog_run (LoginDialog *dialog, gboolean retry, GError **error)
 		else {
 			/* cancelled connection opening */
 			g_set_error (error, LOGIN_DIALOG_ERROR, LOGIN_DIALOG_CANCELLED_ERROR,
-				     _("Cancelled by the user"));
+				     "%s", _("Cancelled by the user"));
 			goto out;
 		}
 		
@@ -289,7 +289,7 @@ sub_thread_open_cnc (GdaDsnInfo *info, GError **error)
 	return cnc;
 #else
 	sleep (5);
-	g_set_error (error, 0, 0, "Oooo");
+	g_set_error (error, 0, 0, "%s", "Oooo");
 	return NULL;
 #endif
 }
diff --git a/tools/browser/schema-browser/mgr-columns.c b/tools/browser/schema-browser/mgr-columns.c
index e2ab571..12999a8 100644
--- a/tools/browser/schema-browser/mgr-columns.c
+++ b/tools/browser/schema-browser/mgr-columns.c
@@ -275,7 +275,7 @@ mgr_columns_update_children (GdaTreeManager *manager, GdaTreeNode *node, const G
 	mstruct = browser_connection_get_meta_struct (mgr->priv->bcnc);
 	if (!mstruct) {
 		g_set_error (error, MGR_COLUMNS_ERROR, MGR_COLUMNS_NO_META_STRUCT,
-                             _("Not ready"));
+                             "%s", _("Not ready"));
                 if (out_error)
                         *out_error = TRUE;
 		return NULL;
@@ -293,14 +293,14 @@ mgr_columns_update_children (GdaTreeManager *manager, GdaTreeNode *node, const G
 
 	if (!dbo) {
 		g_set_error (error, MGR_COLUMNS_ERROR, MGR_COLUMNS_TABLE_NOT_FOUND,
-                             _("Table not found"));
+                             "%s", _("Table not found"));
                 if (out_error)
                         *out_error = TRUE;
 		return NULL;
 	}
 	if ((dbo->obj_type != GDA_META_DB_TABLE) && (dbo->obj_type != GDA_META_DB_VIEW)) {
 		g_set_error (error, MGR_COLUMNS_ERROR, MGR_COLUMNS_WRONG_OBJ_TYPE,
-                             _("Requested object is not a table or view"));
+                             "%s", _("Requested object is not a table or view"));
                 if (out_error)
                         *out_error = TRUE;
 		return NULL;
diff --git a/tools/browser/schema-browser/relations-diagram.c b/tools/browser/schema-browser/relations-diagram.c
index 460b059..d51f15f 100644
--- a/tools/browser/schema-browser/relations-diagram.c
+++ b/tools/browser/schema-browser/relations-diagram.c
@@ -371,7 +371,7 @@ relations_diagram_new_with_fav_id (BrowserConnection *bcnc, gint fav_id, GError
 	doc = xmlParseDoc (BAD_CAST fav.contents);
 	if (!doc) {
 		g_set_error (error, 0, 0,
-			     _("Error parsing favorite's contents"));
+			     "%s", _("Error parsing favorite's contents"));
 		goto out;
 	}
 
@@ -430,7 +430,7 @@ relations_diagram_new_with_fav_id (BrowserConnection *bcnc, gint fav_id, GError
 				if (name)
 					xmlFree (name);
 				g_set_error (error, 0, 0,
-					     _("Missing table attribute in favorite's contents"));
+					     "%s", _("Missing table attribute in favorite's contents"));
 				gtk_widget_destroy ((GtkWidget*) diagram);
 				diagram = NULL;
 				goto out;
diff --git a/tools/gda-sql.c b/tools/gda-sql.c
index 0d43b26..858912d 100644
--- a/tools/gda-sql.c
+++ b/tools/gda-sql.c
@@ -3576,7 +3576,7 @@ extra_command_edit_buffer (SqlConsole *console, G_GNUC_UNUSED GdaConnection *cnc
 	}
         else if (systemres == 127) {
 		g_set_error (error, 0, 0,
-			     _("Could not start /bin/sh"));
+			     "%s", _("Could not start /bin/sh"));
 		goto end_of_command;
 	}
 	else {
@@ -4231,7 +4231,7 @@ parse_fk_decl_spec (const gchar *spec, gboolean columns_required, GError **error
 
 	if (!spec || !*spec) {
 		g_set_error (error, 0, 0,
-			     _("Missing foreign key declaration specification"));
+			     "%s", _("Missing foreign key declaration specification"));
 		return NULL;
 	}
 	dspec = g_strstrip (g_strdup (spec));
@@ -4348,7 +4348,7 @@ parse_fk_decl_spec (const gchar *spec, gboolean columns_required, GError **error
  onerror:
 	fk_decl_data_free (decldata);
 	g_set_error (error, 0, 0,
-		     _("Malformed foreign key declaration specification"));
+		     "%s", _("Malformed foreign key declaration specification"));
 	return NULL;
 }
 
@@ -4468,7 +4468,7 @@ extra_command_declare_fk (SqlConsole *console, GdaConnection *cnc,
 	}
 	else
 		g_set_error (error, 0, 0,
-			     _("Missing foreign key name argument"));
+			     "%s", _("Missing foreign key name argument"));
 	return res;
 }
 
@@ -4542,7 +4542,7 @@ extra_command_undeclare_fk (SqlConsole *console, GdaConnection *cnc,
 	}
 	else
 		g_set_error (error, 0, 0,
-			     _("Missing foreign key name argument"));
+			     "%s", _("Missing foreign key name argument"));
 	return res;
 }
 



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