Commit ab3fe102 authored by Michael Natterer's avatar Michael Natterer 😴
Browse files

plug-ins: remove some more -Wunused-but-set-variable

parent ab0b88b5
......@@ -998,7 +998,6 @@ mblur_dialog (gint32 image_ID,
GtkWidget *table;
GtkWidget *entry;
GtkWidget *spinbutton;
GtkWidget *label;
GtkWidget *button;
GtkObject *adj;
gdouble xres, yres;
......@@ -1088,13 +1087,13 @@ mblur_dialog (gint32 image_ID,
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (entry), 0, xres, TRUE);
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (entry), 0, mbvals.center_x);
label = gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
_("_X:"), 0, 0, 0.0);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
_("_X:"), 0, 0, 0.0);
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (entry), 1, yres, TRUE);
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (entry), 1, mbvals.center_y);
label = gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
_("_Y:"), 1, 0, 0.0);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
_("_Y:"), 1, 0, 0.0);
button = gtk_check_button_new_with_mnemonic (_("Blur _outward"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
......
......@@ -228,8 +228,6 @@ static void
borderaverage (GimpDrawable *drawable,
GimpRGB *result)
{
gint width;
gint height;
gint x1, x2, y1, y2;
gint bytes;
gint max;
......@@ -269,8 +267,6 @@ borderaverage (GimpDrawable *drawable,
/* Get the size of the input image. (This will/must be the same
* as the size of the output image.
*/
width = drawable->width;
height = drawable->height;
bytes = drawable->bpp;
gimp_tile_cache_ntiles (2 * ((x2 - x1) / gimp_tile_width () + 1));
......
......@@ -1176,11 +1176,9 @@ dialog_update_preview (GimpPreview *preview)
gint y;
gint x1, y1;
gint width, height;
gint bytes;
gimp_preview_get_position (preview, &x1, &y1);
gimp_preview_get_size (preview, &width, &height);
bytes = drawable->bpp;
/* Initialize source rows */
gimp_pixel_rgn_init (&bmint.src_rgn, drawable,
......
......@@ -659,7 +659,7 @@ exchange (GimpDrawable *drawable,
guchar *src_row, *dest_row;
gint x, y, bpp = drawable->bpp;
gboolean has_alpha;
gint x1, y1, x2, y2;
gint x1, y1, y2;
gint width, height;
GimpRGB min;
GimpRGB max;
......@@ -675,7 +675,6 @@ exchange (GimpDrawable *drawable,
return;
}
x2 = x1 + width;
y2 = y1 + height;
has_alpha = gimp_drawable_has_alpha (drawable->drawable_id);
......
......@@ -637,7 +637,6 @@ ico_load_image (const gchar *filename,
gint max_width, max_height;
gint i;
gint32 image;
gint32 layer;
guchar *buffer;
guint icon_count;
gint maxsize;
......@@ -693,7 +692,7 @@ ico_load_image (const gchar *filename,
buffer = g_new (guchar, max_width * max_height * 4);
for (i = 0; i < icon_count; i++)
{
layer = ico_load_layer (fp, image, i, buffer, maxsize, info+i);
ico_load_layer (fp, image, i, buffer, maxsize, info+i);
}
g_free (buffer);
g_free (info);
......@@ -713,7 +712,6 @@ ico_load_thumbnail_image (const gchar *filename,
FILE *fp;
IcoLoadInfo *info;
gint32 image;
gint32 layer;
gint w = 0;
gint h = 0;
gint bpp = 0;
......@@ -777,7 +775,7 @@ ico_load_thumbnail_image (const gchar *filename,
image = gimp_image_new (w, h, GIMP_RGB);
buffer = g_new (guchar, w*h*4);
layer = ico_load_layer (fp, image, match, buffer, w*h*4, info+match);
ico_load_layer (fp, image, match, buffer, w*h*4, info+match);
g_free (buffer);
*width = w;
......
......@@ -1493,16 +1493,15 @@ create_thumbnail (gint32 image_ID,
gdouble quality,
guchar **thumbnail_buffer)
{
GimpDrawable *drawable;
gint req_width, req_height, bpp, rbpp;
guchar *thumbnail_data = NULL;
GimpDrawable *drawable;
gint req_width, req_height, bpp, rbpp;
guchar *thumbnail_data = NULL;
struct jpeg_compress_struct cinfo;
struct my_error_mgr jerr;
my_dest_ptr dest;
gboolean alpha = FALSE;
JSAMPROW scanline[1];
guchar *buf = NULL;
gint i;
my_dest_ptr dest;
JSAMPROW scanline[1];
guchar *buf = NULL;
gint i;
drawable = gimp_drawable_get (drawable_ID);
......@@ -1523,7 +1522,6 @@ create_thumbnail (gint32 image_ID,
if ((bpp == 2) || (bpp == 4))
{
alpha = TRUE;
rbpp = bpp - 1;
}
......
......@@ -274,7 +274,6 @@ xjpg_load_layer_alpha (const char *filename,
{
GimpPixelRgn l_pixel_rgn;
GimpDrawable *l_drawable;
GimpImageType l_layer_type;
struct jpeg_decompress_struct cinfo;
struct my_error_mgr jerr;
FILE *infile;
......@@ -292,8 +291,6 @@ xjpg_load_layer_alpha (const char *filename,
cinfo.err = jpeg_std_error (&jerr.pub);
jerr.pub.error_exit = my_error_exit;
l_layer_type = GIMP_GRAY_IMAGE;
/* add alpha channel */
gimp_layer_add_alpha (layer_id);
......
......@@ -1215,7 +1215,6 @@ dialog(GimpDrawable *drawable)
GtkWidget *hbox;
GtkWidget *main_vbox;
GtkWidget *tools;
Menu_t *menu;
gimp_ui_init (PLUG_IN_BINARY, TRUE);
......@@ -1251,7 +1250,7 @@ dialog(GimpDrawable *drawable)
init_stock_icons();
/* Create menu */
menu = make_menu(main_vbox, dlg);
make_menu(main_vbox, dlg);
/* Create toolbar */
make_toolbar(main_vbox, dlg);
......
......@@ -210,17 +210,11 @@ draw_light_marker (cairo_t *cr,
gint xpos,
gint ypos)
{
GdkColor color;
gint pw, ph, startx, starty;
GdkColor color;
if (mapvals.lightsource.type != POINT_LIGHT)
return;
pw = PREVIEW_WIDTH * mapvals.zoom;
ph = PREVIEW_HEIGHT * mapvals.zoom;
startx = (PREVIEW_WIDTH - pw) / 2;
starty = (PREVIEW_HEIGHT - ph) / 2;
cairo_set_line_width (cr, 1.0);
color.red = 0x0;
......@@ -288,12 +282,10 @@ compute_preview_image (void)
{
GdkDisplay *display = gtk_widget_get_display (previewarea);
GdkCursor *cursor;
gint startx, starty, pw, ph;
gint pw, ph;
pw = PREVIEW_WIDTH * mapvals.zoom;
ph = PREVIEW_HEIGHT * mapvals.zoom;
startx = (PREVIEW_WIDTH - pw) / 2;
starty = (PREVIEW_HEIGHT - ph) / 2;
cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
gdk_window_set_cursor (gtk_widget_get_window (previewarea), cursor);
......@@ -394,7 +386,7 @@ draw_wireframe_plane (cairo_t *cr,
{
GimpVector3 v1, v2, a, b, c, d, dir1, dir2;
gint cnt;
gdouble x1, y1, x2, y2, cx1, cy1, cx2, cy2, fac;
gdouble x1, y1, x2, y2, fac;
cairo_rectangle (cr, startx, starty, pw, ph);
cairo_clip (cr);
......@@ -431,11 +423,6 @@ draw_wireframe_plane (cairo_t *cr,
c = b;
cx1 = (gdouble) startx;
cy1 = (gdouble) starty;
cx2 = cx1 + (gdouble) pw;
cy2 = cy1 + (gdouble) ph;
for (cnt = 0; cnt <= WIRESIZE; cnt++)
{
gimp_vector_3d_to_2d (startx, starty, pw, ph,
......@@ -476,7 +463,7 @@ draw_wireframe_sphere (cairo_t *cr,
{
GimpVector3 p[2 * (WIRESIZE + 5)];
gint cnt, cnt2;
gdouble x1, y1, x2, y2, twopifac, cx1, cy1, cx2, cy2;
gdouble x1, y1, x2, y2, twopifac;
cairo_rectangle (cr, startx, starty, pw, ph);
cairo_clip (cr);
......@@ -544,11 +531,6 @@ draw_wireframe_sphere (cairo_t *cr,
/* Draw the circles (equator and zero meridian) */
/* ============================================ */
cx1 = (gdouble) startx;
cy1 = (gdouble) starty;
cx2 = cx1 + (gdouble) pw;
cy2 = cy1 + (gdouble) ph;
for (cnt = 0; cnt < cnt2 - 1; cnt++)
{
if (p[cnt].z > mapvals.position.z && p[cnt + 1].z > mapvals.position.z)
......
......@@ -717,7 +717,7 @@ do_curl_effect (gint32 drawable_id)
gboolean color_image;
gint x1, y1, k;
guint alpha_pos, progress, max_progress;
gdouble intensity, alpha, beta;
gdouble intensity, alpha;
GimpVector2 v, dl, dr;
gdouble dl_mag, dr_mag, angle, factor;
guchar *pp, *dest, fore_grayval, back_grayval;
......@@ -760,7 +760,6 @@ do_curl_effect (gint32 drawable_id)
-(sel_height - right_tangent.y));
dr_mag = gimp_vector2_length (&dr);
alpha = acos (gimp_vector2_inner_product (&dl, &dr) / (dl_mag * dr_mag));
beta = alpha / 2;
/* Init shade_curl */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment