[gimp] Bug 761170: Warnings building with clang
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 761170: Warnings building with clang
- Date: Sat, 15 Jul 2017 19:06:23 +0000 (UTC)
commit f2306abc0a9c6d3c40d0409375e7e03992b58eb7
Author: Massimo Valentini <mvalentini src gnome org>
Date: Fri Jul 14 13:10:46 2017 +0200
Bug 761170: Warnings building with clang
Fix some of the warnings.
app/plug-in/gimppluginmanager-restore.c | 2 +-
libgimpcolor/gimpcolorprofile.c | 2 +-
libgimpcolor/gimpcolorspace.c | 2 +-
plug-ins/common/border-average.c | 2 +-
plug-ins/common/file-raw-data.c | 4 ++--
plug-ins/common/hot.c | 2 +-
plug-ins/common/mail.c | 9 +++------
plug-ins/gfig/gfig-dialog.c | 2 +-
plug-ins/script-fu/scheme-wrapper.c | 2 +-
9 files changed, 12 insertions(+), 15 deletions(-)
---
diff --git a/app/plug-in/gimppluginmanager-restore.c b/app/plug-in/gimppluginmanager-restore.c
index 5224788..3ff8639 100644
--- a/app/plug-in/gimppluginmanager-restore.c
+++ b/app/plug-in/gimppluginmanager-restore.c
@@ -284,7 +284,7 @@ gimp_plug_in_manager_search_directory (GimpPlugInManager *manager,
gimp_plug_in_manager_add_from_file (manager, child, mtime);
}
else if (g_file_query_file_type (child,
- G_FILE_CREATE_NONE,
+ G_FILE_QUERY_INFO_NONE,
NULL) == G_FILE_TYPE_DIRECTORY)
{
/* Search in subdirectory the first executable file with
diff --git a/libgimpcolor/gimpcolorprofile.c b/libgimpcolor/gimpcolorprofile.c
index efb1749..61600a4 100644
--- a/libgimpcolor/gimpcolorprofile.c
+++ b/libgimpcolor/gimpcolorprofile.c
@@ -852,7 +852,7 @@ gimp_color_profile_new_from_color_profile (GimpColorProfile *profile,
{
GimpColorProfile *new_profile;
cmsHPROFILE target_profile;
- GimpMatrix3 matrix = { 0, };
+ GimpMatrix3 matrix = { { { 0, } } };
cmsCIEXYZ *whitepoint;
cmsToneCurve *curve;
const gchar *model;
diff --git a/libgimpcolor/gimpcolorspace.c b/libgimpcolor/gimpcolorspace.c
index 760479c..e5d4864 100644
--- a/libgimpcolor/gimpcolorspace.c
+++ b/libgimpcolor/gimpcolorspace.c
@@ -1041,7 +1041,7 @@ gimp_hsv_to_rgb4 (guchar *rgb,
{
hue = value;
saturation = value;
- value = value;
+ /*value = value;*/
}
else
{
diff --git a/plug-ins/common/border-average.c b/plug-ins/common/border-average.c
index 94a44a4..c8144a2 100644
--- a/plug-ins/common/border-average.c
+++ b/plug-ins/common/border-average.c
@@ -121,7 +121,7 @@ run (const gchar *name,
static GimpParam values[3];
gint32 image_ID;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
- GimpRGB result_color;
+ GimpRGB result_color = { 0.0, };
GimpRunMode run_mode;
gint32 drawable_id;
GeglBuffer *buffer;
diff --git a/plug-ins/common/file-raw-data.c b/plug-ins/common/file-raw-data.c
index 6818c5f..f886377 100644
--- a/plug-ins/common/file-raw-data.c
+++ b/plug-ins/common/file-raw-data.c
@@ -1068,8 +1068,8 @@ load_image (const gchar *filename,
{
RawGimpData *data;
gint32 layer_id = -1;
- GimpImageType ltype = GIMP_RGB;
- GimpImageBaseType itype = GIMP_RGB_IMAGE;
+ GimpImageType ltype = GIMP_RGB_IMAGE;
+ GimpImageBaseType itype = GIMP_RGB;
goffset size;
gint bpp = 0;
gint bitspp = 8;
diff --git a/plug-ins/common/hot.c b/plug-ins/common/hot.c
index 55d0f1a..1c401b6 100644
--- a/plug-ins/common/hot.c
+++ b/plug-ins/common/hot.c
@@ -312,7 +312,7 @@ pluginCore (piArgs *argp)
gint nl = 0;
gint y, i;
gint Y, I, Q;
- guint width, height, bpp;
+ gint width, height, bpp;
gint sel_x1, sel_x2, sel_y1, sel_y2;
gint prog_interval;
guchar *src, *s, *dst, *d;
diff --git a/plug-ins/common/mail.c b/plug-ins/common/mail.c
index c17ee5d..ad48a15 100644
--- a/plug-ins/common/mail.c
+++ b/plug-ins/common/mail.c
@@ -375,20 +375,17 @@ send_image (const gchar *filename,
mailcmd[1] = "--attach";
mailcmd[2] = filepath;
i = 3;
- if (mail_info.subject &&
- strlen (mail_info.subject) > 0)
+ if (strlen (mail_info.subject) > 0)
{
mailcmd[i++] = "--subject";
mailcmd[i++] = mail_info.subject;
}
- if (mail_info.comment &&
- strlen (mail_info.comment) > 0)
+ if (strlen (mail_info.comment) > 0)
{
mailcmd[i++] = "--body";
mailcmd[i++] = mail_info.comment;
}
- if (mail_info.receipt &&
- strlen (mail_info.receipt) > 0)
+ if (strlen (mail_info.receipt) > 0)
{
mailcmd[i++] = mail_info.receipt;
}
diff --git a/plug-ins/gfig/gfig-dialog.c b/plug-ins/gfig/gfig-dialog.c
index ffaa7bc..bbcfc0c 100644
--- a/plug-ins/gfig/gfig-dialog.c
+++ b/plug-ins/gfig/gfig-dialog.c
@@ -1901,7 +1901,7 @@ load_file_chooser_response (GtkFileChooser *chooser,
void
paint_layer_fill (gdouble x1, gdouble y1, gdouble x2, gdouble y2)
{
- GimpBucketFillMode fill_mode = FILL_NONE;
+ GimpBucketFillMode fill_mode = GIMP_BUCKET_FILL_FG;
Style *current_style;
current_style = gfig_context_get_current_style ();
diff --git a/plug-ins/script-fu/scheme-wrapper.c b/plug-ins/script-fu/scheme-wrapper.c
index 53f4f49..538f0f6 100644
--- a/plug-ins/script-fu/scheme-wrapper.c
+++ b/plug-ins/script-fu/scheme-wrapper.c
@@ -78,7 +78,7 @@ typedef struct
gint value;
} NamedConstant;
-static const NamedConstant const script_constants[] =
+static const NamedConstant script_constants[] =
{
/* Useful values from libgimpbase/gimplimits.h */
{ "MIN-IMAGE-SIZE", GIMP_MIN_IMAGE_SIZE },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]