[gnome-db] Getting rid of warnings
- From: Gonzalo Paniagua Javier <gpanjav tquevedo hispalinux es>
- To: Gnome-db list <gnome-db-list gnome org>
- Subject: [gnome-db] Getting rid of warnings
- Date: Wed, 19 Sep 2001 23:07:37 +0200
Hi all!
As a first approach to gnome-db and libgda source code, I am
modifying it to remove the warnings I get in compiling.
I'm sending here a first set of patches (including the warnings
that I get rid of).
As for now, I haven't found any dangerous warning (i.e., any
warning that could be the cause of a bug), but may be there are.
If you are interested in this kind of 'code-cleaning' job I will
continue it and I will send patches as I get through the code.
Regards.
gda-error.c: In function `gda_error_list_to_corba_seq':
gda-error.c:265: warning: assignment discards qualifiers from pointer target type
gda-error.c:266: warning: assignment discards qualifiers from pointer target type
gda-error.c:267: warning: assignment discards qualifiers from pointer target type
gda-error.c:268: warning: assignment discards qualifiers from pointer target type
gda-xml-item.c: In function `gda_xml_item_class_to_dom':
gda-xml-item.c:194: warning: assignment makes pointer from integer without a cast
gda-batch.c: In function `gda_batch_clear':
gda-batch.c:246: warning: passing arg 2 of `g_list_foreach' from incompatible pointer type
gda-connection-pool.c: In function `gda_connection_pool_class_init':
gda-connection-pool.c:125: warning: assignment from incompatible pointer type
gda-connection.c: In function `gda_connection_class_init':
gda-connection.c:138: warning: assignment from incompatible pointer type
gda-connection.c: In function `get_corba_connection':
gda-connection.c:192: warning: assignment makes pointer from integer without a cast
gda-export.c: In function `run_export_cb':
gda-export.c:132: warning: passing arg 3 of `gda_command_execute' makes integer from pointer without a cast
gda-field.c: In function `gda_field_get_date_value':
gda-field.c:455: warning: passing arg 1 of `localtime' from incompatible pointer type
gda-recordset.c: In function `gda_recordset_class_init':
gda-recordset.c:138: warning: assignment from incompatible pointer type
gda-recordset.c: In function `gda_recordset_open':
gda-recordset.c:751: warning: assignment makes pointer from integer without a cast
diff -ur libgda/lib/gda-client/gda-batch.c libgda-modif/lib/gda-client/gda-batch.c
--- libgda/lib/gda-client/gda-batch.c Mon Jul 23 01:59:22 2001
+++ libgda-modif/lib/gda-client/gda-batch.c Wed Sep 19 22:23:18 2001
@@ -243,7 +243,7 @@
job->cnc = 0;
job->is_running = FALSE;
- g_list_foreach (job->commands, g_free, 0);
+ g_list_foreach (job->commands, (GFunc) g_free, 0);
g_list_free (job->commands);
job->commands = 0;
}
diff -ur libgda/lib/gda-client/gda-command.h libgda-modif/lib/gda-client/gda-command.h
--- libgda/lib/gda-client/gda-command.h Mon Jul 23 01:59:22 2001
+++ libgda-modif/lib/gda-client/gda-command.h Wed Sep 19 22:44:04 2001
@@ -79,6 +79,7 @@
void gda_command_create_parameter (GdaCommand * cmd, gchar * name,
GDA_ParameterDirection inout,
GDA_Value * value);
+GDA_CmdParameterSeq *__gda_command_get_params (GdaCommand * cmd);
G_END_DECLS
diff -ur libgda/lib/gda-client/gda-connection-pool.c libgda-modif/lib/gda-client/gda-connection-pool.c
--- libgda/lib/gda-client/gda-connection-pool.c Mon Jul 23 01:59:22 2001
+++ libgda-modif/lib/gda-client/gda-connection-pool.c Wed Sep 19 22:28:41 2001
@@ -122,7 +122,7 @@
gda_connection_pool_signals,
LAST_SIGNAL);
- object_class->destroy = gda_connection_pool_destroy;
+ object_class->destroy = (void (*)(GtkObject *)) gda_connection_pool_destroy;
klass->open = NULL;
klass->error = NULL;
}
diff -ur libgda/lib/gda-client/gda-connection.c libgda-modif/lib/gda-client/gda-connection.c
--- libgda/lib/gda-client/gda-connection.c Wed Sep 5 14:20:52 2001
+++ libgda-modif/lib/gda-client/gda-connection.c Wed Sep 19 22:31:50 2001
@@ -23,6 +23,7 @@
#include "gda-corba.h"
#include "gda-connection.h"
#include "gda-command.h"
+#include <bonobo.h>
#include <gtk/gtksignal.h>
@@ -135,7 +136,7 @@
gtk_object_class_add_signals (object_class, gda_connection_signals,
LAST_SIGNAL);
- object_class->destroy = gda_connection_destroy;
+ object_class->destroy = (void (*)(GtkObject *))gda_connection_destroy;
klass->error = gda_connection_real_error;
klass->warning = gda_connection_real_warning;
klass->close = NULL;
diff -ur libgda/lib/gda-client/gda-export.c libgda-modif/lib/gda-client/gda-export.c
--- libgda/lib/gda-client/gda-export.c Sat Sep 15 19:38:31 2001
+++ libgda-modif/lib/gda-client/gda-export.c Wed Sep 19 22:33:28 2001
@@ -129,7 +129,7 @@
gda_command_set_cmd_type (cmd, GDA_COMMAND_TYPE_TABLE);
gda_command_set_text (cmd, name);
- recset = gda_command_execute (cmd, &reccount, NULL);
+ recset = gda_command_execute (cmd, &reccount, 0);
if (!GDA_IS_RECORDSET (recset)) {
gda_command_free (cmd);
gda_export_stop (exp);
diff -ur libgda/lib/gda-client/gda-field.c libgda-modif/lib/gda-client/gda-field.c
--- libgda/lib/gda-client/gda-field.c Sat Sep 15 19:38:31 2001
+++ libgda-modif/lib/gda-client/gda-field.c Wed Sep 19 22:35:34 2001
@@ -452,7 +452,7 @@
if (field->attributes->gdaType == GDA_TypeDate) {
struct tm *stm;
- stm = localtime (&field->real_value->_u.v._u.d);
+ stm = localtime ((time_t) &field->real_value->_u.v._u.d);
if (stm != NULL) {
dt = g_date_new_dmy (stm->tm_mday,
stm->tm_mon,
diff -ur libgda/lib/gda-client/gda-recordset.c libgda-modif/lib/gda-client/gda-recordset.c
--- libgda/lib/gda-client/gda-recordset.c Wed Sep 5 14:20:52 2001
+++ libgda-modif/lib/gda-client/gda-recordset.c Wed Sep 19 22:41:19 2001
@@ -23,6 +23,7 @@
#include "config.h"
#include "gda-recordset.h"
+#include "gda-command.h"
#include <gtk/gtksignal.h>
@@ -135,7 +136,7 @@
klass->eof = NULL;
klass->bof = NULL;
klass->row_changed = NULL;
- object_class->destroy = gda_recordset_destroy;
+ object_class->destroy = (void (*)(GtkObject *))gda_recordset_destroy;
}
static void
diff -ur libgda/lib/gda-common/gda-error.c libgda-modif/lib/gda-common/gda-error.c
--- libgda/lib/gda-common/gda-error.c Fri Aug 3 16:20:16 2001
+++ libgda-modif/lib/gda-common/gda-error.c Wed Sep 19 22:06:16 2001
@@ -260,7 +260,7 @@
GdaError *error = GDA_ERROR (l->data);
if (GDA_IS_ERROR (error)) {
- gchar *desc, *source, *state, *native;
+ const gchar *desc, *source, *state, *native;
desc = gda_error_get_description (error);
source = gda_error_get_source (error);
diff -ur libgda/lib/gda-common/gda-xml-item.c libgda-modif/lib/gda-common/gda-xml-item.c
--- libgda/lib/gda-common/gda-xml-item.c Thu Jul 19 00:50:30 2001
+++ libgda-modif/lib/gda-common/gda-xml-item.c Wed Sep 19 22:18:55 2001
@@ -23,6 +23,7 @@
#include "config.h"
#include "gda-xml-item.h"
+#include "gda-xml-util.h"
#include "gda-util.h"
#ifdef ENABLE_NLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]