mirror of https://github.com/GNOME/gimp.git
Fixes for some Sparse reported issues in app/
2008-03-28 Mukund Sivaraman <muks@mukund.org> Fixes for some Sparse reported issues in app/ * app/core/gimpdrawable-operation.c: Added prototype for gegl_node_add_child(). * app/core/gimpcurve.c: Remove C99 code * app/tools/gimpcurvestool.c * app/tools/gimpperspectiveclonetool.c * app/vectors/gimpstroke.c: Mark functions as static. * app/base/siox.c: state is a pointer. * app/plug-in/gimppluginprocframe.c: values is a pointer. * app/plug-in/plug-in-rc.c: plug_in_rc_parse() returns a pointer. * app/plug-in/gimpinterpreterdb.c: Check program[0] for '\0' instead of the pointer program itself. svn path=/trunk/; revision=25292
This commit is contained in:
parent
4831a428c3
commit
0708ffea76
22
ChangeLog
22
ChangeLog
|
@ -1,3 +1,25 @@
|
|||
2008-03-28 Mukund Sivaraman <muks@mukund.org>
|
||||
|
||||
Fixes for some Sparse reported issues in app/
|
||||
|
||||
* app/core/gimpdrawable-operation.c: Added prototype for
|
||||
gegl_node_add_child().
|
||||
|
||||
* app/core/gimpcurve.c: Remove C99 code
|
||||
|
||||
* app/tools/gimpcurvestool.c
|
||||
* app/tools/gimpperspectiveclonetool.c
|
||||
* app/vectors/gimpstroke.c: Mark functions as static.
|
||||
|
||||
* app/base/siox.c: state is a pointer.
|
||||
|
||||
* app/plug-in/gimppluginprocframe.c: values is a pointer.
|
||||
|
||||
* app/plug-in/plug-in-rc.c: plug_in_rc_parse() returns a pointer.
|
||||
|
||||
* app/plug-in/gimpinterpreterdb.c: Check program[0] for '\0'
|
||||
instead of the pointer program itself.
|
||||
|
||||
2008-03-28 Mukund Sivaraman <muks@mukund.org>
|
||||
|
||||
* plug-ins/common/png.c: Fixed a bug where a pointer to a gint
|
||||
|
|
|
@ -1294,7 +1294,7 @@ siox_drb (SioxState *state,
|
|||
gpointer pr;
|
||||
gint row, col;
|
||||
|
||||
g_return_if_fail (state != 0);
|
||||
g_return_if_fail (state != NULL);
|
||||
g_return_if_fail (mask != NULL && tile_manager_bpp (mask) == 1);
|
||||
|
||||
pixel_region_init (&srcPR, state->pixels,
|
||||
|
|
|
@ -713,13 +713,15 @@ static void
|
|||
gimp_curve_calculate (GimpCurve *curve)
|
||||
{
|
||||
gint i;
|
||||
gint points[curve->n_points];
|
||||
gint *points;
|
||||
gint num_pts;
|
||||
gint p1, p2, p3, p4;
|
||||
|
||||
if (GIMP_DATA (curve)->freeze_count > 0)
|
||||
return;
|
||||
|
||||
points = g_newa (gint, curve->n_points);
|
||||
|
||||
switch (curve->curve_type)
|
||||
{
|
||||
case GIMP_CURVE_SMOOTH:
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
#include "gimpprogress.h"
|
||||
|
||||
|
||||
#warning FIXME: gegl_node_add_child() is not public API
|
||||
|
||||
extern GeglNode * gegl_node_add_child (GeglNode *self,
|
||||
GeglNode *child);
|
||||
|
||||
void
|
||||
gimp_drawable_apply_operation (GimpDrawable *drawable,
|
||||
GeglNode *operation,
|
||||
|
@ -69,6 +74,8 @@ gimp_drawable_apply_operation (GimpDrawable *drawable,
|
|||
"linear", linear,
|
||||
NULL);
|
||||
|
||||
#warning FIXME: gegl_node_add_child() is not public API
|
||||
|
||||
gegl_node_add_child (gegl, operation);
|
||||
|
||||
gegl_node_link_many (input, operation, output, NULL);
|
||||
|
|
|
@ -297,7 +297,8 @@ gimp_interpreter_db_add_binfmt_misc (GimpInterpreterDB *db,
|
|||
type = tokens[1];
|
||||
program = tokens[5];
|
||||
|
||||
if (name[0] == '\0' || program == '\0' || type[0] == '\0' || type[1] != '\0')
|
||||
if ((name[0] == '\0') || (program[0] == '\0') ||
|
||||
(type[0] == '\0') || (type[1] != '\0'))
|
||||
goto bail;
|
||||
|
||||
switch (type[0])
|
||||
|
|
|
@ -181,7 +181,7 @@ gimp_plug_in_proc_frame_get_return_vals (GimpPlugInProcFrame *proc_frame)
|
|||
|
||||
/* Free the old arguments. */
|
||||
g_free (proc_frame->return_vals->values);
|
||||
proc_frame->return_vals->values = 0;
|
||||
proc_frame->return_vals->values = NULL;
|
||||
proc_frame->return_vals->n_values = 0;
|
||||
g_value_array_free (proc_frame->return_vals);
|
||||
}
|
||||
|
|
|
@ -102,9 +102,9 @@ plug_in_rc_parse (Gimp *gimp,
|
|||
gint version = GIMP_PROTOCOL_VERSION;
|
||||
GTokenType token;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
|
||||
g_return_val_if_fail (filename != NULL, FALSE);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
||||
g_return_val_if_fail (filename != NULL, NULL);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
|
||||
|
||||
scanner = gimp_scanner_new_file (filename, error);
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ gimp_curves_tool_button_release (GimpTool *tool,
|
|||
release_type, display);
|
||||
}
|
||||
|
||||
gboolean
|
||||
static gboolean
|
||||
gimp_curves_tool_key_press (GimpTool *tool,
|
||||
GdkEventKey *kevent,
|
||||
GimpDisplay *display)
|
||||
|
|
|
@ -429,7 +429,7 @@ gimp_perspective_clone_tool_prepare (GimpPerspectiveCloneTool *clone_tool,
|
|||
clone_tool->trans_info[Y3] = clone_tool->y2;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gimp_perspective_clone_tool_recalc (GimpPerspectiveCloneTool *clone_tool,
|
||||
GimpDisplay *display)
|
||||
{
|
||||
|
|
|
@ -636,7 +636,7 @@ gimp_stroke_point_is_movable (GimpStroke *stroke,
|
|||
}
|
||||
|
||||
|
||||
gboolean
|
||||
static gboolean
|
||||
gimp_stroke_real_point_is_movable (GimpStroke *stroke,
|
||||
GimpAnchor *predec,
|
||||
gdouble position)
|
||||
|
@ -660,7 +660,7 @@ gimp_stroke_point_move_relative (GimpStroke *stroke,
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
gimp_stroke_real_point_move_relative (GimpStroke *stroke,
|
||||
GimpAnchor *predec,
|
||||
gdouble position,
|
||||
|
@ -685,7 +685,7 @@ gimp_stroke_point_move_absolute (GimpStroke *stroke,
|
|||
feature);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gimp_stroke_real_point_move_absolute (GimpStroke *stroke,
|
||||
GimpAnchor *predec,
|
||||
gdouble position,
|
||||
|
@ -780,7 +780,7 @@ gimp_stroke_anchor_is_insertable (GimpStroke *stroke,
|
|||
position);
|
||||
}
|
||||
|
||||
gboolean
|
||||
static gboolean
|
||||
gimp_stroke_real_anchor_is_insertable (GimpStroke *stroke,
|
||||
GimpAnchor *predec,
|
||||
gdouble position)
|
||||
|
@ -802,7 +802,7 @@ gimp_stroke_anchor_insert (GimpStroke *stroke,
|
|||
predec, position);
|
||||
}
|
||||
|
||||
GimpAnchor *
|
||||
static GimpAnchor *
|
||||
gimp_stroke_real_anchor_insert (GimpStroke *stroke,
|
||||
GimpAnchor *predec,
|
||||
gdouble position)
|
||||
|
@ -982,7 +982,7 @@ gimp_stroke_duplicate (const GimpStroke *stroke)
|
|||
return GIMP_STROKE_GET_CLASS (stroke)->duplicate (stroke);
|
||||
}
|
||||
|
||||
GimpStroke *
|
||||
static GimpStroke *
|
||||
gimp_stroke_real_duplicate (const GimpStroke *stroke)
|
||||
{
|
||||
GimpStroke *new_stroke;
|
||||
|
|
Loading…
Reference in New Issue