Skip to content

Commit c64a5c0

Browse files
committed
Fix control reaching end of non-void function
1 parent 1258938 commit c64a5c0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

scripts/make.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
44

5-
TARGET=$SCRIPTPATH/../src/examples/mqtt_polling/mqtt_polling.ino
5+
TARGET=$SCRIPTPATH/../src/examples/low_power/low_power.ino
66
EXTRA_ARGS=--clean
77

88
if [ "$1" = "clean" ]; then

src/low_power.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ static uint16_t decodeSleepMultiplier(const SleepMultiplier sleep_multiplier) {
119119
return 30;
120120
case SleepMultiplier::TWO_SECONDS:
121121
return 2;
122+
default:
123+
return 0;
122124
}
123125
}
124126

@@ -453,4 +455,6 @@ SleepStatusCode LowPowerClass::sleep(const SleepMode sleep_mode) {
453455
case SleepMode::DEEP:
454456
return deepSleep();
455457
}
458+
459+
return SleepStatusCode::OK;
456460
}

0 commit comments

Comments
 (0)