Ensure the flow through switch statements is clear
authorDaniel Boulby <daniel.boulby@arm.com>
Fri, 22 Jun 2018 13:16:03 +0000 (14:16 +0100)
committerDaniel Boulby <daniel.boulby@arm.com>
Fri, 21 Sep 2018 12:14:13 +0000 (13:14 +0100)
commita08a2014300a495381cdb8f6d59523bcd5d3b883
treeab016b027c303ccbe8001764f824f8980b233f54
parente52ed092cde21d13533df32eb68629a980d69b4b
Ensure the flow through switch statements is clear

Ensure case clauses:
*   Terminate with an unconditional break, return or goto statement.
*   Use conditional break, return or goto statements as long as the end
    of the case clause is unreachable; such case clauses must terminate
    with assert(0) /* Unreachable */ or an unconditional  __dead2 function
    call
*   Only fallthough when doing otherwise would result in less
    readable/maintainable code; such case clauses must terminate with a
    /* Fallthrough */ comment to make it clear this is the case and
    indicate that a fallthrough is intended.

This reduces the chance of bugs appearing due to unintended flow through a
switch statement

Change-Id: I70fc2d1f4fd679042397dec12fd1982976646168
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
bl1/bl1_fwu.c
lib/libc/printf.c
lib/libc/snprintf.c
plat/common/plat_gicv2.c
plat/common/plat_gicv3.c
plat/rockchip/rk3399/drivers/dp/cdn_dp.c
plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c
services/spd/tlkd/tlkd_common.c
services/spd/tspd/tspd_main.c