Ticket #3467: mc-3467-cleanup-unreachable_code-warning.patch
File mc-3467-cleanup-unreachable_code-warning.patch, 2.2 KB (added by and, 10 years ago) |
---|
-
m4.include/mc-cflags.m4
fix -Wunreachable-code warnings and add to mc cflags input_complete.c:1170:9: warning: 'break' will never be executed [-Wunreachable-code-break] ascii.c:291:12: error: 'return' will never be executed [-Wunreachable-code-return] cons.saver.c:211:9: warning: 'break' will never be executed [-Wunreachable-code-break] hotlist.c:860:9: error: code will never be executed [-Werror,-Wunreachable-code] Signed-off-by: Andreas Mohr <and@gmx.li>
a b 84 84 MC_CHECK_ONE_CFLAG([-Wtype-limits]) 85 85 MC_CHECK_ONE_CFLAG([-Wundef]) 86 86 MC_CHECK_ONE_CFLAG([-Wuninitialized]) 87 MC_CHECK_ONE_CFLAG([-Wunreachable-code]) 87 88 MC_CHECK_ONE_CFLAG([-Wunused-but-set-variable]) 88 89 MC_CHECK_ONE_CFLAG([-Wunused-function]) 89 90 MC_CHECK_ONE_CFLAG([-Wunused-label]) -
lib/widget/input_complete.c
a b 1070 1070 /* This means we want to refill the list box and start again */ 1071 1071 h->ret_value = B_USER; 1072 1072 dlg_stop (h); 1073 return MSG_HANDLED;1074 1073 } 1075 1074 else 1076 1075 { … … 1165 1164 } 1166 1165 bl = 0; 1167 1166 } 1168 return MSG_HANDLED;1169 1167 } 1170 break;1168 return MSG_HANDLED; 1171 1169 1172 1170 default: 1173 1171 return dlg_default_callback (w, sender, msg, parm, data); -
src/viewer/ascii.c
a b 286 286 return g_unichar_isprint (c); 287 287 #else 288 288 (void) view; 289 #endif /* HAVE_CHARSET */290 289 /* TODO this is very-very buggy by design: ticket 3257 comments 0-1 */ 291 290 return is_printable (c); 291 #endif /* HAVE_CHARSET */ 292 292 } 293 293 294 294 /* --------------------------------------------------------------------------------------------- */ -
src/consaver/cons.saver.c
a b 208 208 break; 209 209 default: 210 210 die (); 211 break;212 211 } 213 212 214 213 snprintf (console_name, sizeof (console_name), p, console_minor); -
src/filemanager/hotlist.c
a b 856 856 { 857 857 dlg_destroy (hotlist_dlg); 858 858 l_hotlist = NULL; 859 if (FALSE)860 update_panels (UP_OPTIMIZE, UP_KEEPSEL);861 859 repaint_screen (); 862 860 } 863 861