Skip to content

Commit 25409cc

Browse files
authored
Add -Werror flag to emu compilation (#274)
1 parent c602566 commit 25409cc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if (BUILD_EMULATOR)
6464

6565
# Set default compile flags for GCC
6666
if (CMAKE_COMPILER_IS_GNUCXX)
67-
add_compile_options(-g -v -Wall -Wextra -Wunused -O3)
67+
add_compile_options(-g -v -Wall -Wextra -Werror -Wunused -O3)
6868
endif (CMAKE_COMPILER_IS_GNUCXX)
6969

7070
# WARDuino CLI

src/Debug/debugger.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ void Debugger::setSnapshotPolicy(Module *m, uint8_t *interruptData) {
954954

955955
std::optional<uint32_t> getPrimitiveBeingCalled(Module *m, uint8_t *pc_ptr) {
956956
if (!pc_ptr) {
957-
return {};
957+
return std::nullopt;
958958
}
959959

960960
// TODO: Support call_indirect
@@ -966,7 +966,7 @@ std::optional<uint32_t> getPrimitiveBeingCalled(Module *m, uint8_t *pc_ptr) {
966966
return fidx;
967967
}
968968
}
969-
return {};
969+
return std::nullopt;
970970
}
971971

972972
void Debugger::handleSnapshotPolicy(Module *m) {

0 commit comments

Comments
 (0)