[gnome-db] patch to remove almost all warnings under libgda/libgda



	Here it goes! This one removes almost all warnings under
	libgda/libgda except for 2 unused static functions in
	gda-xql-select.c and gda-xql-item.c.

	If everything is ok, I'll apply it.

	Bye!

? diff
? warnings-libgda.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libgda/libgda/ChangeLog,v
retrieving revision 1.77
diff -u -r1.77 ChangeLog
--- ChangeLog	2002/01/15 12:33:51	1.77
+++ ChangeLog	2002/01/15 14:24:50
@@ -14,6 +14,20 @@
 	* gda-value.[ch]:
 	* gda-row.[ch]: changed 'long long' by 'gint64'. Removed all warnings.
 	Added some missing const to *value_new_*.
+
+	* gda-config.c:
+	* gda-data-model-array.c:
+	* gda-error.c:
+	* gda-parameter.c:
+	* gda-recordset.c:
+	* gda-server-connection.c:
+	* gda-server-recordset-model.c:
+	* gda-server.c:
+	* gda-util.c:
+	* gda-xml-database.c:
+	* gda-xml-document.c:
+	* gda-xql-query.c: removed all warnings except for unused static
+	functions in gda-xql-select.c and gda-xql-item.c.
 	
 2002-01-14  Rodrigo Moya <rodrigo gnome-db org>
 
Index: gda-config.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-config.c,v
retrieving revision 1.13
diff -u -r1.13 gda-config.c
--- gda-config.c	2002/01/11 16:37:47	1.13
+++ gda-config.c	2002/01/15 14:24:50
@@ -482,8 +482,6 @@
 void
 gda_config_remove_listener (guint id)
 {
-	GList *l;
-
 	gconf_client_notify_remove (get_conf_client (), id);
 }
 
@@ -714,22 +712,22 @@
 		info->name = g_strdup ((const gchar *) l->data);
 
 		/* get the provider */
-		tmp = g_strdup_printf ("%s/%s/Provider", GDA_CONFIG_SECTION_DATASOURCES, l->data);
+		tmp = g_strdup_printf ("%s/%s/Provider", GDA_CONFIG_SECTION_DATASOURCES, (char *) l->data);
 		info->provider = gda_config_get_string (tmp);
 		g_free (tmp);
 
 		/* get the connection string */
-		tmp = g_strdup_printf ("%s/%s/DSN", GDA_CONFIG_SECTION_DATASOURCES, l->data);
+		tmp = g_strdup_printf ("%s/%s/DSN", GDA_CONFIG_SECTION_DATASOURCES, (char *) l->data);
 		info->cnc_string = gda_config_get_string (tmp);
 		g_free (tmp);
 
 		/* get the description */
-		tmp = g_strdup_printf ("%s/%s/Description", GDA_CONFIG_SECTION_DATASOURCES, l->data);
+		tmp = g_strdup_printf ("%s/%s/Description", GDA_CONFIG_SECTION_DATASOURCES, (char *) l->data);
 		info->description = gda_config_get_string (tmp);
 		g_free (tmp);
 
 		/* get the user name */
-		tmp = g_strdup_printf ("%s/%s/Username", GDA_CONFIG_SECTION_DATASOURCES, l->data);
+		tmp = g_strdup_printf ("%s/%s/Username", GDA_CONFIG_SECTION_DATASOURCES, (char *) l->data);
 		info->username = gda_config_get_string (tmp);
 		g_free (tmp);
 
Index: gda-data-model-array.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-data-model-array.c,v
retrieving revision 1.5
diff -u -r1.5 gda-data-model-array.c
--- gda-data-model-array.c	2002/01/11 16:37:47	1.5
+++ gda-data-model-array.c	2002/01/15 14:24:50
@@ -204,7 +204,7 @@
 	g_return_if_fail (GDA_IS_DATA_MODEL_ARRAY (model));
 	g_return_if_fail (values != NULL);
 
-	len = g_list_length (values);
+	len = g_list_length ((GList *) values);
 	if (len != model->priv->number_of_columns)
 		return;
 
@@ -212,7 +212,7 @@
 		GList *l;
 		GdaValue *new_value;
 
-		l = g_list_nth (values, i);
+		l = g_list_nth ((GList *) values, i);
 		if (!l)
 			return;
 
