Package: opencv Severity: normal Tags: patch When building 'opencv' on amd64 with gcc-4.0, I get the following error:
x86_64-linux-g++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../include -I../../../../cv/include -I../../../highgui -g -fomit-frame-pointer -O3 -DNDEBUG -Wall -fno-rtti -pipe -D_XOPEN_SOURCE=500 -g -fomit-frame-pointer -O3 -DNDEBUG -Wall -fno-rtti -pipe -Wp,-MD,.deps/cvvideo.pp -c cvvideo.cpp -fPIC -DPIC -o .libs/cvvideo.o cvvideo.cpp: In function 'int cvcamGetCamerasCount()': cvvideo.cpp:112: warning: comparison between signed and unsigned integer expressions cvvideo.cpp: In function 'int cvcamSetProperty(int, const char*, void*)': cvvideo.cpp:427: warning: comparison is always false due to limited range of data type cvvideo.cpp:428: warning: comparison is always false due to limited range of data type cvvideo.cpp:429: warning: comparison is always false due to limited range of data type cvvideo.cpp:430: warning: comparison is always false due to limited range of data type cvvideo.cpp:431: warning: comparison is always false due to limited range of data type cvvideo.cpp: In function 'int icvVideoStart(int)': cvvideo.cpp:618: warning: format '%d' expects type 'int', but argument 3 has type 'CvVideoCamera*' cvvideo.cpp:695: warning: format '%d' expects type 'int', but argument 3 has type 'CvVideoCamera*' cvvideo.cpp: In function 'void* icvVideoCaptureProc(void*)': cvvideo.cpp:717: error: cast from 'void*' to 'int' loses precision With the attached patch 'opencv' can be compiled on amd64 using gcc-4.0. Regards Andreas Jochens diff -urN ../tmp-orig/opencv-0.9.5/otherlibs/cvcam/src/unix/cvvideo.cpp ./otherlibs/cvcam/src/unix/cvvideo.cpp --- ../tmp-orig/opencv-0.9.5/otherlibs/cvcam/src/unix/cvvideo.cpp 2002-11-11 18:05:32.000000000 +0100 +++ ./otherlibs/cvcam/src/unix/cvvideo.cpp 2005-03-01 21:55:19.672620720 +0100 @@ -713,7 +713,7 @@ //////////////////////////////////////////////////////////////////////////////// void* icvVideoCaptureProc(void* arg) { - int cameraid = (int) arg; + long cameraid = (long) arg; CvVideoCamera* const camera = &(cameras[cameraid]); assert(cameras != NULL); -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]