Package: vls
Severity: normal
Tags: patch

When building 'vls' on amd64 with gcc-4.0,
I get the following error:

else rm -f ".deps/dummyinterface_la-dummyinterface.Tpo"; exit 1; \
fi
 g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -D_LARGEFILE_SOURCE 
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -O2 -MT 
dummyinterface_la-dummyinterface.lo -MD -MP -MF 
.deps/dummyinterface_la-dummyinterface.Tpo -c dummyinterface.cpp -o 
dummyinterface_la-dummyinterface.o
../../core/hashtable.cpp: In member function 'u32 
C_HashMethod<void*>::Hash(void*) const':
../../core/hashtable.cpp:100: error: cast from 'void*' to 'u32' loses precision
make[7]: *** [dummyinterface_la-dummyinterface.lo] Error 1
make[7]: Leaving directory `/vls-0.5.4+cvs20031028/src/modules/dummyinterface'

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

Regards
Andreas Jochens

diff -urN ../tmp-orig/vls-0.5.4+cvs20031028/src/core/hashtable.cpp 
./src/core/hashtable.cpp
--- ../tmp-orig/vls-0.5.4+cvs20031028/src/core/hashtable.cpp    2003-10-10 
02:46:40.000000000 +0200
+++ ./src/core/hashtable.cpp    2005-03-03 19:17:44.300093892 +0100
@@ -97,7 +97,7 @@
 
 u32 C_HashMethod<handle>::Hash(handle hKey) const
 {
-  return (u32)hKey % m_uiMaxHash;
+  return (unsigned long)hKey % m_uiMaxHash;
 }
 
 


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

Reply via email to