• Bug#266383: gasql: FTBFS with gcc-3.4: label at end of compound stateme

    From Andreas Jochens@1:229/2 to All on Tue Aug 17 22:10:11 2004
    From: [email protected]

    Package: gasql
    Severity: normal
    Tags: patch

    When building 'gasql' with gcc-3.4 I get the following error:

    gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I/usr/include -I/usr/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/orbit-1.0 -I/usr/include/gtk-1.2 -I/usr/include/libgda-0.2.
    96/gda -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/gnome-xml -I/usr/include/gconf/1 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/
    orbit-1.0 -I/usr/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/gdk-pixbuf-1.0 -I/usr/include/freetype2 -I/usr/include/gnome-xml -I/usr/include -
    I/usr/include/orbit-1.0 -I/usr/include/gnome-xml -I/usr/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/orbit-1.0 -I/usr/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk
    -1.2 -I/usr/include/gdk-pixbuf-1.0 -I/usr/include/freetype2 -DGNOMELOCALEDIR="/usr/share/locale" -I/usr/include/libgnomedb-0.2.96/gnome-db -I/usr/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/
    glib-1.2 -I/usr/lib/glib/include -I/usr/include/gdk-pixbuf-1.0 -I/usr/include/freetype2 -I/usr/include/gnome-xml -I/usr/include -I/usr/include/orbit-1.0 -I/usr/include/libgda-0.2.96/gda -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT -I/usr/
    include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/gnome-xml -I/usr/include/gconf/1 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/orbit-1.0 -I/usr/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/
    include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/gdk-pixbuf-1.0 -I/usr/include/freetype2 -I/usr/include/gnome-xml -I/usr/include -I/usr/include/orbit-1.0 -I../libltdl -I/usr/include/
    gnome-xml -DG_LOG_DOMAIN=\"gASQL\" -DDTDINSTALLDIR=\""/usr/share/gASQL/dtd"\" -DPLUGINSINSTALLDIR=\""/usr/share/gASQL/plugins"\" -DPIXMAPDIR=\""/usr/share/pixmaps/gASQL"\" -I../intl -I../intl -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -
    I/usr/lib/glib/include -g -O2 -c interface_cb.c
    interface_cb.c: In function `apply_cb':
    interface_cb.c:276: error: label at end of compound statement
    interface_cb.c: In function `get_gnome_db_control_widget':
    interface_cb.c:1769: warning: passing arg 2 of `gnome_db_control_widget_new' from incompatible pointer type
    make[4]: *** [interface_cb.o] Error 1
    make[4]: Leaving directory `/gasql-0.6+0.2.95/build-tree/gASQL-0.6_0.2.95/src'

    With the attached patch 'gasql' can be compiled using gcc-3.4.

    Regards
    Andreas Jochens

    diff -urN ../tmp-orig/gasql-0.6+0.2.95/debian/patches/010_gcc-3.4-fixes.patch ./debian/patches/010_gcc-3.4-fixes.patch
    --- ../tmp-orig/gasql-0.6+0.2.95/debian/patches/010_gcc-3.4-fixes.patch 1970-01-01 01:00:00.000000000 +0100
    +++ ./debian/patches/010_gcc-3.4-fixes.patch 2004-08-17 21:30:15.913944545 +0200
    @@ -0,0 +1,34 @@
    +diff -urN tmp/src/interface_cb.c gASQL-0.6_0.2.95/src/interface_cb.c
    +--- tmp/src/interface_cb.c 2001-10-12 09:08:52.000000000 +0200
    ++++ gASQL-0.6_0.2.95/src/interface_cb.c 2004-08-17 21:27:36.378197665 +0200
    +@@ -272,7 +272,7 @@
    + apply_sql_server_changes (obj, conf);
    + break;
    + default:
    +- /* nothing to be done */
    ++ break; /* nothing to be done */
    + }
    + }
    +
    +diff -urN tmp/src/mainpagequery.c gASQL-0.6_0.2.95/src/mainpagequery.c
    +--- tmp/src/mainpagequery.c 2001-10-12 09:08:52.000000000 +0200
    ++++ gASQL-0.6_0.2.95/src/mainpagequery.c 2004-08-17 21:27:52.966675833 +0200
    +@@ -641,7 +641,6 @@
    + }
    + case 1: /* Cancel Button */
    + break;
    +- default:
    + };
    +
    + if (leave) {
    +diff -urN tmp/src/sqlquery.c gASQL-0.6_0.2.95/src/sqlquery.c
    +--- tmp/src/sqlquery.c 2001-10-14