Index: gda-error.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-error.c,v
retrieving revision 1.4
diff -u -r1.4 gda-error.c
--- gda-error.c	2002/01/11 16:37:47	1.4
+++ gda-error.c	2002/01/15 14:24:50
@@ -186,7 +186,6 @@
 {
 	GNOME_Database_DriverError *exception;
 	GNOME_Database_ErrorSeq *corba_errors;
-	gint count;
 	gint i;
 
 	g_return_if_fail (ev != NULL);
Index: gda-parameter.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-parameter.c,v
retrieving revision 1.12
diff -u -r1.12 gda-parameter.c
--- gda-parameter.c	2002/01/11 16:37:48	1.12
+++ gda-parameter.c	2002/01/15 14:24:50
@@ -51,13 +51,12 @@
 gda_parameter_new (const gchar *name, GdaValueType type)
 {
 	GdaParameter *param;
-	const gchar *static_data = NULL;
 
 	param = GNOME_Database_Parameter__alloc ();
 	if (name)
 		gda_parameter_set_name (param, name);
 	CORBA_any_set_release (&param->value, TRUE);
-	param->value._type = CORBA_Object_duplicate ((CORBA_Object) type, NULL);
+	param->value._type = (GdaValueType) CORBA_Object_duplicate ((CORBA_Object) type, NULL);
 
 	return param;
 }
@@ -189,7 +188,7 @@
 {
 	gpointer orig_key;
 	gpointer orig_value;
-	gchar *name;
+	const gchar *name;
 
 	g_return_if_fail (plist != NULL);
 	g_return_if_fail (param != NULL);
Index: gda-recordset.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-recordset.c,v
retrieving revision 1.8
diff -u -r1.8 gda-recordset.c
--- gda-recordset.c	2002/01/11 16:37:48	1.8
+++ gda-recordset.c	2002/01/15 14:24:50
@@ -47,7 +47,7 @@
 	LAST_SIGNAL
 };
 
-static gint gda_recordset_signals[LAST_SIGNAL] = { 0, };
+//static gint gda_recordset_signals[LAST_SIGNAL] = { 0, };
 static GObjectClass *parent_class = NULL;
 
 /*
Index: gda-server-connection.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-server-connection.c,v
retrieving revision 1.18
diff -u -r1.18 gda-server-connection.c
--- gda-server-connection.c	2002/01/14 15:00:53	1.18
+++ gda-server-connection.c	2002/01/15 14:24:50
@@ -278,7 +278,7 @@
 
 	bonobo_return_val_if_fail (GDA_IS_SERVER_CONNECTION (cnc), CORBA_OBJECT_NIL, ev);
 
-	plist = gda_parameter_list_new_from_corba (params);
+	plist = gda_parameter_list_new_from_corba ((GNOME_Database_ParameterList *) params);
 	recset = gda_server_provider_get_schema (cnc->priv->provider, cnc, schema, plist);
 	gda_parameter_list_free (plist);
 
Index: gda-server-recordset-model.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-server-recordset-model.c,v
retrieving revision 1.3
diff -u -r1.3 gda-server-recordset-model.c
--- gda-server-recordset-model.c	2002/01/11 16:37:48	1.3
+++ gda-server-recordset-model.c	2002/01/15 14:24:50
@@ -297,5 +297,5 @@
 gda_server_recordset_model_append_row (GdaServerRecordsetModel *recset, const GList *values)
 {
 	g_return_if_fail (GDA_IS_SERVER_RECORDSET_MODEL (recset));
-	gda_data_model_array_append_row (recset->priv->model, values);
+	gda_data_model_array_append_row (GDA_DATA_MODEL_ARRAY (recset->priv->model), values);
 }
Index: gda-server.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-server.c,v
retrieving revision 1.10
diff -u -r1.10 gda-server.c
--- gda-server.c	2002/01/14 01:46:51	1.10
+++ gda-server.c	2002/01/15 14:24:50
@@ -65,7 +65,6 @@
 static void
 component_destroyed_cb (BonoboObject *object, gpointer user_data)
 {
-	GList *l;
 	GdaServer *server = (GdaServer *) user_data;
 
 	g_return_if_fail (GDA_IS_SERVER (server));
Index: gda-util.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-util.c,v
retrieving revision 1.2
diff -u -r1.2 gda-util.c
--- gda-util.c	2002/01/11 16:37:48	1.2
+++ gda-util.c	2002/01/15 14:24:50
@@ -26,10 +26,13 @@
 /**
  * gda_file_load
  * @uri: URI for the file to be loaded.
+ *
+ * NOT IMPLEMENTED YET!
  */
 gchar *
 gda_file_load (const gchar *uri)
 {
+	return NULL;
 }
 
 /**
Index: gda-xml-database.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-xml-database.c,v
retrieving revision 1.6
diff -u -r1.6 gda-xml-database.c
--- gda-xml-database.c	2002/01/11 16:37:48	1.6
+++ gda-xml-database.c	2002/01/15 14:24:50
@@ -22,6 +22,8 @@
 
 #include <config.h>
 #include <libgda/gda-xml-database.h>
+#include <libgda/gda-util.h>
+#include <libgda/gda-log.h>
 #include <bonobo/bonobo-i18n.h>
 
 struct _GdaXmlDatabasePrivate {
Index: gda-xml-document.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-xml-document.c,v
retrieving revision 1.4
diff -u -r1.4 gda-xml-document.c
--- gda-xml-document.c	2002/01/11 16:37:48	1.4
+++ gda-xml-document.c	2002/01/15 14:24:50
@@ -23,6 +23,7 @@
 
 #include "config.h"
 #include "gda-xml-document.h"
+#include <libgda/gda-util.h>
 #include <glib-object.h>
 
 static void gda_xml_document_class_init (GdaXmlDocumentClass *klass);
Index: gda-xql-query.c
===================================================================
RCS file: /cvs/gnome/libgda/libgda/gda-xql-query.c,v
retrieving revision 1.2
diff -u -r1.2 gda-xql-query.c
--- gda-xql-query.c	2002/01/11 16:37:48	1.2
+++ gda-xql-query.c	2002/01/15 14:24:50
@@ -97,8 +97,8 @@
   xmlNode *node;
   GdaXqlItemClass *klass = GDA_XQL_ITEM_CLASS (xqlitem);
 
-  g_return_if_fail (GDA_IS_XQL_ITEM (xqlitem));
-  g_return_if_fail (parent != NULL);
+  g_return_val_if_fail (GDA_IS_XQL_ITEM (xqlitem), NULL);
+  g_return_val_if_fail (parent != NULL, NULL);
 
   node =  klass->to_dom (xqlitem, parent);
 


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