mirror of https://github.com/GNOME/gimp.git
Bug 761170 - Warnings building with clang
Fix a bunch of clang warnings.
This commit is contained in:
parent
c1902c31ab
commit
f2d581a536
|
@ -1917,8 +1917,10 @@ gimp_context_get_by_type (GimpContext *context,
|
||||||
GimpObject *object = NULL;
|
GimpObject *object = NULL;
|
||||||
|
|
||||||
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
|
||||||
g_return_val_if_fail ((prop = gimp_context_type_to_property (type)) != -1,
|
|
||||||
NULL);
|
prop = gimp_context_type_to_property (type);
|
||||||
|
|
||||||
|
g_return_val_if_fail (prop != -1, NULL);
|
||||||
|
|
||||||
g_object_get (context,
|
g_object_get (context,
|
||||||
gimp_context_prop_names[prop], &object,
|
gimp_context_prop_names[prop], &object,
|
||||||
|
@ -1941,7 +1943,10 @@ gimp_context_set_by_type (GimpContext *context,
|
||||||
GimpContextPropType prop;
|
GimpContextPropType prop;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||||
g_return_if_fail ((prop = gimp_context_type_to_property (type)) != -1);
|
|
||||||
|
prop = gimp_context_type_to_property (type);
|
||||||
|
|
||||||
|
g_return_if_fail (prop != -1);
|
||||||
|
|
||||||
g_object_set (context,
|
g_object_set (context,
|
||||||
gimp_context_prop_names[prop], object,
|
gimp_context_prop_names[prop], object,
|
||||||
|
@ -1956,7 +1961,10 @@ gimp_context_changed_by_type (GimpContext *context,
|
||||||
GimpObject *object;
|
GimpObject *object;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||||
g_return_if_fail ((prop = gimp_context_type_to_property (type)) != -1);
|
|
||||||
|
prop = gimp_context_type_to_property (type);
|
||||||
|
|
||||||
|
g_return_if_fail (prop != -1);
|
||||||
|
|
||||||
object = gimp_context_get_by_type (context, type);
|
object = gimp_context_get_by_type (context, type);
|
||||||
|
|
||||||
|
|
|
@ -332,7 +332,7 @@ gimp_image_new_from_pixbuf (Gimp *gimp,
|
||||||
GimpImage *new_image;
|
GimpImage *new_image;
|
||||||
GimpLayer *layer;
|
GimpLayer *layer;
|
||||||
GimpImageBaseType base_type;
|
GimpImageBaseType base_type;
|
||||||
gboolean has_alpha;
|
gboolean has_alpha = FALSE;
|
||||||
guint8 *icc_data;
|
guint8 *icc_data;
|
||||||
gsize icc_len;
|
gsize icc_len;
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,6 @@
|
||||||
|
|
||||||
#include "gimp-intl.h"
|
#include "gimp-intl.h"
|
||||||
|
|
||||||
static const guint8 goatpb2[];
|
|
||||||
static const guint8 goatpb[];
|
|
||||||
static const guint8 wanda[];
|
|
||||||
|
|
||||||
/* phish code */
|
/* phish code */
|
||||||
#define PHSHFRAMES 8
|
#define PHSHFRAMES 8
|
||||||
#define PHSHORIGWIDTH 288
|
#define PHSHORIGWIDTH 288
|
||||||
|
|
|
@ -489,7 +489,7 @@ static void
|
||||||
gimp_cursor_view_set_label_italic (GtkWidget *label,
|
gimp_cursor_view_set_label_italic (GtkWidget *label,
|
||||||
gboolean italic)
|
gboolean italic)
|
||||||
{
|
{
|
||||||
PangoAttrType attribute = italic ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL;
|
PangoStyle attribute = italic ? PANGO_STYLE_ITALIC : PANGO_STYLE_NORMAL;
|
||||||
|
|
||||||
gimp_label_set_attributes (GTK_LABEL (label),
|
gimp_label_set_attributes (GTK_LABEL (label),
|
||||||
PANGO_ATTR_STYLE, attribute,
|
PANGO_ATTR_STYLE, attribute,
|
||||||
|
|
|
@ -688,8 +688,8 @@ gimp_cage_tool_button_release (GimpTool *tool,
|
||||||
{
|
{
|
||||||
GeglRectangle area = { MIN (ct->selection_start_x, coords->x) - ct->offset_x,
|
GeglRectangle area = { MIN (ct->selection_start_x, coords->x) - ct->offset_x,
|
||||||
MIN (ct->selection_start_y, coords->y) - ct->offset_y,
|
MIN (ct->selection_start_y, coords->y) - ct->offset_y,
|
||||||
abs (ct->selection_start_x - coords->x),
|
ABS (ct->selection_start_x - coords->x),
|
||||||
abs (ct->selection_start_y - coords->y) };
|
ABS (ct->selection_start_y - coords->y) };
|
||||||
|
|
||||||
if (state & gimp_get_extend_selection_mask ())
|
if (state & gimp_get_extend_selection_mask ())
|
||||||
{
|
{
|
||||||
|
@ -718,8 +718,8 @@ gimp_cage_tool_button_release (GimpTool *tool,
|
||||||
{
|
{
|
||||||
GeglRectangle area = { MIN (ct->selection_start_x, coords->x) - ct->offset_x,
|
GeglRectangle area = { MIN (ct->selection_start_x, coords->x) - ct->offset_x,
|
||||||
MIN (ct->selection_start_y, coords->y) - ct->offset_y,
|
MIN (ct->selection_start_y, coords->y) - ct->offset_y,
|
||||||
abs (ct->selection_start_x - coords->x),
|
ABS (ct->selection_start_x - coords->x),
|
||||||
abs (ct->selection_start_y - coords->y) };
|
ABS (ct->selection_start_y - coords->y) };
|
||||||
|
|
||||||
if (state & gimp_get_extend_selection_mask ())
|
if (state & gimp_get_extend_selection_mask ())
|
||||||
{
|
{
|
||||||
|
@ -884,8 +884,8 @@ gimp_cage_tool_draw (GimpDrawTool *draw_tool)
|
||||||
FALSE,
|
FALSE,
|
||||||
MIN (ct->selection_start_x, ct->cursor_x),
|
MIN (ct->selection_start_x, ct->cursor_x),
|
||||||
MIN (ct->selection_start_y, ct->cursor_y),
|
MIN (ct->selection_start_y, ct->cursor_y),
|
||||||
abs (ct->selection_start_x - ct->cursor_x),
|
ABS (ct->selection_start_x - ct->cursor_x),
|
||||||
abs (ct->selection_start_y - ct->cursor_y));
|
ABS (ct->selection_start_y - ct->cursor_y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1035,7 +1035,7 @@ gimp_cage_tool_is_on_edge (GimpCageTool *ct,
|
||||||
lEB = lAB / 2 + (SQR (lBC) - SQR (lAC)) / (2 * lAB);
|
lEB = lAB / 2 + (SQR (lBC) - SQR (lAC)) / (2 * lAB);
|
||||||
lEC = sqrt (SQR (lBC) - SQR (lEB));
|
lEC = sqrt (SQR (lBC) - SQR (lEB));
|
||||||
|
|
||||||
if ((lEC < handle_size / 2) && (abs (SQR (lBC) - SQR (lAC)) <= SQR (lAB)))
|
if ((lEC < handle_size / 2) && (ABS (SQR (lBC) - SQR (lAC)) <= SQR (lAB)))
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
A = B;
|
A = B;
|
||||||
|
|
|
@ -182,9 +182,9 @@ gimp_shear_tool_motion (GimpTransformTool *tr_tool)
|
||||||
|
|
||||||
if (tr_tool->trans_info[HORZ_OR_VERT] == GIMP_ORIENTATION_UNKNOWN)
|
if (tr_tool->trans_info[HORZ_OR_VERT] == GIMP_ORIENTATION_UNKNOWN)
|
||||||
{
|
{
|
||||||
if (abs (diffx) > MIN_MOVE || abs (diffy) > MIN_MOVE)
|
if (ABS (diffx) > MIN_MOVE || ABS (diffy) > MIN_MOVE)
|
||||||
{
|
{
|
||||||
if (abs (diffx) > abs (diffy))
|
if (ABS (diffx) > ABS (diffy))
|
||||||
{
|
{
|
||||||
tr_tool->trans_info[HORZ_OR_VERT] = GIMP_ORIENTATION_HORIZONTAL;
|
tr_tool->trans_info[HORZ_OR_VERT] = GIMP_ORIENTATION_HORIZONTAL;
|
||||||
tr_tool->trans_info[XSHEAR] = 0.0;
|
tr_tool->trans_info[XSHEAR] = 0.0;
|
||||||
|
|
|
@ -773,7 +773,7 @@ gimp_plug_in_directory_file (const gchar *first_element,
|
||||||
const gchar *
|
const gchar *
|
||||||
gimp_user_directory (GimpUserDirectory type)
|
gimp_user_directory (GimpUserDirectory type)
|
||||||
{
|
{
|
||||||
return g_get_user_special_dir (type);
|
return g_get_user_special_dir ((GUserDirectory) type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -234,7 +234,7 @@ gimp_ruler_init (GimpRuler *ruler)
|
||||||
gtk_widget_set_has_window (GTK_WIDGET (ruler), FALSE);
|
gtk_widget_set_has_window (GTK_WIDGET (ruler), FALSE);
|
||||||
|
|
||||||
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||||
priv->unit = GIMP_PIXELS;
|
priv->unit = GIMP_UNIT_PIXEL;
|
||||||
priv->lower = 0;
|
priv->lower = 0;
|
||||||
priv->upper = 0;
|
priv->upper = 0;
|
||||||
priv->position = 0;
|
priv->position = 0;
|
||||||
|
|
|
@ -86,11 +86,6 @@ static const GimpModuleInfo colorsel_water_info =
|
||||||
"1998-2006"
|
"1998-2006"
|
||||||
};
|
};
|
||||||
|
|
||||||
static const GtkTargetEntry targets[] =
|
|
||||||
{
|
|
||||||
{ "application/x-color", 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_DYNAMIC_TYPE (ColorselWater, colorsel_water,
|
G_DEFINE_DYNAMIC_TYPE (ColorselWater, colorsel_water,
|
||||||
GIMP_TYPE_COLOR_SELECTOR)
|
GIMP_TYPE_COLOR_SELECTOR)
|
||||||
|
|
Loading…
Reference in New Issue