Update to 2.0.0 tree from current Fremantle build
[opencv] / debian / patches / 120_header_warnings.diff
diff --git a/debian/patches/120_header_warnings.diff b/debian/patches/120_header_warnings.diff
new file mode 100644 (file)
index 0000000..ca2dc81
--- /dev/null
@@ -0,0 +1,180 @@
+--- a/include/opencv/cvcompat.h        2006-07-12 15:48:54.000000000 +0000
++++ b/include/opencv/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 ); 
+ }
+--- a/include/opencv/cxcore.h  2009-11-29 12:41:25.000000000 +0900
++++ b/include/opencv/cxcore.h  2009-11-29 12:42:59.000000000 +0900
+@@ -1152,9 +1152,9 @@
\r
+ /* Returns a set element by index. If the element doesn't belong to the set,\r
+    NULL is returned */\r
+-CV_INLINE CvSetElem* cvGetSetElem( const CvSet* set_header, int index )\r
++CV_INLINE CvSetElem* cvGetSetElem( const CvSet* set_header, int idx )\r
+ {\r
+-    CvSetElem* elem = (CvSetElem*)cvGetSeqElem( (CvSeq*)set_header, index );\r
++    CvSetElem* elem = (CvSetElem*)cvGetSeqElem( (CvSeq*)set_header, idx );\r
+     return elem && CV_IS_SET_ELEM( elem ) ? elem : 0;\r
+ }\r
\r
+--- a/include/opencv/highgui.h 2009-11-29 12:45:02.000000000 +0900
++++ b/include/opencv/highgui.h 2009-11-29 12:45:13.000000000 +0900
+@@ -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 */