Ector: Fix (probably valid) clang warning
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 21 Apr 2015 10:02:57 +0000 (19:02 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 21 Apr 2015 11:11:02 +0000 (20:11 +0900)
This time it looks like this is a valid warning.
if (abs(double) <= 0.00001f) might too often be true since abs() returns
an int.

src/lib/ector/software/ector_software_gradient.c

index 5c3bcde3b4c4182f8865de0b5a2cee3caa13124f..afd4dd3daf4363026dcf67db4b862487dc54eaab 100644 (file)
@@ -217,7 +217,7 @@ fetch_radial_gradient(uint *buffer, Span_Data *data, int y, int x, int length)
    Ector_Renderer_Software_Gradient_Data *g_data = data->gradient;
 
    // avoid division by zero
-   if (abs(g_data->radial.a) <= 0.00001f)
+   if (fabsf(g_data->radial.a) <= 0.00001f)
      {
         _ector_memfill(buffer, 0, length);
         return;