aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/opencv/opencv/debian/120_header_warnings.diff
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/opencv/opencv/debian/120_header_warnings.diff')
-rw-r--r--recipes/opencv/opencv/debian/120_header_warnings.diff186
1 files changed, 186 insertions, 0 deletions
diff --git a/recipes/opencv/opencv/debian/120_header_warnings.diff b/recipes/opencv/opencv/debian/120_header_warnings.diff
new file mode 100644
index 0000000000..b2038d379b
--- /dev/null
+++ b/recipes/opencv/opencv/debian/120_header_warnings.diff
@@ -0,0 +1,186 @@
+Index: opencv-1.0.0/cv/include/cvcompat.h
+===================================================================
+--- opencv-1.0.0.orig/cv/include/cvcompat.h 2006-07-12 15:48:54.000000000 +0000
++++ opencv-1.0.0/cv/include/cvcompat.h 2008-08-28 22:52:08.000000000 +0000
+@@ -181,7 +181,7 @@
+
+ /* Changes RNG range while preserving RNG state */
+ CV_INLINE void cvRandSetRange( CvRandState* state, double param1,
+- double param2, int index CV_DEFAULT(-1))
++ double param2, int idx CV_DEFAULT(-1))
+ {
+ if( !state )
+ {
+@@ -189,13 +189,13 @@
+ return;
+ }
+
+- if( (unsigned)(index + 1) > 4 )
++ if( (unsigned)(idx + 1) > 4 )
+ {
+ cvError( CV_StsOutOfRange, "cvRandSetRange", "index is not in -1..3", "cvcompat.h", 0 );
+ return;
+ }
+
+- if( index < 0 )
++ if( idx < 0 )
+ {
+ state->param[0].val[0] = state->param[0].val[1] =
+ state->param[0].val[2] = state->param[0].val[3] = param1;
+@@ -204,8 +204,8 @@
+ }
+ else
+ {
+- state->param[0].val[index] = param1;
+- state->param[1].val[index] = param2;
++ state->param[0].val[idx] = param1;
++ state->param[1].val[idx] = param2;
+ }
+ }
+
+@@ -255,12 +255,12 @@
+ CV_INLINE void cvbCartToPolar( const float* y, const float* x,
+ float* magnitude, float* angle, int len )
+ {
+- CvMat mx = cvMat( 1, len, CV_32F, (void*)x );
++ CvMat mx = cvMat( 1, len, CV_32F, (void*)(long)x );
+ CvMat my = mx;
+ CvMat mm = mx;
+ CvMat ma = mx;
+
+- my.data.fl = (float*)y;
++ my.data.fl = (float*)(long)y;
+ mm.data.fl = (float*)magnitude;
+ ma.data.fl = (float*)angle;
+
+@@ -271,11 +271,11 @@
+ CV_INLINE void cvbFastArctan( const float* y, const float* x,
+ float* angle, int len )
+ {
+- CvMat mx = cvMat( 1, len, CV_32F, (void*)x );
++ CvMat mx = cvMat( 1, len, CV_32F, (void*)(long)x );
+ CvMat my = mx;
+ CvMat ma = mx;
+
+- my.data.fl = (float*)y;
++ my.data.fl = (float*)(long)y;
+ ma.data.fl = (float*)angle;
+
+ cvCartToPolar( &mx, &my, NULL, &ma, 1 );
+@@ -284,7 +284,7 @@
+
+ CV_INLINE void cvbSqrt( const float* x, float* y, int len )
+ {
+- CvMat mx = cvMat( 1, len, CV_32F, (void*)x );
++ CvMat mx = cvMat( 1, len, CV_32F, (void*)(long)x );
+ CvMat my = mx;
+ my.data.fl = (float*)y;
+
+@@ -294,7 +294,7 @@
+
+ CV_INLINE void cvbInvSqrt( const float* x, float* y, int len )
+ {
+- CvMat mx = cvMat( 1, len, CV_32F, (void*)x );
++ CvMat mx = cvMat( 1, len, CV_32F, (void*)(long)x );
+ CvMat my = mx;
+ my.data.fl = (float*)y;
+
+@@ -304,7 +304,7 @@
+
+ CV_INLINE void cvbReciprocal( const float* x, float* y, int len )
+ {
+- CvMat mx = cvMat( 1, len, CV_32F, (void*)x );
++ CvMat mx = cvMat( 1, len, CV_32F, (void*)(long)x );
+ CvMat my = mx;
+ my.data.fl = (float*)y;
+
+@@ -314,7 +314,7 @@
+
+ CV_INLINE void cvbFastExp( const float* x, double* y, int len )
+ {
+- CvMat mx = cvMat( 1, len, CV_32F, (void*)x );
++ CvMat mx = cvMat( 1, len, CV_32F, (void*)(long)x );
+ CvMat my = cvMat( 1, len, CV_64F, y );
+ cvExp( &mx, &my );
+ }
+@@ -322,7 +322,7 @@
+
+ CV_INLINE void cvbFastLog( const double* x, float* y, int len )
+ {
+- CvMat mx = cvMat( 1, len, CV_64F, (void*)x );
++ CvMat mx = cvMat( 1, len, CV_64F, (void*)(long)x );
+ CvMat my = cvMat( 1, len, CV_32F, y );
+ cvLog( &mx, &my );
+ }
+@@ -422,7 +422,10 @@
+ vect2->x = pt[3].x - pt[0].x;
+ vect2->y = pt[3].y - pt[0].y;
+
+- CV_UNREFERENCED( (left, bottom, right, top) );
++ CV_UNREFERENCED((void)left);
++ CV_UNREFERENCED((void)bottom);
++ CV_UNREFERENCED((void)right);
++ CV_UNREFERENCED((void)top);
+ }
+
+ typedef int CvDisType;
+@@ -451,7 +454,7 @@
+
+ CV_INLINE void cvFitEllipse( const CvPoint2D32f* points, int count, CvBox2D* box )
+ {
+- CvMat mat = cvMat( 1, count, CV_32FC2, (void*)points );
++ CvMat mat = cvMat( 1, count, CV_32FC2, (void*)(long)points );
+ *box = cvFitEllipse2( &mat );
+ }
+
+@@ -756,8 +759,8 @@
+ const float* distortion_coeffs,
+ int CV_UNREFERENCED(interpolate) )
+ {
+- CvMat _a = cvMat( 3, 3, CV_32F, (void*)intrinsic_matrix );
+- CvMat _k = cvMat( 4, 1, CV_32F, (void*)distortion_coeffs );
++ CvMat _a = cvMat( 3, 3, CV_32F, (void*)(long)intrinsic_matrix );
++ CvMat _k = cvMat( 4, 1, CV_32F, (void*)(long)distortion_coeffs );
+ cvUndistort2( src, dst, &_a, &_k );
+ }
+
+@@ -802,8 +805,8 @@
+ float* lower_bound CV_DEFAULT(0),
+ void* user_param CV_DEFAULT(0))
+ {
+- CvMat sign1 = cvMat( size1, dims + 1, CV_32FC1, (void*)signature1 );
+- CvMat sign2 = cvMat( size2, dims + 1, CV_32FC1, (void*)signature2 );
++ CvMat sign1 = cvMat( size1, dims + 1, CV_32FC1, (void*)(long)signature1 );
++ CvMat sign2 = cvMat( size2, dims + 1, CV_32FC1, (void*)(long)signature2 );
+
+ return cvCalcEMD2( &sign1, &sign2, dist_type, dist_func, 0, 0, lower_bound, user_param );
+ }
+Index: opencv-1.0.0/cxcore/include/cxcore.h
+===================================================================
+--- opencv-1.0.0.orig/cxcore/include/cxcore.h 2008-08-28 22:47:50.000000000 +0000
++++ opencv-1.0.0/cxcore/include/cxcore.h 2008-08-28 22:48:00.000000000 +0000
+@@ -1126,9 +1126,9 @@
+
+ /* Returns a set element by index. If the element doesn't belong to the set,
+ NULL is returned */
+-CV_INLINE CvSetElem* cvGetSetElem( const CvSet* set_header, int index )
++CV_INLINE CvSetElem* cvGetSetElem( const CvSet* set_header, int idx )
+ {
+- CvSetElem* elem = (CvSetElem*)cvGetSeqElem( (CvSeq*)set_header, index );
++ CvSetElem* elem = (CvSetElem*)cvGetSeqElem( (CvSeq const*)set_header, idx );
+ return elem && CV_IS_SET_ELEM( elem ) ? elem : 0;
+ }
+
+Index: opencv-1.0.0/otherlibs/highgui/highgui.h
+===================================================================
+--- opencv-1.0.0.orig/otherlibs/highgui/highgui.h 2008-08-28 22:47:51.000000000 +0000
++++ opencv-1.0.0/otherlibs/highgui/highgui.h 2008-08-28 22:52:56.000000000 +0000
+@@ -116,7 +116,7 @@
+ /* this function is used to set some external parameters in case of X Window */
+ CVAPI(int) cvInitSystem( int argc, char** argv );
+
+-CVAPI(int) cvStartWindowThread();
++CVAPI(int) cvStartWindowThread( void );
+
+ #define CV_WINDOW_AUTOSIZE 1
+ /* create window */