CMake/Source/Checks/cm_cxx_fallthrough.cxx
Brad King e4aafbf596 Fix CM_FALLTHROUGH with -Wunused-parameter
Fix the test code that we `try_compile` to avoid unused parameter
warnings that cause the check to fail.
2017-08-22 08:13:30 -04:00

12 lines
145 B
C++

int main(int argc, char* [])
{
int i = 3;
switch (argc) {
case 1:
i = 0;
[[fallthrough]];
default:
return i;
}
}