app/edit_cmds.c fix warnings about using uninitialized gimage args + one

Mon Nov 16 21:46:39 1998  Austin Donnelly  <austin@greenend.org.uk>

	* app/edit_cmds.c
	* app/gimage_mask_cmds.c: fix warnings about using uninitialized
	gimage args + one real uninited variable bug.
This commit is contained in:
Austin Donnelly 1998-11-16 22:10:35 +00:00 committed by Austin Donnelly
parent 44b1e35036
commit a6026d29cd
3 changed files with 74 additions and 24 deletions

View File

@ -1,3 +1,9 @@
Mon Nov 16 21:46:39 1998 Austin Donnelly <austin@greenend.org.uk>
* app/edit_cmds.c
* app/gimage_mask_cmds.c: fix warnings about using uninitialized
gimage args + one real uninited variable bug.
Mon Nov 16 19:04:54 MET 1998 Sven Neumann <sven@gimp.org>
* app/gimage_cmds.[ch]

View File

@ -51,10 +51,15 @@ edit_cut_invoker (Argument *args)
{
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
success = FALSE;
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
gimage = drawable_gimage (drawable);
{
gimage = drawable_gimage (drawable);
}
}
/* create the new image */
if (success)
@ -112,10 +117,15 @@ edit_copy_invoker (Argument *args)
{
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
success = FALSE;
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
gimage = drawable_gimage (drawable);
{
gimage = drawable_gimage (drawable);
}
}
/* create the new image */
@ -176,10 +186,15 @@ edit_paste_invoker (Argument *args)
{
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
success = FALSE;
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
gimage = drawable_gimage (drawable);
{
gimage = drawable_gimage (drawable);
}
}
if (success)
{
@ -260,10 +275,15 @@ edit_clear_invoker (Argument *args)
{
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
success = FALSE;
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
gimage = drawable_gimage (drawable);
{
gimage = drawable_gimage (drawable);
}
}
/* create the new image */
@ -321,10 +341,15 @@ edit_fill_invoker (Argument *args)
{
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
success = FALSE;
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
gimage = drawable_gimage (drawable);
{
gimage = drawable_gimage (drawable);
}
}
/* create the new image */
@ -383,10 +408,15 @@ edit_stroke_invoker (Argument *args)
{
int_value = args[0].value.pdb_int;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
success = FALSE;
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
gimage = drawable_gimage (drawable);
{
gimage = drawable_gimage (drawable);
}
}
/* create the new image */

View File

@ -359,10 +359,16 @@ gimage_mask_float_invoker (Argument *args)
if (success)
{
int_value = args[0].value.pdb_int;
if (drawable == NULL)
success = FALSE;
drawable = drawable_get_ID (int_value);
if (drawable == NULL)
{
success = FALSE;
gimage = NULL;
}
else
gimage = drawable_gimage (drawable);
{
gimage = drawable_gimage (drawable);
}
}
if (success)
{
@ -969,9 +975,14 @@ gimage_mask_layer_alpha_invoker (Argument *args)
{
int_value = args[0].value.pdb_int;
if ((layer = layer_get_ID (int_value)) == NULL)
success = FALSE;
{
success = FALSE;
gimage = NULL;
}
else
gimage = drawable_gimage (GIMP_DRAWABLE(layer));
{
gimage = drawable_gimage (GIMP_DRAWABLE(layer));
}
}
if (success)
gimage_mask_layer_alpha (gimage, layer);
@ -1025,7 +1036,10 @@ gimage_mask_load_invoker (Argument *args)
{
int_value = args[0].value.pdb_int;
if ((channel = channel_get_ID (int_value)) == NULL)
success = FALSE;
{
success = FALSE;
gimage = NULL;
}
else
{
success = (drawable_width (GIMP_DRAWABLE(channel)) == gimage->width &&