diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-08-10 19:38:16 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-08-10 19:38:16 +0200 |
commit | 72fc88a9a11f73817d8dc609a4c104ca0445722d (patch) | |
tree | 0f989ecce2712f7196706253349b561012d0fb2b | |
parent | ae1de0d884fbe931914e04c7a191b932b7a5904c (diff) | |
download | feh-72fc88a9a11f73817d8dc609a4c104ca0445722d.zip |
Remove unused variables
-rw-r--r-- | src/keyevents.c | 3 | ||||
-rw-r--r-- | src/menu.c | 11 | ||||
-rw-r--r-- | src/options.c | 5 | ||||
-rw-r--r-- | src/slideshow.c | 2 |
4 files changed, 6 insertions, 15 deletions
diff --git a/src/keyevents.c b/src/keyevents.c index 4f01c24..239746e 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -350,7 +350,6 @@ void feh_event_invoke_action(winwidget winwid, unsigned char action) void feh_event_handle_keypress(XEvent * ev) { - int len; int state; char kbuf[20]; KeySym keysym; @@ -368,7 +367,7 @@ void feh_event_handle_keypress(XEvent * ev) } kev = (XKeyEvent *) ev; - len = XLookupString(&ev->xkey, (char *) kbuf, sizeof(kbuf), &keysym, NULL); + XLookupString(&ev->xkey, (char *) kbuf, sizeof(kbuf), &keysym, NULL); state = kev->state & (ControlMask | ShiftMask | Mod1Mask | Mod4Mask); if (isascii(keysym)) @@ -439,14 +439,12 @@ void feh_menu_show_at_submenu(feh_menu * m, feh_menu * parent_m, feh_menu_item * void feh_menu_move(feh_menu * m, int x, int y) { - int dx, dy; - if (!m) return; - dx = x - m->x; - dy = y - m->y; + if (m->visible) XMoveWindow(disp, m->win, x, y); + m->x = x; m->y = y; return; @@ -580,7 +578,6 @@ void feh_menu_entry_get_size(feh_menu * m, feh_menu_item * i, int *w, int *h) } return; - m = NULL; } void feh_menu_calc_size(feh_menu * m) @@ -621,16 +618,14 @@ void feh_menu_calc_size(feh_menu * m) im = i->icon; if (im) { - int iw, ih, ow, oh; + int iw, ih, ow; iw = gib_imlib_image_get_width(im); ih = gib_imlib_image_get_height(im); if (ih <= max_h) { ow = iw; - oh = ih; } else { ow = (iw * max_h) / ih; - oh = max_h; } if (ow > icon_w) icon_w = ow; diff --git a/src/options.c b/src/options.c index 052f8a8..c29f057 100644 --- a/src/options.c +++ b/src/options.c @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. static void check_options(void); static void feh_getopt_theme(int argc, char **argv); static void feh_parse_option_array(int argc, char **argv, int finalrun); -static void feh_check_theme_options(int arg, char **argv); +static void feh_check_theme_options(int argc, char **argv); static void feh_parse_options_from_string(char *opts); static void feh_load_options_for_theme(char *theme); static void show_usage(void); @@ -120,7 +120,7 @@ void init_parse_options(int argc, char **argv) return; } -static void feh_check_theme_options(int arg, char **argv) +static void feh_check_theme_options(int argc, char **argv) { if (!theme) { /* This prevents screw up when running src/feh or ./feh */ @@ -137,7 +137,6 @@ static void feh_check_theme_options(int arg, char **argv) free(theme); return; - arg = 0; } static void feh_load_options_for_theme(char *theme) diff --git a/src/slideshow.c b/src/slideshow.c index 0d84c1d..25fca03 100644 --- a/src/slideshow.c +++ b/src/slideshow.c @@ -172,7 +172,6 @@ void feh_reload_image(winwidget w, int resize, int force_new) void slideshow_change_image(winwidget winwid, int change) { - int success = 0; gib_list *last = NULL; int i = 0; int jmp = 1; @@ -253,7 +252,6 @@ void slideshow_change_image(winwidget winwid, int change) if ((winwidget_loadimage(winwid, FEH_FILE(current_file->data))) != 0) { - success = 1; winwid->mode = MODE_NORMAL; winwid->file = current_file; if ((winwid->im_w != gib_imlib_image_get_width(winwid->im)) |