Skip to content

Commit 936f065

Browse files
committed
using C++17 fallthrough attribute
1 parent 3abbcad commit 936f065

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

cmake/Modules/AddWarnings.cmake

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function(TARGET_ADD_WARNINGS TARGET)
2222
-Wno-unused-macros
2323
-Wno-switch-enum
2424
-Wno-unknown-pragmas
25+
-Wimplicit-fallthrough
2526
)
2627

2728
if(TARGET_COMPILER_CLANG)
@@ -32,7 +33,6 @@ function(TARGET_ADD_WARNINGS TARGET)
3233
#-Wshadow-uncaptured-local
3334
#-Wshorten-64-to-32
3435
-Wconditional-uninitialized
35-
-Wimplicit-fallthrough
3636
-Wmissing-prototypes
3737
)
3838

@@ -49,7 +49,6 @@ function(TARGET_ADD_WARNINGS TARGET)
4949
#-Wuseless-cast
5050
-Wlogical-op
5151
-Wsuggest-override
52-
5352
)
5453
endif()
5554
endif()

plugins/ODbgRegisterView/DialogEditGPR.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ void DialogEditGPR::setupEntriesAndLabels() {
183183
case 8:
184184
hideColumn(GPR8H_COL);
185185
hideColumn(GPR16_COL);
186-
/* fallthrough */
186+
[[fallthrough]];
187187
case 16:
188188
hideColumn(GPR32_COL);
189-
/* fallthrough */
189+
[[fallthrough]];
190190
case 32:
191191
hideColumn(GPR64_COL);
192-
/* fallthrough */
192+
[[fallthrough]];
193193
case 64:
194194
break;
195195
default:

src/FloatX.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ EDB_EXPORT QString format_float(Float value) {
438438

439439
std::memcpy(ptr, &exponent, sizeof(exponent));
440440
}
441-
// fall through
441+
[[fallthrough]];
442442
case FloatValueClass::Normal:
443443
case FloatValueClass::Denormal: {
444444
#ifdef HAVE_DOUBLE_CONVERSION

0 commit comments

Comments
 (0)