/WX enabled for MSVC in CMake too.
[blender.git] / source / blender / blenkernel / intern / fmodifier.c
index 6660442b14adda3f55aa43539ba4f9a6e56f1230..c900f178ca702722c9c94feb99efd6b4478eba1f 100644 (file)
@@ -146,7 +146,7 @@ static void fcm_generator_verify (FModifier *fcm)
                                nc= MEM_callocN(sizeof(float)*(data->poly_order+1), "FMod_Generator_Coefs");
                                
                                if (data->coefficients) {
-                                       if (data->arraysize > (data->poly_order+1))
+                                       if ((int)data->arraysize > (data->poly_order+1))
                                                memcpy(nc, data->coefficients, sizeof(float)*(data->poly_order+1));
                                        else
                                                memcpy(nc, data->coefficients, sizeof(float)*data->arraysize);
@@ -172,7 +172,7 @@ static void fcm_generator_verify (FModifier *fcm)
                                nc= MEM_callocN(sizeof(float)*(data->poly_order*2), "FMod_Generator_Coefs");
                                
                                if (data->coefficients) {
-                                       if (data->arraysize > (data->poly_order * 2))
+                                       if (data->arraysize > (unsigned int)(data->poly_order * 2))
                                                memcpy(nc, data->coefficients, sizeof(float)*(data->poly_order * 2));
                                        else
                                                memcpy(nc, data->coefficients, sizeof(float)*data->arraysize);
@@ -240,7 +240,7 @@ static void fcm_generator_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, float *
                        unsigned int i;
                        
                        /* for each coefficient pair, solve for that bracket before accumulating in value by multiplying */
-                       for (cp=data->coefficients, i=0; (cp) && (i < data->poly_order); cp+=2, i++) 
+                       for (cp=data->coefficients, i=0; (cp) && (i < (unsigned int)data->poly_order); cp+=2, i++) 
                                value *= (cp[0]*evaltime + cp[1]);
                                
                        /* only if something changed, write *cvalue in one go */