[gimp] app/core: Init bestcolor in gimpimage-convert.c



commit 3e60cacfd598cf58a188062174ce9eaf21e22611
Author: Martin Nordholts <martinn src gnome org>
Date:   Fri Sep 3 08:37:42 2010 +0200

    app/core: Init bestcolor in gimpimage-convert.c
    
    Init bestcolor in gimpimage-convert.c to fix warning about "may be
    used uninitialized in this function".

 app/core/gimpimage-convert.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimpimage-convert.c b/app/core/gimpimage-convert.c
index f1f28ea..c1353ac 100644
--- a/app/core/gimpimage-convert.c
+++ b/app/core/gimpimage-convert.c
@@ -2652,7 +2652,7 @@ fill_inverse_cmap_rgb (QuantizeObj *quantobj,
   int colorlist[MAXNUMCOLORS];
   int numcolors;                /* number of candidate colors */
   /* This array holds the actually closest colormap index for each cell. */
-  int bestcolor[BOX_R_ELEMS * BOX_G_ELEMS * BOX_B_ELEMS];
+  int bestcolor[BOX_R_ELEMS * BOX_G_ELEMS * BOX_B_ELEMS] = { 0, };
 
   /* Convert cell coordinates to update box id */
   R >>= BOX_R_LOG;



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