summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-05-06 22:36:47 +0200
committerDaniel Friesel <derf@finalrewind.org>2014-05-06 22:37:11 +0200
commit6831868212df803a53eb6dd2913c2ff3eb218197 (patch)
tree37ef8435980992ee604e1709e54304e00e3b6458
parent03b4faf6d71f52568a0e5b61552b6c0d44b71b62 (diff)
Fix dead code found by LLVM's scan-build utility
-rw-r--r--src/imlib.c2
-rw-r--r--src/menu.c1
-rw-r--r--src/slideshow.c2
-rw-r--r--src/timers.c1
4 files changed, 1 insertions, 5 deletions
diff --git a/src/imlib.c b/src/imlib.c
index 69962ee..c8bb993 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -958,7 +958,6 @@ void feh_draw_caption(winwidget w)
feh_imlib_image_fill_text_bg(im, tw, th);
l = lines;
- x = 0;
y = 0;
while (l) {
p = (char *) l->data;
@@ -1153,7 +1152,6 @@ gib_list *feh_wrap_string(char *text, int wrap_width, Imlib_Font fn, gib_style *
list = gib_list_add_end(list, estrdup(line));
free(line);
line = NULL;
- line_width = 0;
}
gib_list_free_and_data(words);
}
diff --git a/src/menu.c b/src/menu.c
index c18bbbb..af53054 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -239,7 +239,6 @@ void feh_menu_select_prev(feh_menu * selected_menu, feh_menu_item * selected_ite
while (1) {
i = i->prev;
if (!i) {
- i = selected_menu->items;
for (ii = selected_menu->items; ii->next; ii = ii->next);
i = ii;
}
diff --git a/src/slideshow.c b/src/slideshow.c
index 06c73ec..8aa783c 100644
--- a/src/slideshow.c
+++ b/src/slideshow.c
@@ -39,7 +39,7 @@ void init_slideshow_mode(void)
gib_list *l = filelist, *last = NULL;
feh_file *file = NULL;
- for (l = filelist; l && opt.start_list_at; l = l->next) {
+ for (; l && opt.start_list_at; l = l->next) {
if (!strcmp(opt.start_list_at, FEH_FILE(l->data)->filename)) {
opt.start_list_at = NULL;
break;
diff --git a/src/timers.c b/src/timers.c
index 4cb5251..3343445 100644
--- a/src/timers.c
+++ b/src/timers.c
@@ -103,7 +103,6 @@ void feh_add_timer(void (*func) (void *data), void *data, double in, char *name)
ft->just_added = 1;
ft->in = in;
D(("ft->in = %f\n", ft->in));
- tally = 0.0;
if (!first_timer) {
D(("No first timer\n"));
first_timer = ft;