[libgda] Compiler warnings corrections



commit 02601595b5344cd00007ab0f2f9d06a5dd5808e2
Author: Vivien Malerba <malerba gnome-db org>
Date:   Thu Oct 20 22:25:21 2011 +0200

    Compiler warnings corrections

 .../data-entries/gdaui-data-cell-renderer-info.c   |    6 +-----
 libgda-ui/data-entries/plugins/gdaui-entry-cidr.c  |    4 +---
 libgda-ui/gdaui-data-proxy-info.c                  |   14 --------------
 libgda-ui/gdaui-rt-editor.c                        |    3 +--
 libgda-ui/gdaui-server-operation.c                 |    2 --
 libgda-ui/internal/utility.c                       |   13 ++++++++-----
 libgda/gda-row.c                                   |   10 +++++-----
 libgda/gda-sql-builder.c                           |    4 ++--
 libgda/gda-sql-builder.h                           |    2 +-
 libgda/handlers/gda-handler-numerical.c            |    2 +-
 libgda/sql-parser/gda-statement-struct-util.c      |    3 +--
 libgda/sqlite/virtual/gda-vprovider-data-model.c   |    5 ++++-
 providers/ldap/gda-ldap-provider.c                 |    3 +--
 providers/ldap/gda-ldap-util.c                     |    3 +--
 providers/mdb/gda-mdb-provider.c                   |    9 +++++----
 providers/oracle/gda-oracle-blob-op.c              |    5 +++--
 providers/oracle/gda-oracle-meta.c                 |    2 +-
 providers/oracle/gda-oracle-provider.c             |    7 ++-----
 providers/oracle/gda-oracle-pstmt.c                |    3 ++-
 providers/oracle/gda-oracle-recordset.c            |    3 ++-
 providers/postgres/gda-postgres-provider.c         |    6 ++----
 tools/browser/auth-dialog.c                        |    3 +--
 tools/browser/browser-connection.c                 |    3 +--
 tools/browser/browser-virtual-connection.c         |    3 +--
 tools/browser/browser-window.c                     |    3 +--
 tools/browser/canvas/browser-canvas-column.c       |    2 --
 tools/browser/canvas/browser-canvas-db-relations.c |    7 +++----
 tools/browser/canvas/browser-canvas.c              |    6 +-----
 tools/browser/common/widget-overlay.c              |    8 +++++---
 tools/browser/data-manager/analyser.c              |    2 --
 tools/browser/data-manager/data-console.c          |    4 ----
 tools/browser/ldap-browser/ldap-classes-page.c     |    5 +----
 tools/browser/ldap-browser/ldap-entries-page.c     |    6 ++----
 tools/browser/ldap-browser/ldap-search-page.c      |    2 --
 tools/browser/login-dialog.c                       |    3 +--
 tools/browser/mgr-favorites.c                      |    2 --
 tools/browser/query-exec/query-console-page.c      |    2 --
 37 files changed, 61 insertions(+), 109 deletions(-)
