[gimp] Fix a bunch of warnings
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Fix a bunch of warnings
- Date: Tue, 31 Aug 2010 20:38:17 +0000 (UTC)
commit 0dc4b5de7254d74d875d6bdb18054981edc7547d
Author: Martin Nordholts <martinn src gnome org>
Date: Tue Aug 31 22:29:49 2010 +0200
Fix a bunch of warnings
app/core/gimpimage-convert.c | 2 +-
app/display/gimpcanvas.c | 2 ++
libgimpcolor/test-color-parser.c | 4 ++--
3 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpimage-convert.c b/app/core/gimpimage-convert.c
index 3a3181c..f1f28ea 100644
--- a/app/core/gimpimage-convert.c
+++ b/app/core/gimpimage-convert.c
@@ -2531,7 +2531,7 @@ find_best_colors (QuantizeObj *quantobj,
int inR, inG, inB; /* initial values for increments */
/* This array holds the distance to the nearest-so-far color for each cell */
- int bestdist[BOX_R_ELEMS * BOX_G_ELEMS * BOX_B_ELEMS];
+ int bestdist[BOX_R_ELEMS * BOX_G_ELEMS * BOX_B_ELEMS] = { 0, };
/* Initialize best-distance for each cell of the update box */
bptr = bestdist;
diff --git a/app/display/gimpcanvas.c b/app/display/gimpcanvas.c
index 16ef11e..91fe17b 100644
--- a/app/display/gimpcanvas.c
+++ b/app/display/gimpcanvas.c
@@ -26,6 +26,8 @@
#include "config/gimpdisplayconfig.h"
+#include "widgets/gimpwidgets-utils.h"
+
#include "gimpcanvas.h"
#include "gimp-intl.h"
diff --git a/libgimpcolor/test-color-parser.c b/libgimpcolor/test-color-parser.c
index 4bd1896..bc2bf0b 100644
--- a/libgimpcolor/test-color-parser.c
+++ b/libgimpcolor/test-color-parser.c
@@ -102,12 +102,12 @@ main (void)
if (failures)
{
g_print ("%d out of %d samples failed!\n\n",
- failures, G_N_ELEMENTS (samples));
+ failures, (int)G_N_ELEMENTS (samples));
return EXIT_FAILURE;
}
else
{
- g_print ("All %d samples passed.\n\n", G_N_ELEMENTS (samples));
+ g_print ("All %d samples passed.\n\n", (int)G_N_ELEMENTS (samples));
return EXIT_SUCCESS;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]