Update to 2.0.0 tree from current Fremantle build
[opencv] / debian / patches / 120_header_warnings.diff
1 --- a/include/opencv/cvcompat.h 2006-07-12 15:48:54.000000000 +0000
2 +++ b/include/opencv/cvcompat.h 2008-08-28 22:52:08.000000000 +0000
3 @@ -181,7 +181,7 @@
4  
5  /* Changes RNG range while preserving RNG state */
6  CV_INLINE  void  cvRandSetRange( CvRandState* state, double param1,
7 -                                 double param2, int index CV_DEFAULT(-1))
8 +                                 double param2, int idx CV_DEFAULT(-1))
9  {
10      if( !state )
11      {
12 @@ -189,13 +189,13 @@
13          return;
14      }
15  
16 -    if( (unsigned)(index + 1) > 4 )
17 +    if( (unsigned)(idx + 1) > 4 )
18      {
19          cvError( CV_StsOutOfRange, "cvRandSetRange", "index is not in -1..3", "cvcompat.h", 0 );
20          return;
21      }
22  
23 -    if( index < 0 )
24 +    if( idx < 0 )
25      {
26          state->param[0].val[0] = state->param[0].val[1] =
27          state->param[0].val[2] = state->param[0].val[3] = param1;
28 @@ -204,8 +204,8 @@
29      }
30      else
31      {
32 -        state->param[0].val[index] = param1;
33 -        state->param[1].val[index] = param2;
34 +        state->param[0].val[idx] = param1;
35 +        state->param[1].val[idx] = param2;
36      }
37  }
38  
39 @@ -255,12 +255,12 @@
40  CV_INLINE void  cvbCartToPolar( const float* y, const float* x,
41                                  float* magnitude, float* angle, int len )
42  {
43 -    CvMat mx = cvMat( 1, len, CV_32F, (void*)x );
44 +    CvMat mx = cvMat( 1, len, CV_32F, (void*)(long)x );
45      CvMat my = mx;
46      CvMat mm = mx;
47      CvMat ma = mx;
48  
49 -    my.data.fl = (float*)y;
50 +    my.data.fl = (float*)(long)y;
51      mm.data.fl = (float*)magnitude;
52      ma.data.fl = (float*)angle;
53  
54 @@ -271,11 +271,11 @@
55  CV_INLINE void  cvbFastArctan( const float* y, const float* x,
56                                 float* angle, int len )
57  {
58 -    CvMat mx = cvMat( 1, len, CV_32F, (void*)x );
59 +    CvMat mx = cvMat( 1, len, CV_32F, (void*)(long)x );
60      CvMat my = mx;
61      CvMat ma = mx;
62  
63 -    my.data.fl = (float*)y;
64 +    my.data.fl = (float*)(long)y;
65      ma.data.fl = (float*)angle;
66  
67      cvCartToPolar( &mx, &my, NULL, &ma, 1 );
68 @@ -284,7 +284,7 @@
69  
70  CV_INLINE  void  cvbSqrt( const float* x, float* y, int len )
71  {
72 -    CvMat mx = cvMat( 1, len, CV_32F, (void*)x );
73 +    CvMat mx = cvMat( 1, len, CV_32F, (void*)(long)x );
74      CvMat my = mx;
75      my.data.fl = (float*)y;
76  
77 @@ -294,7 +294,7 @@
78  
79  CV_INLINE  void  cvbInvSqrt( const float* x, float* y, int len )
80  {
81 -    CvMat mx = cvMat( 1, len, CV_32F, (void*)x );
82 +    CvMat mx = cvMat( 1, len, CV_32F, (void*)(long)x );
83      CvMat my = mx;
84      my.data.fl = (float*)y;
85  
86 @@ -304,7 +304,7 @@
87  
88  CV_INLINE  void  cvbReciprocal( const float* x, float* y, int len )
89  {
90 -    CvMat mx = cvMat( 1, len, CV_32F, (void*)x );
91 +    CvMat mx = cvMat( 1, len, CV_32F, (void*)(long)x );
92      CvMat my = mx;
93      my.data.fl = (float*)y;
94  
95 @@ -314,7 +314,7 @@
96  
97  CV_INLINE  void  cvbFastExp( const float* x, double* y, int len )
98  {
99 -    CvMat mx = cvMat( 1, len, CV_32F, (void*)x );
100 +    CvMat mx = cvMat( 1, len, CV_32F, (void*)(long)x );
101      CvMat my = cvMat( 1, len, CV_64F, y );
102      cvExp( &mx, &my );
103  }
104 @@ -322,7 +322,7 @@
105  
106  CV_INLINE  void  cvbFastLog( const double* x, float* y, int len )
107  {
108 -    CvMat mx = cvMat( 1, len, CV_64F, (void*)x );
109 +    CvMat mx = cvMat( 1, len, CV_64F, (void*)(long)x );
110      CvMat my = cvMat( 1, len, CV_32F, y );
111      cvLog( &mx, &my );
112  }
113 @@ -422,7 +422,10 @@
114      vect2->x = pt[3].x - pt[0].x;
115      vect2->y = pt[3].y - pt[0].y;
116  
117 -    CV_UNREFERENCED( (left, bottom, right, top) );
118 +    CV_UNREFERENCED((void)left);
119 +    CV_UNREFERENCED((void)bottom);
120 +    CV_UNREFERENCED((void)right);
121 +    CV_UNREFERENCED((void)top);
122  }
123  
124  typedef int CvDisType;
125 @@ -451,7 +454,7 @@
126  
127  CV_INLINE  void cvFitEllipse( const CvPoint2D32f* points, int count, CvBox2D* box )
128  {
129 -    CvMat mat = cvMat( 1, count, CV_32FC2, (void*)points );
130 +    CvMat mat = cvMat( 1, count, CV_32FC2, (void*)(long)points );
131      *box = cvFitEllipse2( &mat );
132  }
133  
134 @@ -756,8 +759,8 @@
135                                  const float* distortion_coeffs,
136                                  int CV_UNREFERENCED(interpolate) )
137  {
138 -    CvMat _a = cvMat( 3, 3, CV_32F, (void*)intrinsic_matrix );
139 -    CvMat _k = cvMat( 4, 1, CV_32F, (void*)distortion_coeffs );
140 +    CvMat _a = cvMat( 3, 3, CV_32F, (void*)(long)intrinsic_matrix );
141 +    CvMat _k = cvMat( 4, 1, CV_32F, (void*)(long)distortion_coeffs );
142      cvUndistort2( src, dst, &_a, &_k );
143  }
144  
145 @@ -802,8 +805,8 @@
146                               float* lower_bound CV_DEFAULT(0),
147                               void* user_param CV_DEFAULT(0))
148  {
149 -    CvMat sign1 = cvMat( size1, dims + 1, CV_32FC1, (void*)signature1 );
150 -    CvMat sign2 = cvMat( size2, dims + 1, CV_32FC1, (void*)signature2 );
151 +    CvMat sign1 = cvMat( size1, dims + 1, CV_32FC1, (void*)(long)signature1 );
152 +    CvMat sign2 = cvMat( size2, dims + 1, CV_32FC1, (void*)(long)signature2 );
153  
154      return cvCalcEMD2( &sign1, &sign2, dist_type, dist_func, 0, 0, lower_bound, user_param ); 
155  }
156 --- a/include/opencv/cxcore.h   2009-11-29 12:41:25.000000000 +0900
157 +++ b/include/opencv/cxcore.h   2009-11-29 12:42:59.000000000 +0900
158 @@ -1152,9 +1152,9 @@
159  \r
160  /* Returns a set element by index. If the element doesn't belong to the set,\r
161     NULL is returned */\r
162 -CV_INLINE CvSetElem* cvGetSetElem( const CvSet* set_header, int index )\r
163 +CV_INLINE CvSetElem* cvGetSetElem( const CvSet* set_header, int idx )\r
164  {\r
165 -    CvSetElem* elem = (CvSetElem*)cvGetSeqElem( (CvSeq*)set_header, index );\r
166 +    CvSetElem* elem = (CvSetElem*)cvGetSeqElem( (CvSeq*)set_header, idx );\r
167      return elem && CV_IS_SET_ELEM( elem ) ? elem : 0;\r
168  }\r
169  \r
170 --- a/include/opencv/highgui.h  2009-11-29 12:45:02.000000000 +0900
171 +++ b/include/opencv/highgui.h  2009-11-29 12:45:13.000000000 +0900
172 @@ -116,7 +116,7 @@
173  /* this function is used to set some external parameters in case of X Window */
174  CVAPI(int) cvInitSystem( int argc, char** argv );
175  
176 -CVAPI(int) cvStartWindowThread();
177 +CVAPI(int) cvStartWindowThread(void);
178  
179  #define CV_WINDOW_AUTOSIZE  1
180  /* create window */