Closed antoineco closed 2 years ago
It turns out the default value for -Wimplicit-fallthrough
is 5
since Linux 5.14: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b7eb335e26a9c7f258c96b3962c283c379d3ede0
[...] in order to avoid having more comments being introduced, we have to use the option
-Wimplicit-fallthrough=5
for GCC, which [...] will cause a warning in case a code comment is intended to be used as a fall-through marking.
This warning is back, despite the fallthrough comment added in #12:
https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Warning-Options.html#index-Wimplicit-fallthrough
For kernel versions ≥ 5.4, we should probably switch to the
fallthrough
pseudo-keyword: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=294f69e662d1570703e9b56e95be37a9fd3afba5