fixed crash in color-luv when OpenCV is built using GCC 4.1
authorVadim Pisarevsky <no@email>
Tue, 9 Nov 2010 14:32:06 +0000 (14:32 +0000)
committerVadim Pisarevsky <no@email>
Tue, 9 Nov 2010 14:32:06 +0000 (14:32 +0000)
modules/imgproc/src/color.cpp

index d977dc8..87a3bf7 100644 (file)
@@ -1479,12 +1479,13 @@ struct RGB2Luv_f
                const float* whitept, bool _srgb )
     : srccn(_srccn), srgb(_srgb)
     {
+               volatile int i;
         initLabTabs();
         
         if(!_coeffs) _coeffs = sRGB2XYZ_D65;
         if(!whitept) whitept = D65;
         
-        for( int i = 0; i < 3; i++ )
+        for( i = 0; i < 3; i++ )
         {
             coeffs[i*3] = _coeffs[i*3];
             coeffs[i*3+1] = _coeffs[i*3+1];