main: Remove empty switch case
SDCC 4.4.0 now fails to compile if there are empty switch cases. src/board/system76/common/main.c:105: error 110: conditional flow changed by optimizer: so said EVELYN the modified DOG Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
committed by
Jeremy Soller
parent
ef4eeae2df
commit
449bafd130
@ -102,6 +102,8 @@ void main(void) {
|
|||||||
uint32_t last_time_fan = 0;
|
uint32_t last_time_fan = 0;
|
||||||
|
|
||||||
for (main_cycle = 0;; main_cycle++) {
|
for (main_cycle = 0;; main_cycle++) {
|
||||||
|
// NOTE: Do note use modulo to avoid expensive call to SDCC library
|
||||||
|
// call. (Modulo is optimized for powers of 2, however.)
|
||||||
switch (main_cycle & 3U) {
|
switch (main_cycle & 3U) {
|
||||||
case 0:
|
case 0:
|
||||||
// Handle USB-C events immediately before power states
|
// Handle USB-C events immediately before power states
|
||||||
@ -123,11 +125,6 @@ void main(void) {
|
|||||||
// Handle lid close/open
|
// Handle lid close/open
|
||||||
lid_event();
|
lid_event();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
|
||||||
// We previously used modulo to limit when the logic for other
|
|
||||||
// cases ran, so this case is unused.
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (main_cycle == 0) {
|
if (main_cycle == 0) {
|
||||||
|
Reference in New Issue
Block a user