Bug 761170: Warnings building with clang

Fix some of the warnings.
This commit is contained in:
Massimo Valentini
2017-07-14 13:10:46 +02:00
committed by Michael Natterer
parent 4208aceafe
commit f2306abc0a
9 changed files with 12 additions and 15 deletions

View File

@ -284,7 +284,7 @@ gimp_plug_in_manager_search_directory (GimpPlugInManager *manager,
gimp_plug_in_manager_add_from_file (manager, child, mtime); gimp_plug_in_manager_add_from_file (manager, child, mtime);
} }
else if (g_file_query_file_type (child, else if (g_file_query_file_type (child,
G_FILE_CREATE_NONE, G_FILE_QUERY_INFO_NONE,
NULL) == G_FILE_TYPE_DIRECTORY) NULL) == G_FILE_TYPE_DIRECTORY)
{ {
/* Search in subdirectory the first executable file with /* Search in subdirectory the first executable file with

View File

@ -852,7 +852,7 @@ gimp_color_profile_new_from_color_profile (GimpColorProfile *profile,
{ {
GimpColorProfile *new_profile; GimpColorProfile *new_profile;
cmsHPROFILE target_profile; cmsHPROFILE target_profile;
GimpMatrix3 matrix = { 0, }; GimpMatrix3 matrix = { { { 0, } } };
cmsCIEXYZ *whitepoint; cmsCIEXYZ *whitepoint;
cmsToneCurve *curve; cmsToneCurve *curve;
const gchar *model; const gchar *model;

View File

@ -1041,7 +1041,7 @@ gimp_hsv_to_rgb4 (guchar *rgb,
{ {
hue = value; hue = value;
saturation = value; saturation = value;
value = value; /*value = value;*/
} }
else else
{ {

View File

@ -121,7 +121,7 @@ run (const gchar *name,
static GimpParam values[3]; static GimpParam values[3];
gint32 image_ID; gint32 image_ID;
GimpPDBStatusType status = GIMP_PDB_SUCCESS; GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GimpRGB result_color; GimpRGB result_color = { 0.0, };
GimpRunMode run_mode; GimpRunMode run_mode;
gint32 drawable_id; gint32 drawable_id;
GeglBuffer *buffer; GeglBuffer *buffer;

View File

@ -1068,8 +1068,8 @@ load_image (const gchar *filename,
{ {
RawGimpData *data; RawGimpData *data;
gint32 layer_id = -1; gint32 layer_id = -1;
GimpImageType ltype = GIMP_RGB; GimpImageType ltype = GIMP_RGB_IMAGE;
GimpImageBaseType itype = GIMP_RGB_IMAGE; GimpImageBaseType itype = GIMP_RGB;
goffset size; goffset size;
gint bpp = 0; gint bpp = 0;
gint bitspp = 8; gint bitspp = 8;

View File

@ -312,7 +312,7 @@ pluginCore (piArgs *argp)
gint nl = 0; gint nl = 0;
gint y, i; gint y, i;
gint Y, I, Q; gint Y, I, Q;
guint width, height, bpp; gint width, height, bpp;
gint sel_x1, sel_x2, sel_y1, sel_y2; gint sel_x1, sel_x2, sel_y1, sel_y2;
gint prog_interval; gint prog_interval;
guchar *src, *s, *dst, *d; guchar *src, *s, *dst, *d;

View File

@ -375,20 +375,17 @@ send_image (const gchar *filename,
mailcmd[1] = "--attach"; mailcmd[1] = "--attach";
mailcmd[2] = filepath; mailcmd[2] = filepath;
i = 3; i = 3;
if (mail_info.subject && if (strlen (mail_info.subject) > 0)
strlen (mail_info.subject) > 0)
{ {
mailcmd[i++] = "--subject"; mailcmd[i++] = "--subject";
mailcmd[i++] = mail_info.subject; mailcmd[i++] = mail_info.subject;
} }
if (mail_info.comment && if (strlen (mail_info.comment) > 0)
strlen (mail_info.comment) > 0)
{ {
mailcmd[i++] = "--body"; mailcmd[i++] = "--body";
mailcmd[i++] = mail_info.comment; mailcmd[i++] = mail_info.comment;
} }
if (mail_info.receipt && if (strlen (mail_info.receipt) > 0)
strlen (mail_info.receipt) > 0)
{ {
mailcmd[i++] = mail_info.receipt; mailcmd[i++] = mail_info.receipt;
} }

View File

@ -1901,7 +1901,7 @@ load_file_chooser_response (GtkFileChooser *chooser,
void void
paint_layer_fill (gdouble x1, gdouble y1, gdouble x2, gdouble y2) 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; Style *current_style;
current_style = gfig_context_get_current_style (); current_style = gfig_context_get_current_style ();

View File

@ -78,7 +78,7 @@ typedef struct
gint value; gint value;
} NamedConstant; } NamedConstant;
static const NamedConstant const script_constants[] = static const NamedConstant script_constants[] =
{ {
/* Useful values from libgimpbase/gimplimits.h */ /* Useful values from libgimpbase/gimplimits.h */
{ "MIN-IMAGE-SIZE", GIMP_MIN_IMAGE_SIZE }, { "MIN-IMAGE-SIZE", GIMP_MIN_IMAGE_SIZE },