[gimp] plug-ins: remove some more -Wunused-but-set-variable



commit ab3fe1027542d4955df1d447a853fb5e297a4dc1
Author: Michael Natterer <mitch gimp org>
Date:   Sun May 15 21:12:49 2011 +0200

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

 plug-ins/common/blur-motion.c            |    9 ++++-----
 plug-ins/common/border-average.c         |    4 ----
 plug-ins/common/bump-map.c               |    2 --
 plug-ins/common/color-exchange.c         |    3 +--
 plug-ins/file-ico/ico-load.c             |    6 ++----
 plug-ins/file-jpeg/jpeg-save.c           |   16 +++++++---------
 plug-ins/file-xjt/xjpeg.c                |    3 ---
 plug-ins/imagemap/imap_main.c            |    3 +--
 plug-ins/map-object/map-object-preview.c |   26 ++++----------------------
 plug-ins/pagecurl/pagecurl.c             |    3 +--
 10 files changed, 20 insertions(+), 55 deletions(-)
---
diff --git a/plug-ins/common/blur-motion.c b/plug-ins/common/blur-motion.c
index b5abe04..c406322 100644
--- a/plug-ins/common/blur-motion.c
+++ b/plug-ins/common/blur-motion.c
@@ -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),
diff --git a/plug-ins/common/border-average.c b/plug-ins/common/border-average.c
index 5bb3d79..0c33162 100644
--- a/plug-ins/common/border-average.c
+++ b/plug-ins/common/border-average.c
@@ -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));
diff --git a/plug-ins/common/bump-map.c b/plug-ins/common/bump-map.c
index fdf3d31..6dfb42c 100644
--- a/plug-ins/common/bump-map.c
+++ b/plug-ins/common/bump-map.c
@@ -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,
diff --git a/plug-ins/common/color-exchange.c b/plug-ins/common/color-exchange.c
index 9e0000c..b89a0b7 100644
--- a/plug-ins/common/color-exchange.c
+++ b/plug-ins/common/color-exchange.c
@@ -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);
diff --git a/plug-ins/file-ico/ico-load.c b/plug-ins/file-ico/ico-load.c
index 807cadf..fde543a 100644
--- a/plug-ins/file-ico/ico-load.c
+++ b/plug-ins/file-ico/ico-load.c
@@ -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;
diff --git a/plug-ins/file-jpeg/jpeg-save.c b/plug-ins/file-jpeg/jpeg-save.c
index f68aa97..cece630 100644
--- a/plug-ins/file-jpeg/jpeg-save.c
+++ b/plug-ins/file-jpeg/jpeg-save.c
@@ -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;
     }
 
diff --git a/plug-ins/file-xjt/xjpeg.c b/plug-ins/file-xjt/xjpeg.c
index 6b962cf..c0a21f1 100644
--- a/plug-ins/file-xjt/xjpeg.c
+++ b/plug-ins/file-xjt/xjpeg.c
@@ -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);
 
diff --git a/plug-ins/imagemap/imap_main.c b/plug-ins/imagemap/imap_main.c
index b6dbc7d..60f8069 100644
--- a/plug-ins/imagemap/imap_main.c
+++ b/plug-ins/imagemap/imap_main.c
@@ -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);
diff --git a/plug-ins/map-object/map-object-preview.c b/plug-ins/map-object/map-object-preview.c
index d1186f0..c270745 100644
--- a/plug-ins/map-object/map-object-preview.c
+++ b/plug-ins/map-object/map-object-preview.c
@@ -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)
diff --git a/plug-ins/pagecurl/pagecurl.c b/plug-ins/pagecurl/pagecurl.c
index 1400a58..e3b5126 100644
--- a/plug-ins/pagecurl/pagecurl.c
+++ b/plug-ins/pagecurl/pagecurl.c
@@ -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 */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]