Bug#258790: gnome-cups-manager: FTBFS with gcc-3.4: array bound forbidden after parenthesized type-id

Andreas Jochens Andreas Jochens <aj@andaco.de>, 258790@bugs.debian.org
Sun, 11 Jul 2004 14:59:46 +0200


Package: gnome-cups-manager
Severity: normal
Tags: patch

When building 'gnome-cups-manager' with gcc-3.4 I get the following error:

g++ -DHAVE_CONFIG_H -I. -I. -I../..     -g -Wall -O2 -c snmpkit_interface.C
snmpkit_interface.C: In function `void** sk_table_get(SNMPTABLE*)':
snmpkit_interface.C:511: error: array bound forbidden after parenthesized type-id
snmpkit_interface.C:511: note: try removing the parentheses around the type-id
make[4]: *** [snmpkit_interface.o] Error 1
make[4]: Leaving directory `/gnome-cups-manager-0.18/gnome-cups-add/snmpkit'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/gnome-cups-manager-0.18/gnome-cups-add'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/gnome-cups-manager-0.18'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/gnome-cups-manager-0.18'
make: *** [debian/stamp-makefile-build] Error 2

With the attached patch 'gnome-cups-manager' can be compiled using gcc-3.4.

Regards
Andreas Jochens

diff -urN ../tmp-orig/gnome-cups-manager-0.18/gnome-cups-add/snmpkit/snmpkit_interface.C ./gnome-cups-add/snmpkit/snmpkit_interface.C
--- ../tmp-orig/gnome-cups-manager-0.18/gnome-cups-add/snmpkit/snmpkit_interface.C	2003-05-17 21:01:47.000000000 +0200
+++ ./gnome-cups-add/snmpkit/snmpkit_interface.C	2004-07-11 14:48:22.575612023 +0200
@@ -508,7 +508,7 @@
 void **sk_table_get(SNMPTABLE *st){
   std::list<void*> vals;
   from_c(st)->get(vals);
-  void **retval=new (void*)[vals.size()+1];
+  void **retval=new void*[vals.size()+1];
   retval[vals.size()]=NULL;
   int i=0;
   for(std::list<void*>::iterator cur=vals.begin();cur!=vals.end();cur++,i++)