Package: imview
Version: 1.1.8-1
Severity: serious
Tags: patch

When building 'imview' on amd64/unstable,
I get the following error:

x86_64-linux-gnu-g++  -D_REENTRANT -DLinux  -I.  -I/usr/include/freetype2  
-I/usr/include -Wno-deprecated -I/usr/include -O2 -Wall -Wno-return-type 
-Wno-unknown-pragmas  -I. -I. -I../include -c imview.cxx
server/asyncore.hxx:125: warning: 'class dispatcher' has virtual functions but 
non-virtual destructor
x86_64-linux-gnu-g++  -D_REENTRANT -DLinux  -I.  -I/usr/include/freetype2  
-I/usr/include -Wno-deprecated -I/usr/include -O2 -Wall -Wno-return-type 
-Wno-unknown-pragmas  -I. -I. -I../include -c imviewWindow.cxx
x86_64-linux-gnu-g++  -D_REENTRANT -DLinux  -I.  -I/usr/include/freetype2  
-I/usr/include -Wno-deprecated -I/usr/include -O2 -Wall -Wno-return-type 
-Wno-unknown-pragmas  -I. -I. -I../include -c menubar.cxx
menubar.cxx: In member function 'int imViewMenuBar::addToItemList(const char*, 
int)':
menubar.cxx:346: error: cast from 'void*' to 'unsigned int' loses precision
menubar.cxx: In member function 'void imViewMenuBar::removeFromItemList(const 
char*, int)':
menubar.cxx:371: error: cast from 'void*' to 'unsigned int' loses precision
menubar.cxx: In member function 'int imViewMenuBar::isAlreadyInItemList(const 
char*, int)':
menubar.cxx:450: error: cast from 'void*' to 'unsigned int' loses precision
menubar.cxx: In member function 'void* imViewMenuBar::getItemByLabel(const 
char*, int)':
menubar.cxx:479: error: cast from 'void*' to 'unsigned int' loses precision
menubar.cxx: In member function 'char* imViewMenuBar::getItemListContent(int, 
int&)':
menubar.cxx:508: error: cast from 'void*' to 'unsigned int' loses precision
menubar.cxx:514: error: cast from 'void*' to 'unsigned int' loses precision
make[2]: *** [menubar.o] Error 1
make[2]: Leaving directory `/imview-1.1.8'

Additionally, the -Wno-deprecated flag has to be removed because
otherwise many configure checks fail.

With the attached patch 'imview' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/imview-1.1.8/configure.in ./configure.in
--- ../tmp-orig/imview-1.1.8/configure.in       2005-09-03 05:51:44.000000000 
+0000
+++ ./configure.in      2005-09-03 05:49:01.000000000 +0000
@@ -436,7 +436,6 @@
 dnl# do this last so messing with switches does not break tests
 if test -n "$GXX"; then
     GCC_ACCEPTS_INCLUDE_DIR # this will add -I$INCLUDE_DIR if the compiler 
does not complain about it.
-    GCC_ACCEPTS_DEPRECATED_HEADERS # this will test if -Wno-deprecated is 
necessary
 
     CFLAGS="-Wall $CFLAGS"
     # GNU C++ is sometimes missing bits of the STL
diff -urN ../tmp-orig/imview-1.1.8/menubar.cxx ./menubar.cxx
--- ../tmp-orig/imview-1.1.8/menubar.cxx        2003-09-14 14:55:30.000000000 
+0000
+++ ./menubar.cxx       2005-09-03 05:44:50.000000000 +0000
@@ -343,7 +343,7 @@
             if ((dynamicMenu[i].label() != 0) 
                && (dynamicMenu[i].callback() == (Fl_Callback 
*)listCallback[listID])) {
                 dynamicMenu[i].flags &= ~FL_PUP_CHECK;
-                if (((unsigned int)dynamicMenu[i].user_data() > LAST_INT_ARG)
+                if (((unsigned long)dynamicMenu[i].user_data() > LAST_INT_ARG)
                    && (strcmp((char*)((IMAGEPARM 
*)dynamicMenu[i].user_data())->itempath, newImagePath) == 0))
                     dynamicMenu[i].flags |= FL_PUP_CHECK;
             }
@@ -368,7 +368,7 @@
         dbgprintf("Menu will have %d items\n", newSize);
         dynamicMenu = new Fl_Menu_Item[newSize];
         for (i = 0, j = 0 ; i <= newSize ; i++, j++) {
-            if (((unsigned int)oldMenu[i].user_data() > LAST_INT_ARG)
+            if (((unsigned long)oldMenu[i].user_data() > LAST_INT_ARG)
                 && (strcmp(((IMAGEPARM *)oldMenu[i].user_data())->itempath, 
oldImagePath) == 0)) {
                 // now selects the closest image in the image list
                 if (oldMenu[i+1].label() != 0) {
@@ -447,7 +447,7 @@
             }
 
         if (i != size()) {
-            for ( ; (unsigned int)dynamicMenu[i].user_data() > LAST_INT_ARG ; 
i++) {
+            for ( ; (unsigned long)dynamicMenu[i].user_data() > LAST_INT_ARG ; 
i++) {
                 if (strcmp(((IMAGEPARM 
*)dynamicMenu[i].user_data())->itempath, newImagePath) == 0) {
                    dbgprintf("Name %s is already in list at position %d\n",
                              newImagePath, i);
@@ -476,7 +476,7 @@
             }
 
         if (i != size()) {
-            for ( ; (unsigned int)dynamicMenu[i].user_data() > LAST_INT_ARG ; 
i++) {
+            for ( ; (unsigned long)dynamicMenu[i].user_data() > LAST_INT_ARG ; 
i++) {
                 if (strcmp(dynamicMenu[i].label(), givenLbl) == 0) {
                    dbgprintf("Found %s in list at position %d\n",
                              givenLbl, i);
@@ -505,13 +505,13 @@
             }
 
     if (i != size()) {
-       for (j = i, outlength = 0 ; (unsigned int)dynamicMenu[j].user_data() > 
LAST_INT_ARG ; j++)
+       for (j = i, outlength = 0 ; (unsigned long)dynamicMenu[j].user_data() > 
LAST_INT_ARG ; j++)
            outlength += strlen(((IMAGEPARM 
*)dynamicMenu[j].user_data())->itempath);
 
        if (outlength > 0) {
            res = new char[outlength+j+1];
            res[0] = '\0';
-           for (j = i ; (unsigned int)dynamicMenu[j].user_data() > 
LAST_INT_ARG ; j++) {
+           for (j = i ; (unsigned long)dynamicMenu[j].user_data() > 
LAST_INT_ARG ; j++) {
                strcat(res, ((IMAGEPARM 
*)dynamicMenu[j].user_data())->itempath);
                strcat(res, "\n");
                nbitems++;



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to