From 078fadde022379474981a92f5e32d557f216f0d9 Mon Sep 17 00:00:00 2001 From: Kim Woelders <kim@woelders.dk> Date: Wed, 16 Mar 2016 19:55:20 +0100 Subject: Fix some "variable set but not used" warnings. --- src/bin/imlib2_bumpmap.c | 4 +--- src/bin/imlib2_show.c | 29 ++++++++++++++++++----------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/bin/imlib2_bumpmap.c b/src/bin/imlib2_bumpmap.c index 16fb6f2..c38cb86 100644 --- a/src/bin/imlib2_bumpmap.c +++ b/src/bin/imlib2_bumpmap.c @@ -32,7 +32,7 @@ int main(int argc, char **argv) { int w, h, x, y; - Imlib_Image im = NULL, im_bg = NULL; + Imlib_Image im_bg; XEvent ev; const char *display_name = getenv("DISPLAY"); @@ -74,8 +74,6 @@ main(int argc, char **argv) imlib_context_set_color_modifier(NULL); im_bg = imlib_load_image(PACKAGE_DATA_DIR "/data/images/imlib2.png"); - im = imlib_load_image(PACKAGE_DATA_DIR "/data/images/imlib2.png"); - imlib_context_set_image(im_bg); w = imlib_image_get_width(); h = imlib_image_get_height(); diff --git a/src/bin/imlib2_show.c b/src/bin/imlib2_show.c index 91430d1..803657e 100644 --- a/src/bin/imlib2_show.c +++ b/src/bin/imlib2_show.c @@ -80,7 +80,10 @@ main(int argc, char **argv) int scaleup = 0; int scaleboth = 0; int origone = 0; + +#if 0 int bump_map_to_point = 0; +#endif Imlib_Color_Modifier colormod = 0; ImlibPolygon poly, poly2, poly3; int textdir = IMLIB_TEXT_TO_RIGHT; @@ -158,8 +161,10 @@ main(int argc, char **argv) scaleup = 1; else if (!strcmp(argv[i], "-both")) scaleboth = 1; +#if 0 else if (!strcmp(argv[i], "-bmp2pt")) bump_map_to_point = 1; +#endif else if (!strcmp(argv[i], "-orig")) origone = 1; else if (!strcmp(argv[i], "-blend")) @@ -786,8 +791,8 @@ main(int argc, char **argv) } else if (interactive) { - int wo, ho, px, py, first = 1; - Imlib_Image im_bg, im_sh1, im_sh2, im_sh3, im_ic[13], im_tmp; + int px, py, first = 1; + Imlib_Image im_bg, im_sh1, im_sh2, im_sh3, im_ic[13]; /* Imlib_Border border; */ Imlib_Updates up = NULL; @@ -935,11 +940,8 @@ main(int argc, char **argv) else im_bg = imlib_load_image(PACKAGE_DATA_DIR "/data/images/bg.png"); imlib_context_set_image(im_bg); - im_tmp = imlib_clone_image(); w = imlib_image_get_width(); h = imlib_image_get_height(); - wo = w; - ho = h; w *= 1; h *= 1; XResizeWindow(disp, win, w, h); @@ -1047,12 +1049,17 @@ main(int argc, char **argv) imlib_image_get_height()); } -/* - if( bump_map_to_point ) - imlib_apply_filter("bump_map_point(x=[],y=[],map=test_images/bulb.png);", &x, &y ); - else - imlib_apply_filter("bump_map(x=[],y=[],map=test_images/bulb.png);", &x, &y ); -*/ + +#if 0 + if (bump_map_to_point) + imlib_apply_filter + ("bump_map_point(x=[],y=[],map=test_images/bulb.png);", + &x, &y); + else + imlib_apply_filter + ("bump_map(x=[],y=[],map=test_images/bulb.png);", &x, &y); +#endif + up = imlib_update_append_rect(up, 0, 0, imlib_image_get_width(), imlib_image_get_height()); -- cgit v0.12