Bug#260426: libgda2: FTBFS with gcc-3.4: label at end of compound
statement
Andreas Jochens
Andreas Jochens <aj@andaco.de>, 260426@bugs.debian.org
Tue, 20 Jul 2004 16:58:27 +0200
Package: libgda2
Severity: normal
Tags: patch
When building 'libgda2' with gcc-3.4 I get the following error:
x86_64-linux-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libgda\" -DVERSION=\"1.0.4\" -DBONOBO_EXPLICIT_TRANSLATION_DOMAIN=\"libgda-2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DGETTEXT_PACKAGE=\"libgda-2\" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -DHAVE_ODBC=1 -DHAVE_MYSQL=1 -DHAVE_POSTGRES=1 -DHAVE_FREETDS_VER0_6X=1 -DHAVE_FREETDS=1 -DHAVE_SQLITE=1 -DHAVE_POPT_H=1 -DHAVE_READLINE_READLINE_H=1 -DHAVE_READLINE_HISTORY_H=1 -I. -I. -I.. -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -DLIBGDA_PLUGINDIR=\"/usr/lib/libgda/providers\" -DLIBGDA_LOCALEDIR=\"/usr/share/locale\" -DLIBGDA_GLOBAL_CONFIG_FILE=\"/etc/libgda/config\" -g -O2 -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -MT gda-util.lo -MD -MP -MF .deps/gda-util.Tpo -c gda-util.c -fPIC -DPIC -o .libs/gda-util.o
gda-util.c: In function `gda_type_to_string':
gda-util.c:64: error: label at end of compound statement
gda-util.c: In function `gda_sql_replace_placeholders':
gda-util.c:152: warning: passing arg 1 of `sql_parse' discards qualifiers from pointer target type
gda-util.c:146: warning: unused variable `str'
make[2]: *** [gda-util.lo] Error 1
make[2]: Leaving directory `/libgda2-1.0.4/build-tree/libgda-1.0.4/libgda'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/libgda2-1.0.4/build-tree/libgda-1.0.4'
make: *** [debian/stampdir/build-stamp] Error 2
With the attached patch 'libgda2' can be compiled using gcc-3.4.
Regards
Andreas Jochens
diff -urN ../tmp-orig/libgda2-1.0.4/debian/patches/003_gcc-3.4_fix.patch ./debian/patches/003_gcc-3.4_fix.patch
--- ../tmp-orig/libgda2-1.0.4/debian/patches/003_gcc-3.4_fix.patch 1970-01-01 01:00:00.000000000 +0100
+++ ./debian/patches/003_gcc-3.4_fix.patch 2004-07-20 16:43:37.283640576 +0200
@@ -0,0 +1,86 @@
+--- gda-util.c 2004-01-15 12:56:40.000000000 +0100
++++ libgda-1.0.4/libgda/gda-util.c 2004-07-20 15:33:52.641654120 +0200
+@@ -60,7 +60,6 @@
+ case GDA_VALUE_TYPE_TIME : return "time";
+ case GDA_VALUE_TYPE_TIMESTAMP : return "timestamp";
+ case GDA_VALUE_TYPE_TINYINT : return "tinyint";
+- default:
+ }
+
+ return "string";
+diff -urN tmp/providers/ldap/gda-ldap-provider.c libgda-1.0.4/providers/ldap/gda-ldap-provider.c
+--- tmp/providers/ldap/gda-ldap-provider.c 2003-02-03 18:12:13.000000000 +0100
++++ libgda-1.0.4/providers/ldap/gda-ldap-provider.c 2004-07-20 16:41:30.597709115 +0200
+@@ -275,7 +275,6 @@
+ switch (feature) {
+ case GDA_CONNECTION_FEATURE_SQL :
+ return TRUE;
+- default :
+ }
+
+ return FALSE;
+@@ -466,7 +465,6 @@
+ return get_ldap_tables (cnc, params);
+ case GDA_CONNECTION_SCHEMA_TYPES :
+ return get_ldap_types (cnc, params);
+- default :
+ }
+
+ return NULL;
+diff -urN tmp/providers/mysql/gda-mysql-provider.c libgda-1.0.4/providers/mysql/gda-mysql-provider.c
+--- tmp/providers/mysql/gda-mysql-provider.c 2003-11-26 22:01:22.000000000 +0100
++++ libgda-1.0.4/providers/mysql/gda-mysql-provider.c 2004-07-20 16:40:32.877135258 +0200
+@@ -510,7 +510,6 @@
+
+ g_free (str);
+ break;
+- default:
+ }
+
+ return reclist;
+@@ -655,7 +654,6 @@
+ case GDA_CONNECTION_FEATURE_SQL :
+ case GDA_CONNECTION_FEATURE_TRANSACTIONS :
+ return TRUE;
+- default :
+ }
+
+ return FALSE;
+@@ -1187,7 +1185,6 @@
+ return get_mysql_tables (cnc, params);
+ case GDA_CONNECTION_SCHEMA_TYPES :
+ return get_mysql_types (cnc, params);
+- default :
+ }
+
+ return NULL;
+diff -urN tmp/providers/sqlite/gda-sqlite-provider.c libgda-1.0.4/providers/sqlite/gda-sqlite-provider.c
+--- tmp/providers/sqlite/gda-sqlite-provider.c 2004-07-20 16:07:47.549789000 +0200
++++ libgda-1.0.4/providers/sqlite/gda-sqlite-provider.c 2004-07-20 16:41:01.180532007 +0200
+@@ -624,7 +624,6 @@
+ case GDA_CONNECTION_FEATURE_TRIGGERS :
+ case GDA_CONNECTION_FEATURE_VIEWS :
+ return TRUE;
+- default:
+ }
+
+ return FALSE;
+@@ -810,7 +809,6 @@
+ return get_tables (cnc);
+ case GDA_CONNECTION_SCHEMA_TYPES :
+ return get_types ();
+- default:
+ }
+
+ return NULL;
+diff -urN tmp/providers/xml/gda-xml-provider.c libgda-1.0.4/providers/xml/gda-xml-provider.c
+--- tmp/providers/xml/gda-xml-provider.c 2003-09-02 01:55:02.000000000 +0200
++++ libgda-1.0.4/providers/xml/gda-xml-provider.c 2004-07-20 16:41:47.837297080 +0200
+@@ -681,7 +681,6 @@
+ return get_tables (cnc, xmldb);
+ case GDA_CONNECTION_SCHEMA_TYPES :
+ return get_types (cnc);
+- default :
+ }
+
+ return NULL;