---
diff --git a/libgda-ui/data-entries/gdaui-data-cell-renderer-info.c b/libgda-ui/data-entries/gdaui-data-cell-renderer-info.c
index 7e5d162..4ee10e2 100644
--- a/libgda-ui/data-entries/gdaui-data-cell-renderer-info.c
+++ b/libgda-ui/data-entries/gdaui-data-cell-renderer-info.c
@@ -377,7 +377,7 @@ gdaui_data_cell_renderer_info_render (GtkCellRenderer      *cell,
 
 	static GdkRGBA **colors = NULL;
 	GdkRGBA statenormal, stateprelight;
-	GdkRGBA *normal = NULL, *prelight = NULL;
+	GdkRGBA *normal = NULL;
 
 
 	if (!colors)
@@ -385,15 +385,12 @@ gdaui_data_cell_renderer_info_render (GtkCellRenderer      *cell,
 
 	if (cellinfo->priv->attributes & GDA_VALUE_ATTR_DATA_NON_VALID) {
 		normal = colors[4];
-		prelight = colors[5];
 	}
 	else if (cellinfo->priv->attributes & GDA_VALUE_ATTR_IS_DEFAULT) {
 		normal = colors[2];
-		prelight = colors[3];
 	}
 	else if (cellinfo->priv->attributes & GDA_VALUE_ATTR_IS_NULL) {
 		normal = colors[0];
-		prelight = colors[1];
 	}
 	else {
 		GtkStyleContext *stc;
@@ -401,7 +398,6 @@ gdaui_data_cell_renderer_info_render (GtkCellRenderer      *cell,
 		gtk_style_context_get_background_color (stc, GTK_STATE_FLAG_NORMAL, &statenormal);
 		gtk_style_context_get_background_color (stc, GTK_STATE_FLAG_NORMAL, &stateprelight);
 		normal = &statenormal;
-		prelight = &stateprelight;
 	}
 
 	gdaui_data_cell_renderer_info_get_size (cell, widget, cell_area,
diff --git a/libgda-ui/data-entries/plugins/gdaui-entry-cidr.c b/libgda-ui/data-entries/plugins/gdaui-entry-cidr.c
index f8e26ad..2a1459d 100644
--- a/libgda-ui/data-entries/plugins/gdaui-entry-cidr.c
+++ b/libgda-ui/data-entries/plugins/gdaui-entry-cidr.c
@@ -251,11 +251,9 @@ static void popup_menu_item_activate_cb (GtkMenuItem *item, GdauiEntryCidr *mgci
 static void
 mask_popup (G_GNUC_UNUSED GtkEntry *entry, GtkMenu *arg1, GdauiEntryCidr *mgcidr)
 {
-	GtkWidget *submenu, *item;
+	GtkWidget *item;
 	gint net;
 
-	submenu = gtk_menu_item_new_with_label (_("Mask settings"));
-
 	item = gtk_separator_menu_item_new ();
 	gtk_menu_shell_prepend (GTK_MENU_SHELL (arg1), item);
 	gtk_widget_show (item);
diff --git a/libgda-ui/gdaui-data-proxy-info.c b/libgda-ui/gdaui-data-proxy-info.c
index 6a15b22..c7a54fc 100644
--- a/libgda-ui/gdaui-data-proxy-info.c
+++ b/libgda-ui/gdaui-data-proxy-info.c
@@ -487,22 +487,8 @@ modif_buttons_make (GdauiDataProxyInfo *info)
 		gtk_widget_unparent (info->priv->tool_item);
 	}
 
-	gboolean row_modif_needed = FALSE;
-	gboolean row_move_needed = FALSE;
-	gboolean chunk_change_needed = FALSE;
 	gboolean ensure_update = FALSE;
 
-	if (flags & (GDAUI_DATA_PROXY_INFO_ROW_MODIFY_BUTTONS |
-		     GDAUI_DATA_PROXY_INFO_ROW_MOVE_BUTTONS |
-		     GDAUI_DATA_PROXY_INFO_CHUNCK_CHANGE_BUTTONS)) {
-		if (flags & GDAUI_DATA_PROXY_INFO_ROW_MODIFY_BUTTONS)
-			row_modif_needed = TRUE;
-		if (flags & GDAUI_DATA_PROXY_INFO_ROW_MOVE_BUTTONS)
-			row_move_needed = TRUE;
-		if (flags & GDAUI_DATA_PROXY_INFO_CHUNCK_CHANGE_BUTTONS)
-			chunk_change_needed = TRUE;
-	}
-
 	if (info->priv->uimanager) {
 		if (info->priv->merge_id_row_modif) {
 			gtk_ui_manager_remove_ui (info->priv->uimanager, info->priv->merge_id_row_modif);
diff --git a/libgda-ui/gdaui-rt-editor.c b/libgda-ui/gdaui-rt-editor.c
index 4823091..8806dae 100644
--- a/libgda-ui/gdaui-rt-editor.c
+++ b/libgda-ui/gdaui-rt-editor.c
@@ -1419,8 +1419,7 @@ get_markup_token (GtkTextIter *iter, gint *out_nb_spaces_before, GtkTextIter *ou
 		}
 	}
 	else if (c == ' ') {
-		gboolean line;
-		line = gtk_text_iter_starts_line (&inti);
+		gtk_text_iter_starts_line (&inti);
 
 		c = get_char_at_iter (&inti, TRUE);
 		if (c == '=') {
diff --git a/libgda-ui/gdaui-server-operation.c b/libgda-ui/gdaui-server-operation.c
index ae889b7..9f7f877 100644
--- a/libgda-ui/gdaui-server-operation.c
+++ b/libgda-ui/gdaui-server-operation.c
@@ -453,7 +453,6 @@ fill_create_widget (GdauiServerOperation *form, const gchar *path, gchar **secti
 	}
 	case GDA_SERVER_OPERATION_NODE_DATA_MODEL: {
 		GdaDataModel *model;
-		GdaDataProxy *proxy;
 		GtkWidget *winfo;
 		GtkWidget *box, *grid;
 
@@ -472,7 +471,6 @@ fill_create_widget (GdauiServerOperation *form, const gchar *path, gchar **secti
 						 GDAUI_DATA_PROXY_WRITE_ON_ROW_CHANGE);
 		gtk_widget_show (grid);
 
-		proxy = gdaui_data_proxy_get_proxy (GDAUI_DATA_PROXY (grid));
 		g_object_set (G_OBJECT (grid), "info-cell-visible", FALSE, NULL);
 
 		winfo = gdaui_data_proxy_info_new (GDAUI_DATA_PROXY (grid),
diff --git a/libgda-ui/internal/utility.c b/libgda-ui/internal/utility.c
index 04fac55..490ca6d 100644
--- a/libgda-ui/internal/utility.c
+++ b/libgda-ui/internal/utility.c
@@ -250,12 +250,11 @@ _gdaui_utility_proxy_compute_values_for_group (GdauiSetGroup *group, GdauiDataSt
 					       GdaDataModelIter *model_iter, 
 					       GtkTreeIter *tree_iter, gboolean model_values)
 {
-	gint offset;
 	GList *retval = NULL;
+#ifdef PROXY_STORE_EXTRA_VALUES
 	GdaDataProxy *proxy;
-
 	proxy = gdaui_data_store_get_proxy (store);
-	offset = gda_data_proxy_get_proxied_model_n_cols (proxy);
+#endif
 	if (!model_values) {
 		GSList *list;
 		GValue *value;
@@ -269,13 +268,17 @@ _gdaui_utility_proxy_compute_values_for_group (GdauiSetGroup *group, GdauiDataSt
 		}
 	}
 	else {
-		gint col, i, proxy_row;
+		gint col, i;
+#ifdef PROXY_STORE_EXTRA_VALUES
+		gint proxy_row;
+#endif
 		GdauiSetSource *source;
 		const GValue *value;
 		gboolean slow_way = FALSE;
 		gboolean ret_null = FALSE;
-
+#ifdef PROXY_STORE_EXTRA_VALUES
 		proxy_row = gdaui_data_store_get_row_from_iter (store, tree_iter);
+#endif
 		source = group->source;
 		for (i = 0 ; (i < source->shown_n_cols)  && !ret_null; i++) {
 			col = source->shown_cols_index[i];
diff --git a/libgda/gda-row.c b/libgda/gda-row.c
index 32b6f19..f236b10 100644
--- a/libgda/gda-row.c
+++ b/libgda/gda-row.c
@@ -40,7 +40,7 @@ struct _GdaRowPrivate {
 
         GValue       *fields; /* GValues */
 	GError      **errors; /* GError for each invalid value at the same position */
-        gint          nfields;
+        guint         nfields;
 };
 
 /* properties */
@@ -116,7 +116,7 @@ gda_row_finalize (GObject *object)
 	g_return_if_fail (GDA_IS_ROW (row));
 	
 	if (row->priv) {
-		gint i;
+		guint i;
 
 		for (i = 0; i < row->priv->nfields; i++) {
 			gda_value_set_null (&(row->priv->fields [i]));
@@ -145,10 +145,10 @@ gda_row_set_property (GObject *object,
         if (row->priv) {
                 switch (param_id) {
 		case PROP_NB_VALUES: {
-			gint i;
+			guint i;
 			g_return_if_fail (!row->priv->fields);
 
-			row->priv->nfields = g_value_get_int (value);
+			row->priv->nfields = (guint) g_value_get_int (value);
 			row->priv->fields = g_new0 (GValue, row->priv->nfields);
 			for (i = 0; i < row->priv->nfields; i++)
 				gda_value_set_null (& (row->priv->fields [i]));
@@ -242,7 +242,7 @@ GValue *
 gda_row_get_value (GdaRow *row, gint num)
 {
         g_return_val_if_fail (GDA_IS_ROW (row), NULL);
-        g_return_val_if_fail (num >= 0 && num < row->priv->nfields, NULL);
+        g_return_val_if_fail ((num >= 0) && ((guint) num < row->priv->nfields), NULL);
 
         return & (row->priv->fields[num]);
 }
diff --git a/libgda/gda-sql-builder.c b/libgda/gda-sql-builder.c
index 2464bb4..da09924 100644
--- a/libgda/gda-sql-builder.c
+++ b/libgda/gda-sql-builder.c
@@ -2044,7 +2044,7 @@ gda_sql_builder_import_expression (GdaSqlBuilder *builder, GdaSqlExpr *expr)
  * Since: 4.2
  */
 GdaSqlBuilderId
-gda_sql_builder_import_expression_from_builder (GdaSqlBuilder *builder, GdaSqlBuilder *query, GdaSqlBuilderId *expr_id)
+gda_sql_builder_import_expression_from_builder (GdaSqlBuilder *builder, GdaSqlBuilder *query, GdaSqlBuilderId expr_id)
 {
 	GdaSqlExpr *expr;
 	
@@ -2054,7 +2054,7 @@ gda_sql_builder_import_expression_from_builder (GdaSqlBuilder *builder, GdaSqlBu
 	g_return_val_if_fail (query->priv->main_stmt, 0);
 	g_return_val_if_fail (expr_id, 0);
 	
-	expr = gda_sql_builder_export_expression(query, expr_id);
+	expr = gda_sql_builder_export_expression (query, expr_id);
 	g_return_val_if_fail (GDA_SQL_ANY_PART (expr)->type == GDA_SQL_ANY_EXPR, 0);
 	return add_part (builder, (GdaSqlAnyPart *) gda_sql_expr_copy (expr));
 }
diff --git a/libgda/gda-sql-builder.h b/libgda/gda-sql-builder.h
index 215a0f4..515a95b 100644
--- a/libgda/gda-sql-builder.h
+++ b/libgda/gda-sql-builder.h
@@ -168,7 +168,7 @@ void              gda_sql_builder_compound_add_sub_select_from_builder (GdaSqlBu
 /* import/Export API */
 GdaSqlExpr       *gda_sql_builder_export_expression (GdaSqlBuilder *builder, GdaSqlBuilderId id);
 GdaSqlBuilderId gda_sql_builder_import_expression (GdaSqlBuilder *builder, GdaSqlExpr *expr);
-GdaSqlBuilderId gda_sql_builder_import_expression_from_builder (GdaSqlBuilder *builder, GdaSqlBuilder *query, GdaSqlBuilderId *expr_id);
+GdaSqlBuilderId gda_sql_builder_import_expression_from_builder (GdaSqlBuilder *builder, GdaSqlBuilder *query, GdaSqlBuilderId expr_id);
 
 G_END_DECLS
 
diff --git a/libgda/handlers/gda-handler-numerical.c b/libgda/handlers/gda-handler-numerical.c
index 7f9644c..d44abbb 100644
--- a/libgda/handlers/gda-handler-numerical.c
+++ b/libgda/handlers/gda-handler-numerical.c
@@ -346,7 +346,7 @@ gda_handler_numerical_get_value_from_str (GdaDataHandler *iface, const gchar *st
 		}
 	}
 	else if (type == G_TYPE_ULONG) {
-		if (!*endptr && (llint >= 0) && (llint <= G_MAXULONG)) {
+		if (!*endptr && (llint >= 0) && ((gulong) llint <= G_MAXULONG)) {
 			value = g_value_init (g_new0 (GValue, 1), G_TYPE_ULONG);
 			g_value_set_ulong (value, (gulong) llint);
 		}
diff --git a/libgda/sql-parser/gda-statement-struct-util.c b/libgda/sql-parser/gda-statement-struct-util.c
index baf155c..604bf2d 100644
--- a/libgda/sql-parser/gda-statement-struct-util.c
+++ b/libgda/sql-parser/gda-statement-struct-util.c
@@ -266,7 +266,6 @@ _string_is_identifier (const gchar *str)
 {
 	const gchar *ptr;
 	gchar *endptr;
-	gdouble d;
 	gchar c;
 
 	if (!str || !(*str)) 
@@ -285,7 +284,7 @@ _string_is_identifier (const gchar *str)
 		return TRUE;
 
 	/* @str is composed only of character that can be used in an identifier */
-	d = g_ascii_strtod (str, &endptr);
+	g_ascii_strtod (str, &endptr);
 	if (!*endptr)
 		/* @str is a number */
 		return FALSE;
diff --git a/libgda/sqlite/virtual/gda-vprovider-data-model.c b/libgda/sqlite/virtual/gda-vprovider-data-model.c
index 94ce799..6142af6 100644
--- a/libgda/sqlite/virtual/gda-vprovider-data-model.c
+++ b/libgda/sqlite/virtual/gda-vprovider-data-model.c
@@ -241,7 +241,10 @@ static sqlite3_module Module = {
 	virtualCommit,                /* xCommit - commit transaction */
 	virtualRollback,              /* xRollback - rollback transaction */
 	NULL,                         /* xFindFunction - function overloading */
-	virtualRename                 /* Rename - Notification that the table will be given a new name */
+	virtualRename,                /* Rename - Notification that the table will be given a new name */
+	NULL,                         /* xSavepoint */  
+	NULL,                         /* xRelease */
+	NULL                          /* xRollbackTo */
 };
 
 /*
diff --git a/providers/ldap/gda-ldap-provider.c b/providers/ldap/gda-ldap-provider.c
index 50b409c..35428cc 100644
--- a/providers/ldap/gda-ldap-provider.c
+++ b/providers/ldap/gda-ldap-provider.c
@@ -328,8 +328,7 @@ gda_ldap_provider_open_connection (GdaServerProvider *provider, GdaConnection *c
 			return FALSE;
 		}
         }
-	int param = (int) LDAP_OPT_ON;
-	res = ldap_set_option (cdata->handle, LDAP_OPT_RESTART, &param);
+	res = ldap_set_option (cdata->handle, LDAP_OPT_RESTART, LDAP_OPT_ON);
 
 #ifdef NO
 	if (use_ssl) {
diff --git a/providers/ldap/gda-ldap-util.c b/providers/ldap/gda-ldap-util.c
index afed931..4cd1c89 100644
--- a/providers/ldap/gda-ldap-util.c
+++ b/providers/ldap/gda-ldap-util.c
@@ -798,8 +798,7 @@ gdaprov_ldap_get_top_classes (GdaLdapConnection *cnc)
 		return NULL;
 	if (! cdata->classes_hash) {
 		/* force classes init */
-		GdaLdapClass *lcl;
-		lcl = gdaprov_ldap_get_class_info (cnc, "top");
+		gdaprov_ldap_get_class_info (cnc, "top");
 	}
 	return cdata->top_classes;
 }
diff --git a/providers/mdb/gda-mdb-provider.c b/providers/mdb/gda-mdb-provider.c
index 8f34d19..336e9c0 100644
--- a/providers/mdb/gda-mdb-provider.c
+++ b/providers/mdb/gda-mdb-provider.c
@@ -131,7 +131,8 @@ gda_mdb_provider_get_type (void)
 			NULL, NULL,
 			sizeof (GdaMdbProvider),
 			0,
-			(GInstanceInitFunc) gda_mdb_provider_init
+			(GInstanceInitFunc) gda_mdb_provider_init,
+			NULL
 		};
 		g_static_mutex_lock (&registering);
 		if (type == 0)
@@ -327,7 +328,7 @@ gda_mdb_provider_open_connection (GdaServerProvider *provider, GdaConnection *cn
 							   cdata, (GDestroyNotify) gda_mdb_free_cnc_data);
 
 	/* declare the virtual tables */
-	gint i;
+	guint i;
 	for (i = 0; i < cdata->mdb->num_catalog; i++) {
                 MdbCatalogEntry *entry;
 
@@ -392,7 +393,7 @@ gda_mdb_type_to_gda (int col_type)
 static GList *
 table_create_columns_func (LocalSpec *spec)
 {
-	gint j;
+	guint j;
         GList *columns = NULL;
 	MdbTableDef *mdb_table;
 	
@@ -427,7 +428,7 @@ table_create_model_func (LocalSpec *spec)
 	GdaDataModel *model;
 	MdbTableDef *mdb_table;
 	GType *coltypes;
-	gint c;
+	guint c;
 
 	char **bound_values;
 	int *bound_len;
diff --git a/providers/oracle/gda-oracle-blob-op.c b/providers/oracle/gda-oracle-blob-op.c
index c0f3718..9082f9f 100644
--- a/providers/oracle/gda-oracle-blob-op.c
+++ b/providers/oracle/gda-oracle-blob-op.c
@@ -58,7 +58,8 @@ gda_oracle_blob_op_get_type (void)
 			NULL,
 			sizeof (GdaOracleBlobOp),
 			0,
-			(GInstanceInitFunc) gda_oracle_blob_op_init
+			(GInstanceInitFunc) gda_oracle_blob_op_init,
+			NULL
 		};
 		g_static_mutex_lock (&registering);
 		if (type == 0)
@@ -176,7 +177,6 @@ static glong
 gda_oracle_blob_op_write (GdaBlobOp *op, GdaBlob *blob, glong offset)
 {
 	GdaOracleBlobOp *bop;
-	GdaBinary *bin;
 	glong nbwritten = -1;
 
 	g_return_val_if_fail (GDA_IS_ORACLE_BLOB_OP (op), -1);
@@ -215,6 +215,7 @@ gda_oracle_blob_op_write (GdaBlobOp *op, GdaBlob *blob, glong offset)
 	}
 	else {
 		/* write blob using bin->data and bin->binary_length */
+		GdaBinary *bin;
 		bin = (GdaBinary *) blob;
 		nbwritten = -1; TO_IMPLEMENT;
 	}
diff --git a/providers/oracle/gda-oracle-meta.c b/providers/oracle/gda-oracle-meta.c
index d955835..713705a 100644
--- a/providers/oracle/gda-oracle-meta.c
+++ b/providers/oracle/gda-oracle-meta.c
@@ -169,7 +169,7 @@ _gda_oracle_meta_udt (GdaServerProvider *prov, GdaConnection *cnc,
 		    GdaMetaStore *store, GdaMetaContext *context, GError **error,
 		    const GValue *udt_catalog, const GValue *udt_schema)
 {
-	GdaDataModel *model;
+	GdaDataModel *model = NULL;
 	gboolean retval = TRUE;
 
 	/* set internal holder's values from the arguments */
diff --git a/providers/oracle/gda-oracle-provider.c b/providers/oracle/gda-oracle-provider.c
index e6d075d..45d0358 100644
--- a/providers/oracle/gda-oracle-provider.c
+++ b/providers/oracle/gda-oracle-provider.c
@@ -329,7 +329,8 @@ gda_oracle_provider_get_type (void)
 			NULL, NULL,
 			sizeof (GdaOracleProvider),
 			0,
-			(GInstanceInitFunc) gda_oracle_provider_init
+			(GInstanceInitFunc) gda_oracle_provider_init,
+			NULL
 		};
 		g_static_mutex_lock (&registering);
 		if (type == 0)
@@ -1346,10 +1347,6 @@ oracle_render_select_target (GdaSqlSelectTarget *target, GdaSqlRenderingContext
         str = string->str;
         g_string_free (string, FALSE);
         return str;
-
- err:
-        g_string_free (string, TRUE);
-        return NULL;
 }
 
 static gchar *
diff --git a/providers/oracle/gda-oracle-pstmt.c b/providers/oracle/gda-oracle-pstmt.c
index 7003839..9317d1c 100644
--- a/providers/oracle/gda-oracle-pstmt.c
+++ b/providers/oracle/gda-oracle-pstmt.c
@@ -49,7 +49,8 @@ gda_oracle_pstmt_get_type (void)
 			NULL,
 			sizeof (GdaOraclePStmt),
 			0,
-			(GInstanceInitFunc) gda_oracle_pstmt_init
+			(GInstanceInitFunc) gda_oracle_pstmt_init,
+			NULL
 		};
 
 		g_static_mutex_lock (&registering);
diff --git a/providers/oracle/gda-oracle-recordset.c b/providers/oracle/gda-oracle-recordset.c
index c61b32c..40c0c7d 100644
--- a/providers/oracle/gda-oracle-recordset.c
+++ b/providers/oracle/gda-oracle-recordset.c
@@ -126,7 +126,8 @@ gda_oracle_recordset_get_type (void)
 			NULL,
 			sizeof (GdaOracleRecordset),
 			0,
-			(GInstanceInitFunc) gda_oracle_recordset_init
+			(GInstanceInitFunc) gda_oracle_recordset_init,
+			NULL
 		};
 		g_static_mutex_lock (&registering);
 		if (type == 0)
diff --git a/providers/postgres/gda-postgres-provider.c b/providers/postgres/gda-postgres-provider.c
index 8c7576d..3d5c101 100644
--- a/providers/postgres/gda-postgres-provider.c
+++ b/providers/postgres/gda-postgres-provider.c
@@ -1512,12 +1512,11 @@ gda_postgres_provider_statement_prepare (GdaServerProvider *provider, GdaConnect
 	/* actually prepare statement */
 	PGresult *pg_res;
 	gchar *prep_stm_name;
-	GdaConnectionEvent *event = NULL;
 
 	prep_stm_name = g_strdup_printf ("psc%d", counter ++);
 	pg_res = PQprepare (cdata->pconn, prep_stm_name, sql, 0, NULL);
 	if (!pg_res || (PQresultStatus (pg_res) != PGRES_COMMAND_OK)) {
-		event = _gda_postgres_make_error (cnc, cdata->pconn, pg_res, error);
+		_gda_postgres_make_error (cnc, cdata->pconn, pg_res, error);
 		g_free (prep_stm_name);
 		if (pg_res)
 			PQclear (pg_res);
@@ -1594,12 +1593,11 @@ prepare_stmt_simple (PostgresConnectionData *cdata, const gchar *sql, GError **e
 	static guint counter = 0; /* each prepared statement MUST have a unique name, ensured with this counter */
 	PGresult *pg_res;
 	gchar *prep_stm_name;
-	GdaConnectionEvent *event = NULL;
 
 	prep_stm_name = g_strdup_printf ("pss%d", counter++);
 	pg_res = PQprepare (cdata->pconn, prep_stm_name, sql, 0, NULL);
 	if (!pg_res || (PQresultStatus (pg_res) != PGRES_COMMAND_OK)) {
-		event = _gda_postgres_make_error (cdata->cnc, cdata->pconn, pg_res, error);
+		_gda_postgres_make_error (cdata->cnc, cdata->pconn, pg_res, error);
 		g_free (prep_stm_name);
 		if (pg_res)
 			PQclear (pg_res);
diff --git a/tools/browser/auth-dialog.c b/tools/browser/auth-dialog.c
index 3ee4873..dcc28d9 100644
--- a/tools/browser/auth-dialog.c
+++ b/tools/browser/auth-dialog.c
@@ -310,8 +310,7 @@ sub_thread_open_cnc (AuthData *ad, GError **error)
 #ifdef HAVE_LDAP
 	if (cnc && GDA_IS_LDAP_CONNECTION (cnc)) {
 		/* force classes init */
-		GdaLdapClass *lcl;
-		lcl = gda_ldap_get_class_info (GDA_LDAP_CONNECTION (cnc), "top");
+		gda_ldap_get_class_info (GDA_LDAP_CONNECTION (cnc), "top");
 	}
 #endif
 	return cnc;
diff --git a/tools/browser/browser-connection.c b/tools/browser/browser-connection.c
index 5cd0b85..d868997 100644
--- a/tools/browser/browser-connection.c
+++ b/tools/browser/browser-connection.c
@@ -2359,12 +2359,11 @@ wrapper_ldap_search (LdapSearchData *data, GError **error)
 	}
 	else {
 		GdaDataModel *wrapped;
-		gint nb;
 		wrapped = gda_data_access_wrapper_new (model);
 		g_object_unref (model);
 		/* force loading all the LDAP entries in memory to avoid
 		 * having the GTK thread lock on LDAP searches */
-		nb = gda_data_model_get_n_rows (wrapped);
+		gda_data_model_get_n_rows (wrapped);
 		return wrapped;
 	}
 }
diff --git a/tools/browser/browser-virtual-connection.c b/tools/browser/browser-virtual-connection.c
index 0eda6b4..d3364c8 100644
--- a/tools/browser/browser-virtual-connection.c
+++ b/tools/browser/browser-virtual-connection.c
@@ -348,7 +348,6 @@ browser_virtual_connection_new (const BrowserVirtualConnectionSpecs *specs, GErr
                 return NULL;
 
 	GMainLoop *loop;
-        guint source_id;
         MainloopData data;
 	
         loop = g_main_loop_new (NULL, FALSE);
@@ -358,7 +357,7 @@ browser_virtual_connection_new (const BrowserVirtualConnectionSpecs *specs, GErr
         data.loop = loop;
         data.cnc = NULL;
 
-        source_id = g_timeout_add (200, (GSourceFunc) check_for_cnc, &data);
+        g_timeout_add (200, (GSourceFunc) check_for_cnc, &data);
         g_main_loop_run (loop);
         g_main_loop_unref (loop);
 	g_object_unref (wrapper);
diff --git a/tools/browser/browser-window.c b/tools/browser/browser-window.c
index 0389e37..9690c0e 100644
--- a/tools/browser/browser-window.c
+++ b/tools/browser/browser-window.c
@@ -1438,8 +1438,7 @@ static GHashTable *hidden_contexts = NULL;
 static void
 hidden_contexts_foreach_save (const gchar *context, G_GNUC_UNUSED gint value, xmlNodePtr root)
 {
-	xmlNodePtr node;
-	node = xmlNewChild (root, NULL, BAD_CAST "hide-notice", BAD_CAST context);
+	xmlNewChild (root, NULL, BAD_CAST "hide-notice", BAD_CAST context);
 }
 
 static void
diff --git a/tools/browser/canvas/browser-canvas-column.c b/tools/browser/canvas/browser-canvas-column.c
index 36464e5..f6ff9f3 100644
--- a/tools/browser/canvas/browser-canvas-column.c
+++ b/tools/browser/canvas/browser-canvas-column.c
@@ -232,14 +232,12 @@ browser_canvas_column_new (GooCanvasItem *parent, GdaMetaStruct *mstruct, GdaMet
 			   gdouble x, gdouble y, ...)
 {
 	GooCanvasItem *item;
-	BrowserCanvasColumn *goocolumn;
 	const char *first_property;
 	va_list var_args;
 
 	g_return_val_if_fail (GDA_IS_META_STRUCT (mstruct), NULL);
 
 	item = g_object_new (TYPE_BROWSER_CANVAS_COLUMN, "meta-struct", mstruct, NULL);
-	goocolumn = (BrowserCanvasColumn*) item;
 
 	if (parent) {
 		goo_canvas_item_add_child (parent, item, -1);
diff --git a/tools/browser/canvas/browser-canvas-db-relations.c b/tools/browser/canvas/browser-canvas-db-relations.c
index 5e06408..04826b5 100644
--- a/tools/browser/canvas/browser-canvas-db-relations.c
+++ b/tools/browser/canvas/browser-canvas-db-relations.c
@@ -497,12 +497,11 @@ popup_func_add_depend_cb (G_GNUC_UNUSED GtkMenuItem *mitem, BrowserCanvasTable *
 		if (g_hash_table_lookup (dbrel->priv->hash_tables, fk->depend_on))
 			continue;
 
-		BrowserCanvasTable *new_item;
 		GValue *v1, *v2, *v3;
 		g_value_set_string ((v1 = gda_value_new (G_TYPE_STRING)), fk->depend_on->obj_catalog);
 		g_value_set_string ((v2 = gda_value_new (G_TYPE_STRING)), fk->depend_on->obj_schema);
 		g_value_set_string ((v3 = gda_value_new (G_TYPE_STRING)), fk->depend_on->obj_name);
-		new_item = browser_canvas_db_relations_add_table (dbrel, v1, v2, v3);
+		browser_canvas_db_relations_add_table (dbrel, v1, v2, v3);
 		gda_value_free (v1);
 		gda_value_free (v2);
 		gda_value_free (v3);
@@ -538,12 +537,12 @@ popup_func_add_ref_cb (G_GNUC_UNUSED GtkMenuItem *mitem, BrowserCanvasTable *ce)
 				continue;
 			if (g_hash_table_lookup (dbrel->priv->hash_tables, fkdbo))
 				continue;
-			BrowserCanvasTable *new_item;
+
 			GValue *v1, *v2, *v3;
 			g_value_set_string ((v1 = gda_value_new (G_TYPE_STRING)), fkdbo->obj_catalog);
 			g_value_set_string ((v2 = gda_value_new (G_TYPE_STRING)), fkdbo->obj_schema);
 			g_value_set_string ((v3 = gda_value_new (G_TYPE_STRING)), fkdbo->obj_name);
-			new_item = browser_canvas_db_relations_add_table (dbrel, v1, v2, v3);
+			browser_canvas_db_relations_add_table (dbrel, v1, v2, v3);
 			gda_value_free (v1);
 			gda_value_free (v2);
 			gda_value_free (v3);
diff --git a/tools/browser/canvas/browser-canvas.c b/tools/browser/canvas/browser-canvas.c
index 13fd8cb..0e9fa21 100644
--- a/tools/browser/canvas/browser-canvas.c
+++ b/tools/browser/canvas/browser-canvas.c
@@ -97,12 +97,9 @@ browser_canvas_get_type (void)
 static void
 browser_canvas_class_init (BrowserCanvasClass *klass)
 {
-	GtkWidgetClass *widget_class;
 	GObjectClass   *object_class = G_OBJECT_CLASS (klass);
 	parent_class = g_type_class_peek_parent (klass);
 
-	widget_class = (GtkWidgetClass *) klass;
-
 	/* signals */
 	canvas_signals[ITEM_SELECTED] =
 		g_signal_new ("item-selected",
@@ -681,8 +678,7 @@ browser_canvas_set_property (GObject *object,
 			   G_GNUC_UNUSED const GValue *value,
 			   GParamSpec *pspec)
 {
-	BrowserCanvas *canvas;
-	
+	BrowserCanvas *canvas;	
 	canvas = BROWSER_CANVAS (object);
 
 	switch (param_id) {
diff --git a/tools/browser/common/widget-overlay.c b/tools/browser/common/widget-overlay.c
index 34ecc34..37c1e52 100644
--- a/tools/browser/common/widget-overlay.c
+++ b/tools/browser/common/widget-overlay.c
@@ -350,6 +350,7 @@ widget_overlay_event (GtkWidget *widget, GdkEvent *event)
 {
 	GdkEventScroll *ev = (GdkEventScroll *) event;
 	WidgetOverlay *ovl = WIDGET_OVERLAY (widget);
+#ifdef GDA_DEBUG_NO
 	ChildData *cdevent = NULL;
 
 	/* find child */
@@ -362,7 +363,8 @@ widget_overlay_event (GtkWidget *widget, GdkEvent *event)
 			break;
 		}
 	}
-	/*g_print (" CH%d/%d", g_list_index (ovl->priv->children, cdevent), event->type);*/
+	g_print (" CH%d/%d", g_list_index (ovl->priv->children, cdevent), event->type);
+#endif
 
 	/* tooltip widgets handling */
 	gboolean tooltip_event = FALSE;
@@ -739,7 +741,7 @@ static void
 widget_overlay_size_request (GtkWidget *widget, GtkRequisition *req_min, GtkRequisition *req_nat)
 {
 	WidgetOverlay *ovl = WIDGET_OVERLAY (widget);
-	guint border_width;
+	gint border_width;
 	border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
 	req_min->width = 1;
 	req_min->height = 1;
@@ -989,7 +991,7 @@ widget_overlay_set_child_props (WidgetOverlay *ovl, GtkWidget *child, ...)
 				area.x = area.y = 0;
 
 			va_start (args, child);
-			for (prop = va_arg (args, WidgetOverlayChildProperty); prop != -1;
+			for (prop = va_arg (args, WidgetOverlayChildProperty); (gint) prop != -1;
 			     prop = va_arg (args, WidgetOverlayChildProperty)) {
 				switch (prop) {
 				case WIDGET_OVERLAY_CHILD_VALIGN:
diff --git a/tools/browser/data-manager/analyser.c b/tools/browser/data-manager/analyser.c
index 2f242fc..33a0648 100644
--- a/tools/browser/data-manager/analyser.c
+++ b/tools/browser/data-manager/analyser.c
@@ -58,9 +58,7 @@ data_manager_add_proposals_to_menu (GtkWidget *menu,
 			if (!select_field->validity_meta_table_column)
 				continue;
 			GdaMetaDbObject *dbo;
-			GdaMetaTableColumn *field;
 			dbo = select_field->validity_meta_object;
-			field = select_field->validity_meta_table_column;
 			if (dbo->obj_type == GDA_META_DB_TABLE) {
 				GdaMetaTable *mtable;
 				mtable = GDA_META_TABLE (dbo);
diff --git a/tools/browser/data-manager/data-console.c b/tools/browser/data-manager/data-console.c
index eb71a9f..27734f1 100644
--- a/tools/browser/data-manager/data-console.c
+++ b/tools/browser/data-manager/data-console.c
@@ -688,7 +688,6 @@ data_source_mgr_changed_cb (DataSourceManager *mgr, DataConsole *dconsole)
 	}
 
 	GdaSet *params;
-	gboolean show_variables = FALSE;
 	params = data_source_manager_get_params (mgr);
 	if (params) {
 		dconsole->priv->params_form = gdaui_basic_form_new (params);
@@ -696,7 +695,6 @@ data_source_mgr_changed_cb (DataSourceManager *mgr, DataConsole *dconsole)
 			      "show-actions", TRUE, NULL);
 		g_signal_connect (dconsole->priv->params_form, "activated",
 				  G_CALLBACK (param_activated_cb), dconsole);
-		show_variables = TRUE;
 	}
 	else {
 		dconsole->priv->params_form = gtk_label_new ("");
@@ -964,10 +962,8 @@ data_console_page_get_actions_ui (G_GNUC_UNUSED BrowserPage *page)
 static GtkWidget *
 data_console_page_get_tab_label (BrowserPage *page, GtkWidget **out_close_button)
 {
-	DataConsole *dconsole;
 	const gchar *tab_name;
 
-	dconsole = DATA_CONSOLE (page);
 	tab_name = _("Data manager");
 	return browser_make_tab_label_with_stock (tab_name,
 						  STOCK_CONSOLE,
diff --git a/tools/browser/ldap-browser/ldap-classes-page.c b/tools/browser/ldap-browser/ldap-classes-page.c
index 6ec7e88..0713d08 100644
--- a/tools/browser/ldap-browser/ldap-classes-page.c
+++ b/tools/browser/ldap-browser/ldap-classes-page.c
@@ -461,9 +461,8 @@ action_add_to_fav_cb (G_GNUC_UNUSED GtkAction *action, LdapClassesPage *ebrowser
 	BrowserFavorites *bfav;
         BrowserFavoritesAttributes fav;
         GError *error = NULL;
-	const gchar *tmp;
 
-	tmp = classes_view_get_current_class (CLASSES_VIEW (ebrowser->priv->classes_view));
+	classes_view_get_current_class (CLASSES_VIEW (ebrowser->priv->classes_view));
         memset (&fav, 0, sizeof (BrowserFavoritesAttributes));
         fav.id = -1;
         fav.type = BROWSER_FAVORITES_LDAP_CLASS;
@@ -612,11 +611,9 @@ ldap_classes_page_page_get_actions_ui (G_GNUC_UNUSED BrowserPage *page)
 static GtkWidget *
 ldap_classes_page_page_get_tab_label (BrowserPage *page, GtkWidget **out_close_button)
 {
-	LdapClassesPage *ebrowser;
 	const gchar *tab_name;
 	GdkPixbuf *classes_pixbuf;
 
-	ebrowser = LDAP_CLASSES_PAGE (page);
 	classes_pixbuf = browser_get_pixbuf_icon (BROWSER_ICON_LDAP_CLASS_STRUCTURAL);
 	tab_name = _("LDAP classes");
 	return browser_make_tab_label_with_pixbuf (tab_name,
diff --git a/tools/browser/ldap-browser/ldap-entries-page.c b/tools/browser/ldap-browser/ldap-entries-page.c
index 62ca69d..d13e5f1 100644
--- a/tools/browser/ldap-browser/ldap-entries-page.c
+++ b/tools/browser/ldap-browser/ldap-entries-page.c
@@ -466,9 +466,9 @@ action_add_to_fav_cb (G_GNUC_UNUSED GtkAction *action, LdapEntriesPage *ebrowser
 	BrowserFavorites *bfav;
         BrowserFavoritesAttributes fav;
         GError *error = NULL;
-	const gchar *tmp, *cn;
+	const gchar *cn;
 
-	tmp = hierarchy_view_get_current_dn (HIERARCHY_VIEW (ebrowser->priv->entries_view), &cn);
+	hierarchy_view_get_current_dn (HIERARCHY_VIEW (ebrowser->priv->entries_view), &cn);
         memset (&fav, 0, sizeof (BrowserFavoritesAttributes));
         fav.id = -1;
         fav.type = BROWSER_FAVORITES_LDAP_DN;
@@ -617,11 +617,9 @@ ldap_entries_page_page_get_actions_ui (G_GNUC_UNUSED BrowserPage *page)
 static GtkWidget *
 ldap_entries_page_page_get_tab_label (BrowserPage *page, GtkWidget **out_close_button)
 {
-	LdapEntriesPage *ebrowser;
 	const gchar *tab_name;
 	GdkPixbuf *entries_pixbuf;
 
-	ebrowser = LDAP_ENTRIES_PAGE (page);
 	entries_pixbuf = browser_get_pixbuf_icon (BROWSER_ICON_LDAP_ORGANIZATION);
 	tab_name = _("LDAP entries");
 	return browser_make_tab_label_with_pixbuf (tab_name,
diff --git a/tools/browser/ldap-browser/ldap-search-page.c b/tools/browser/ldap-browser/ldap-search-page.c
index 5728816..9af7b35 100644
--- a/tools/browser/ldap-browser/ldap-search-page.c
+++ b/tools/browser/ldap-browser/ldap-search-page.c
@@ -531,11 +531,9 @@ ldap_search_page_page_get_actions_ui (G_GNUC_UNUSED BrowserPage *page)
 static GtkWidget *
 ldap_search_page_page_get_tab_label (BrowserPage *page, GtkWidget **out_close_button)
 {
-	LdapSearchPage *epage;
 	const gchar *tab_name;
 	GdkPixbuf *search_pixbuf;
 
-	epage = LDAP_SEARCH_PAGE (page);
 	search_pixbuf = gtk_widget_render_icon_pixbuf (GTK_WIDGET (page), GTK_STOCK_FIND, GTK_ICON_SIZE_MENU);
 	tab_name = _("LDAP search");
 	return browser_make_tab_label_with_pixbuf (tab_name,
diff --git a/tools/browser/login-dialog.c b/tools/browser/login-dialog.c
index 3ef32d8..719b928 100644
--- a/tools/browser/login-dialog.c
+++ b/tools/browser/login-dialog.c
@@ -368,7 +368,6 @@ real_open_connection (const GdaDsnInfo *cncinfo, GError **error)
 		return NULL;
 
 	GMainLoop *loop;
-	guint source_id;
 	MainloopData data;
 
 	loop = g_main_loop_new (NULL, FALSE);
@@ -378,7 +377,7 @@ real_open_connection (const GdaDsnInfo *cncinfo, GError **error)
 	data.loop = loop;
 	data.cnc = NULL;
 
-	source_id = g_timeout_add (200, (GSourceFunc) check_for_cnc, &data);
+	g_timeout_add (200, (GSourceFunc) check_for_cnc, &data);
 	g_main_loop_run (loop);
 	g_main_loop_unref (loop);
 
diff --git a/tools/browser/mgr-favorites.c b/tools/browser/mgr-favorites.c
index a65d7e7..172400c 100644
--- a/tools/browser/mgr-favorites.c
+++ b/tools/browser/mgr-favorites.c
@@ -382,7 +382,6 @@ mgr_favorites_update_children (GdaTreeManager *manager, GdaTreeNode *node, const
 			BrowserFavoritesAttributes *fav = (BrowserFavoritesAttributes *) list->data;
 			GdaTreeNode* snode = NULL;
 			GValue *av;
-			gboolean newsnode = TRUE;
 
 			if (ehash)
 				snode = g_hash_table_lookup (ehash, &(fav->id));
@@ -391,7 +390,6 @@ mgr_favorites_update_children (GdaTreeManager *manager, GdaTreeNode *node, const
 			if (snode) {
 				/* use the same node */
 				g_object_ref (G_OBJECT (snode));
-				newsnode = FALSE;
 			}
 
 			if (fav->type == BROWSER_FAVORITES_TABLES) {
diff --git a/tools/browser/query-exec/query-console-page.c b/tools/browser/query-exec/query-console-page.c
index 5cae9eb..f26f96f 100644
--- a/tools/browser/query-exec/query-console-page.c
+++ b/tools/browser/query-exec/query-console-page.c
@@ -1241,10 +1241,8 @@ query_console_page_page_get_actions_ui (G_GNUC_UNUSED BrowserPage *page)
 static GtkWidget *
 query_console_page_page_get_tab_label (BrowserPage *page, GtkWidget **out_close_button)
 {
-	QueryConsolePage *tconsole;
 	const gchar *tab_name;
 
-	tconsole = QUERY_CONSOLE_PAGE (page);
 	tab_name = _("Query editor");
 	return browser_make_tab_label_with_stock (tab_name,
 						  STOCK_CONSOLE,



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