diff --git a/src/filemanager/chattr.c b/src/filemanager/chattr.c index 8f48ec410..7df9b50a4 100644 --- a/src/filemanager/chattr.c +++ b/src/filemanager/chattr.c @@ -288,10 +288,9 @@ fileattrtext_callback (Widget *w, Widget *sender, widget_msg_t msg, int parm, vo { case MSG_DRAW: { - int color; + int color = COLOR_NORMAL; size_t i; - color = COLOR_NORMAL; tty_setcolor (color); if (w->rect.cols > fat->filename_width) @@ -488,10 +487,9 @@ chattrboxes_rename (WChattrBoxes *cb) for (i = cb->top, l = GROUP (cb)->widgets; l != NULL; i++, l = g_list_next (l)) { WCheck *c = CHECK (l->data); - int m; + int m = check_attr_mod[i]; char btext[BUF_SMALL]; /* FIXME: are 128 bytes enough? */ - m = check_attr_mod[i]; g_snprintf (btext, sizeof (btext), "(%c) %s", check_attr[m].attr, check_attr[m].text); check_set_text (c, btext); c->state = check_attr[m].state; @@ -514,9 +512,8 @@ checkboxes_save_state (const WChattrBoxes *cb) for (i = cb->top, l = CONST_GROUP (cb)->widgets; l != NULL; i++, l = g_list_next (l)) { - int m; + int m = check_attr_mod[i]; - m = check_attr_mod[i]; check_attr[m].state = CHECK (l->data)->state; } } @@ -895,11 +892,9 @@ chattrboxes_new (const WRect *r) /* create checkboxes */ for (i = 0; i < r->lines; i++) { - int m; + int m = check_attr_mod[i]; WCheck *check; - m = check_attr_mod[i]; - check = check_new (i, 0, check_attr[m].state, NULL); group_add_widget (cbg, check); }