[gimp] libappwidgets: Initialize arrays before use



commit d04efe3a03179f2d64d4e38bc3aef927520aa8e3
Author: Mukund Sivaraman <muks banu com>
Date:   Mon Apr 25 19:34:02 2011 +0530

    libappwidgets: Initialize arrays before use

 libgimpwidgets/gimpcolorscale.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgimpwidgets/gimpcolorscale.c b/libgimpwidgets/gimpcolorscale.c
index 9f5bff2..4bebdbd 100644
--- a/libgimpwidgets/gimpcolorscale.c
+++ b/libgimpwidgets/gimpcolorscale.c
@@ -777,8 +777,8 @@ gimp_color_scale_render_alpha (GimpColorScale *scale)
 
     case GTK_ORIENTATION_VERTICAL:
       {
-        guchar  light[4];
-        guchar  dark[4];
+        guchar  light[4] = {0xff, 0xff, 0xff, 0xff};
+        guchar  dark[4] = {0xff, 0xff, 0xff, 0xff};
 
         for (y = 0, d = buf; y < scale->height; y++, d += scale->rowstride)
           {
@@ -836,7 +836,7 @@ gimp_color_scale_render_stipple (GimpColorScale *scale)
   GtkWidget *widget = GTK_WIDGET (scale);
   GtkStyle  *style  = gtk_widget_get_style (widget);
   guchar    *buf;
-  guchar     insensitive[4];
+  guchar     insensitive[4] = {0xff, 0xff, 0xff, 0xff};
   guint      x, y;
 
   if ((buf = scale->buf) == NULL)



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