[gimp/soc-2011-warp: 49/72] gimpoperationwarp: fix warning about uninitialysed values
- From: Michael Murà <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2011-warp: 49/72] gimpoperationwarp: fix warning about uninitialysed values
- Date: Wed, 14 Mar 2012 12:21:30 +0000 (UTC)
commit e1c84b58e6328bd8808875bd61ee612c96c331f8
Author: Michael Murà <batolettre gmail com>
Date: Fri Jul 8 11:55:58 2011 +0200
gimpoperationwarp: fix warning about uninitialysed values
app/gegl/gimpoperationwarp.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/app/gegl/gimpoperationwarp.c b/app/gegl/gimpoperationwarp.c
index e249eaf..84db9fe 100644
--- a/app/gegl/gimpoperationwarp.c
+++ b/app/gegl/gimpoperationwarp.c
@@ -304,7 +304,8 @@ gimp_operation_warp_stamp (GimpOperationWarp *ow,
GeglBufferIterator *it;
Babl *format;
gdouble influence;
- gdouble x_mean, y_mean;
+ gdouble x_mean = 0.0;
+ gdouble y_mean = 0.0;
gint x_iter, y_iter;
GeglRectangle area = {x - ow->size / 2.0,
y - ow->size / 2.0,
@@ -320,11 +321,12 @@ gimp_operation_warp_stamp (GimpOperationWarp *ow,
return;
}
+ format = babl_format_n (babl_type ("float"), 2);
+
/* If needed, compute the mean deformation */
if (ow->behavior == GIMP_WARP_BEHAVIOR_SMOOTH)
{
gint pixel_count = 0;
- x_mean = y_mean = 0.0;
it = gegl_buffer_iterator_new (ow->buffer, &area, format, GEGL_BUFFER_READ);
@@ -345,9 +347,6 @@ gimp_operation_warp_stamp (GimpOperationWarp *ow,
y_mean /= pixel_count;
}
-
- format = babl_format_n (babl_type ("float"), 2);
-
it = gegl_buffer_iterator_new (ow->buffer, &area, format, GEGL_BUFFER_READWRITE);
while (gegl_buffer_iterator_next (it))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]