Bug#260419: libgnomedb: FTBFS with gcc-3.4: label at end of
compound statement
Andreas Jochens
Andreas Jochens <aj@andaco.de>, 260419@bugs.debian.org
Tue, 20 Jul 2004 16:16:19 +0200
Package: libgnomedb
Severity: normal
Tags: patch
When building 'libgnomedb' with gcc-3.4 I get the following error:
x86_64-linux-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libgnomedb\" -DVERSION=\"1.0.4\" -DGNOME_DB_EXPLICIT_TRANSLATION_DOMAIN=\"libgnomedb-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=\"libgnomedb-2\" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DENABLE_NLS=1 -I. -I. -I.. -I.. -DXTHREADS -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -DXTHREADS -I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHAVE_LIBGLADE -DORBIT2=1 -pthread -DXTHREADS -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/libbonoboui-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/bonobo-activation-2.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/libxml2 -DBUILD_WITH_GNOME -DLIBGNOMEDB_ICONSDIR=\"/usr/share/pixmaps/libgnomedb\" -DLIBGNOMEDB_DATADIR=\"/usr/share/gnome-db\" -DLIBGNOMEDB_LOCALEDIR=\"/usr/share/locale\" -DLIBGNOMEDB_UIDIR=\"/usr/share/gnome-db/ui\" -DPREFIX=\"/usr\" -DSYSCONFDIR=\"/etc\" -DDATADIR=\"/usr/share\" -DLIBDIR=\"/usr/lib\" -g -O2 -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -MT utils.lo -MD -MP -MF .deps/utils.Tpo -c utils.c -fPIC -DPIC -o .libs/utils.o
utils.c: In function `client_notification_cb':
utils.c:47: warning: passing arg 2 of `gnome_db_error_dialog_show_errors' discards qualifiers from pointer target type
utils.c:49: error: label at end of compound statement
make[2]: *** [utils.lo] Error 1
make[2]: Leaving directory `/libgnomedb-1.0.4/build-tree/libgnomedb-1.0.4/libgnomedb'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/libgnomedb-1.0.4/build-tree/libgnomedb-1.0.4'
make: *** [debian/stampdir/build-stamp] Error 2
With the attached patch 'libgnomedb' can be compiled using gcc-3.4.
Regards
Andreas Jochens
diff -urN ../tmp-orig/libgnomedb-1.0.4/debian/patches/001_gcc-3.4_fix.patch ./debian/patches/001_gcc-3.4_fix.patch
--- ../tmp-orig/libgnomedb-1.0.4/debian/patches/001_gcc-3.4_fix.patch 1970-01-01 01:00:00.000000000 +0100
+++ ./debian/patches/001_gcc-3.4_fix.patch 2004-07-20 16:06:48.658236732 +0200
@@ -0,0 +1,19 @@
+--- utils.c 2003-11-30 12:41:40.000000000 +0100
++++ libgnomedb-1.0.4/libgnomedb/utils.c 2004-07-20 15:38:27.398253118 +0200
+@@ -45,7 +45,6 @@
+ dialog = gnome_db_error_dialog_new (_("Error"));
+ gnome_db_error_dialog_show_errors (GNOME_DB_ERROR_DIALOG (dialog),
+ gda_connection_get_errors (cnc));
+- default :
+ }
+ }
+
+--- gnome-db-form.c 2004-01-15 12:57:34.000000000 +0100
++++ libgnomedb-1.0.4/libgnomedb/gnome-db-form.c 2004-07-20 16:06:23.416710182 +0200
+@@ -583,5 +583,6 @@
+ show_navigator_row (form);
+ break;
+ case GNOME_DB_FORM_TYPE_LIST :
++ break;
+ }
+ }