Re: [gnome-db] Getting rid of warnings
- From: Gonzalo Paniagua Javier <gonzalo torresquevedo hispalinux es>
- To: Gnome-db list <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Getting rid of warnings
- Date: Mon, 24 Sep 2001 13:52:35 +0200
Hi!
I'm sending here a few more patches. This time there are two
that probably solve some problems.
One of them (look in the patch file for
'gda_server_connection_create_table) is forcing a const variable
to be non-const. May be this is not what it should be done...
Does 'gda_server_connection_create_table' really need the row
attributes to be non-const?
In the file libgda/tools/gda-run.c there are two mistakes: the
first one calls gda_init() using &argc instead of argc; and the
second calls fprintf() without the first argument (!).
With this patch, there are no more warnings under libgda/lib/
and libgda/tools :-).
bye!
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 22 00:18:16 2001
+++ libgda-modif/lib/gda-client/gda-field.c Mon Sep 24 12:32:49 2001
@@ -452,7 +452,7 @@
if (field->attributes->gdaType == GDA_TypeDate) {
struct tm *stm;
- stm = localtime ((time_t) &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-server/gda-server-command.c libgda-modif/lib/gda-server/gda-server-command.c
--- libgda/lib/gda-server/gda-server-command.c Thu Jul 19 00:50:31 2001
+++ libgda-modif/lib/gda-server/gda-server-command.c Mon Sep 24 12:41:54 2001
@@ -47,7 +47,7 @@
void
impl_GDA_Command__set_text (PortableServer_Servant servant,
- CORBA_char * value, CORBA_Environment * ev)
+ const CORBA_char * value, CORBA_Environment * ev)
{
GdaServerCommand *cmd =
(GdaServerCommand *) bonobo_x_object (servant);
@@ -77,9 +77,9 @@
GDA_Recordset
impl_GDA_Command_open (PortableServer_Servant servant,
- GDA_CmdParameterSeq * param,
- GDA_CursorType ct,
- GDA_LockType lt,
+ const GDA_CmdParameterSeq * param,
+ const GDA_CursorType ct,
+ const GDA_LockType lt,
CORBA_unsigned_long * affected, CORBA_Environment * ev)
{
GdaError *error;
diff -ur libgda/lib/gda-server/gda-server-connection.c libgda-modif/lib/gda-server/gda-server-connection.c
--- libgda/lib/gda-server/gda-server-connection.c Wed Aug 1 02:52:52 2001
+++ libgda-modif/lib/gda-server/gda-server-connection.c Mon Sep 24 12:54:54 2001
@@ -113,9 +113,9 @@
CORBA_long
impl_GDA_Connection_open (PortableServer_Servant servant,
- CORBA_char * dsn,
- CORBA_char * user,
- CORBA_char * passwd, CORBA_Environment * ev)
+ const CORBA_char * dsn,
+ const CORBA_char * user,
+ const CORBA_char * passwd, CORBA_Environment * ev)
{
GdaServerConnection *cnc = (GdaServerConnection *) bonobo_x_object (servant);
@@ -133,8 +133,8 @@
GDA_Recordset
impl_GDA_Connection_openSchema (PortableServer_Servant servant,
- GDA_Connection_QType t,
- GDA_Connection_ConstraintSeq * constraints,
+ const GDA_Connection_QType t,
+ const GDA_Connection_ConstraintSeq * constraints,
CORBA_Environment * ev)
{
GdaServerConnection *cnc =
@@ -163,8 +163,8 @@
CORBA_long
impl_GDA_Connection_modifySchema (PortableServer_Servant servant,
- GDA_Connection_QType t,
- GDA_Connection_ConstraintSeq * constraints,
+ const GDA_Connection_QType t,
+ const GDA_Connection_ConstraintSeq * constraints,
CORBA_Environment * ev)
{
GdaServerConnection *cnc =
@@ -224,7 +224,7 @@
CORBA_long
impl_GDA_Connection_startLogging (PortableServer_Servant servant,
- CORBA_char * filename,
+ const CORBA_char * filename,
CORBA_Environment * ev)
{
return -1;
@@ -239,8 +239,8 @@
CORBA_char *
impl_GDA_Connection_createTable (PortableServer_Servant servant,
- CORBA_char * name,
- GDA_RowAttributes * columns,
+ const CORBA_char * name,
+ const GDA_RowAttributes * columns,
CORBA_Environment * ev)
{
CORBA_char *retval;
@@ -249,7 +249,7 @@
g_return_if_fail (GDA_IS_SERVER_CONNECTION (cnc));
- retval = gda_server_connection_create_table (cnc, columns);
+ retval = gda_server_connection_create_table (cnc, (GDA_RowAttributes *) columns);
if (!retval)
gda_error_list_to_exception (cnc->errors, ev);
return retval;
@@ -269,7 +269,7 @@
CORBA_char *
impl_GDA_Connection_sql2xml (PortableServer_Servant servant,
- CORBA_char * sql, CORBA_Environment * ev)
+ const CORBA_char * sql, CORBA_Environment * ev)
{
GdaServerConnection *cnc =
(GdaServerConnection *) bonobo_x_object (servant);
@@ -278,7 +278,7 @@
CORBA_char *
impl_GDA_Connection_xml2sql (PortableServer_Servant servant,
- CORBA_char * xml, CORBA_Environment * ev)
+ const CORBA_char * xml, CORBA_Environment * ev)
{
GdaServerConnection *cnc =
(GdaServerConnection *) bonobo_x_object (servant);
diff -ur libgda/lib/gda-server/gda-server-field.c libgda-modif/lib/gda-server/gda-server-field.c
--- libgda/lib/gda-server/gda-server-field.c Thu Jul 19 00:50:31 2001
+++ libgda-modif/lib/gda-server/gda-server-field.c Mon Sep 24 12:56:25 2001
@@ -176,7 +176,7 @@
g_return_if_fail (field != NULL);
field->value->_d = GDA_TypeDbTime;
- stm = localtime (&val);
+ stm = localtime ((time_t *) &val);
if (stm) {
field->value->_u.dbt.hour = stm->tm_hour;
field->value->_u.dbt.minute = stm->tm_min;
@@ -203,7 +203,7 @@
g_return_if_fail (field != 0);
field->value->_d = GDA_TypeDbTimestamp;
- stm = localtime (&tim);
+ stm = localtime ((time_t *) &tim);
memset (&field->value->_u.dbtstamp, 0,
sizeof (field->value->_u.dbtstamp));
if (dat) {
diff -ur libgda/tools/gda-run.c libgda-modif/tools/gda-run.c
--- libgda/tools/gda-run.c Mon Jul 23 01:59:23 2001
+++ libgda-modif/tools/gda-run.c Mon Sep 24 13:04:47 2001
@@ -89,7 +89,7 @@
gchar* real_dsn = 0;
/* initialization */
- gda_init("gda-run", VERSION, &argc, argv);
+ gda_init("gda-run", VERSION, argc, argv);
orb = gda_corba_get_orb();
/* check parameters */
@@ -141,7 +141,7 @@
{
/* run batch job */
if (!gda_batch_start(job))
- fprintf("%s: there were errors running transaction\n", argv[0]);
+ fprintf(stderr, "%s: there were errors running transaction\n", argv[0]);
}
else fprintf(stderr, "%s: error loading file %s\n", argv[0], file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]