Remove some dead code, add default paths to switch() to make static analyzers happy

Check was done with scan-build from the LLVM suite. The remaining reports are false
positives and have been reported to llvm:

http://llvm.org/bugs/show_bug.cgi?id=4358
http://llvm.org/bugs/show_bug.cgi?id=4359
This commit is contained in:
Michael Stapelberg
2009-06-10 19:59:36 +02:00
parent 2f334c3f59
commit d70ea03356
4 changed files with 11 additions and 14 deletions

View File

@ -239,6 +239,9 @@ static void move_current_window(xcb_connection_t *conn, direction_t direction) {
new = CUR_TABLE[current_col][++current_row];
break;
/* To make static analyzers happy: */
default:
return;
}
/* Remove it from the old container and put it into the new one */
@ -312,6 +315,9 @@ static void move_current_container(xcb_connection_t *conn, direction_t direction
new = CUR_TABLE[current_col][++current_row];
break;
/* To make static analyzers happy: */
default:
return;
}
LOG("old = %d,%d and new = %d,%d\n", container->col, container->row, new->col, new->row);
@ -416,6 +422,9 @@ static void snap_current_container(xcb_connection_t *conn, direction_t direction
container->rowspan++;
break;
}
/* To make static analyzers happy: */
default:
return;
}
render_layout(conn);