mirror of https://github.com/GNOME/gimp.git
app: Fix initialization warnings
Initialized values in gimpruler.c and gimptoolrectangle.c to remove warnings about uninitialized variables.
This commit is contained in:
parent
1ed8b20f02
commit
f2bf2b7fe3
|
@ -2022,8 +2022,10 @@ static void
|
|||
gimp_tool_rectangle_update_options (GimpToolRectangle *rectangle)
|
||||
{
|
||||
GimpToolRectanglePrivate *private = rectangle->private;
|
||||
gdouble x1, y1;
|
||||
gdouble x2, y2;
|
||||
gdouble x1 = 0;
|
||||
gdouble y1 = 0;
|
||||
gdouble x2 = 0;
|
||||
gdouble y2 = 0;
|
||||
|
||||
gimp_tool_rectangle_get_public_rect (rectangle, &x1, &y1, &x2, &y2);
|
||||
|
||||
|
@ -2158,7 +2160,10 @@ static void
|
|||
gimp_tool_rectangle_update_status (GimpToolRectangle *rectangle)
|
||||
{
|
||||
GimpToolRectanglePrivate *private = rectangle->private;
|
||||
gdouble x1, y1, x2, y2;
|
||||
gdouble x1 = 0;
|
||||
gdouble y1 = 0;
|
||||
gdouble x2 = 0;
|
||||
gdouble y2 = 0;
|
||||
|
||||
gimp_tool_rectangle_get_public_rect (rectangle, &x1, &y1, &x2, &y2);
|
||||
|
||||
|
@ -2432,7 +2437,10 @@ gimp_tool_rectangle_coord_on_handle (GimpToolRectangle *rectangle,
|
|||
{
|
||||
GimpToolRectanglePrivate *private = rectangle->private;
|
||||
GimpDisplayShell *shell;
|
||||
gdouble x1, y1, x2, y2;
|
||||
gdouble x1 = 0;
|
||||
gdouble y1 = 0;
|
||||
gdouble x2 = 0;
|
||||
gdouble y2 = 0;
|
||||
gdouble rect_w, rect_h;
|
||||
gdouble handle_x = 0;
|
||||
gdouble handle_y = 0;
|
||||
|
@ -2834,7 +2842,10 @@ gimp_tool_rectangle_setup_snap_offsets (GimpToolRectangle *rectangle,
|
|||
{
|
||||
GimpToolWidget *widget = GIMP_TOOL_WIDGET (rectangle);
|
||||
GimpToolRectanglePrivate *private = rectangle->private;
|
||||
gdouble x1, y1, x2, y2;
|
||||
gdouble x1 = 0;
|
||||
gdouble y1 = 0;
|
||||
gdouble x2 = 0;
|
||||
gdouble y2 = 0;
|
||||
gdouble coord_x, coord_y;
|
||||
|
||||
gimp_tool_rectangle_get_public_rect (rectangle, &x1, &y1, &x2, &y2);
|
||||
|
@ -4181,7 +4192,10 @@ gimp_tool_rectangle_point_in_rectangle (GimpToolRectangle *rectangle,
|
|||
gdouble x,
|
||||
gdouble y)
|
||||
{
|
||||
gdouble x1, y1, x2, y2;
|
||||
gdouble x1 = 0;
|
||||
gdouble y1 = 0;
|
||||
gdouble x2 = 0;
|
||||
gdouble y2 = 0;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_TOOL_RECTANGLE (rectangle), FALSE);
|
||||
|
||||
|
|
|
@ -390,10 +390,10 @@ gimp_ruler_update_position (GimpRuler *ruler,
|
|||
gdouble x,
|
||||
gdouble y)
|
||||
{
|
||||
GimpRulerPrivate *priv = GET_PRIVATE (ruler);
|
||||
GimpRulerPrivate *priv = GET_PRIVATE (ruler);
|
||||
GtkAllocation allocation;
|
||||
gdouble lower;
|
||||
gdouble upper;
|
||||
gdouble lower = 0;
|
||||
gdouble upper = 0;
|
||||
|
||||
gtk_widget_get_allocation (GTK_WIDGET (ruler), &allocation);
|
||||
gimp_ruler_get_range (ruler, &lower, &upper, NULL);
|
||||
|
@ -1005,7 +1005,8 @@ gimp_ruler_draw_ticks (GimpRuler *ruler)
|
|||
gint i;
|
||||
gint width, height;
|
||||
gint length, ideal_length;
|
||||
gdouble lower, upper; /* Upper and lower limits, in ruler units */
|
||||
gdouble lower = 0; /* Upper and lower limits, in ruler units */
|
||||
gdouble upper = 0;
|
||||
gdouble increment; /* Number of pixels per unit */
|
||||
gint scale; /* Number of units per major unit */
|
||||
gdouble start, end, cur;
|
||||
|
@ -1209,7 +1210,8 @@ gimp_ruler_get_pos_rect (GimpRuler *ruler,
|
|||
GtkAllocation allocation;
|
||||
GtkBorder border;
|
||||
gint width, height;
|
||||
gdouble upper, lower;
|
||||
gdouble upper = 0;
|
||||
gdouble lower = 0;
|
||||
gdouble increment;
|
||||
GdkRectangle rect = { 0, };
|
||||
|
||||
|
|
Loading…
Reference in New Issue