[gegl] polar-coordinates: Fix warning about use of uninitialized variables



commit abf8d7add7108a9a03c6402b608f24ebcb92f66a
Author: Mukund Sivaraman <muks banu com>
Date:   Fri May 2 22:29:52 2014 +0530

    polar-coordinates: Fix warning about use of uninitialized variables
    
    This is ideally fixed by using something like:
    
      if (inside)
        {
          ud = rx;
          vd = ry;
        }
    
    ... but because the gegl_unmap() macro is also used in the
    gegl_sampler_compute_scale() macro, the warning persists due to the
    variables passed as ud, vd being used there.

 operations/common/polar-coordinates.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/operations/common/polar-coordinates.c b/operations/common/polar-coordinates.c
index 366cf36..e9b6a62 100644
--- a/operations/common/polar-coordinates.c
+++ b/operations/common/polar-coordinates.c
@@ -351,7 +351,7 @@ process (GeglOperation       *operation,
     for (x = result->x; x < result->x + result->width; x++)
       {
 #define gegl_unmap(u,v,ud,vd) {                                         \
-          gdouble rx, ry;                                               \
+          gdouble rx = 0.0, ry = 0.0;                                   \
           inside = calc_undistorted_coords ((gdouble)x, (gdouble)y,     \
                                             &rx, &ry, o, boundary);     \
           ud = rx;                                                      \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]