Skip to content

Commit d159aba

Browse files
authored
Eliminate noreturn compiler warnings (#467)
Adds noreturn attribute to microbit_panic(), to prevent gcc warning about missing returns in various functions that use panic.
1 parent a4c2b30 commit d159aba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

inc/MicroBitDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ namespace codal
110110
* microbit_panic(20);
111111
* @endcode
112112
*/
113-
void microbit_panic(int statusCode);
113+
[[noreturn]] void microbit_panic(int statusCode);
114114

115115
/**
116116
* Defines the length of time that the device will remain in a error state before resetting.

target-locked.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@
7575
"show_size": true,
7676
"snapshot_version": "v0.2.69",
7777
"toolchain": "ARM_GCC"
78-
}
78+
}

0 commit comments

Comments
 (0)