mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
6065be76e1
Since gcc-7 `Wimplicit-fallthrough` is activated by using `-Wextra`. This leads to the following problem when compiling `gnrc_networking`: ``` RIOT/sys/net/gnrc/network_layer/ndp/internal/gnrc_ndp_internal.c: In function ‘gnrc_ndp_internal_set_state’: RIOT/sys/net/gnrc/network_layer/ndp/internal/gnrc_ndp_internal.c:106:15: error: this statement may fall through [-Werror=implicit-fallthrough=] t = ipv6_iface->reach_time; ~~^~~~~~~~~~~~~~~~~~~~~~~~ RIOT/sys/net/gnrc/network_layer/ndp/internal/gnrc_ndp_internal.c:109:9: note: here case GNRC_IPV6_NC_STATE_DELAY: ^~~~ ``` The fall-through in this code is intentional. There are several ways to warn the comiler about such intentional fall-throughs, which include e.g. attributed empty statements (`__attribute__ ((fallthrough));`). I don't like tis approach however. The best way would probably be to remove this fall-through from the code. However, to keep the diff minimal, and since ndp will change in the future, I went for warning the compiler using comments. The compiler checks comments for several *fall through* regexs to decide whether a fallthrough was intentional or not. You can read more about this gcc option in [1]. A note about fallthrough comment regexs is at the bottom of this article. [1] https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/ |
||
---|---|---|
.. | ||
analog_util | ||
arduino | ||
auto_init | ||
base64 | ||
bitfield | ||
bloom | ||
cbor | ||
checksum | ||
color | ||
cpp11-compat | ||
crypto | ||
div | ||
ecc | ||
embunit | ||
fmt | ||
fs | ||
hashes | ||
include | ||
isrpipe | ||
libc/include/sys | ||
log | ||
luid | ||
mineplex | ||
net | ||
newlib | ||
od | ||
oneway-malloc | ||
phydat | ||
pipe | ||
pm_layered | ||
posix | ||
ps | ||
quad_math | ||
random | ||
rtt_stdio | ||
saul_reg | ||
sema | ||
seq | ||
shell | ||
timex | ||
trickle | ||
tsrb | ||
uart_stdio | ||
ubjson | ||
universal_address | ||
vfs | ||
xtimer | ||
doc.txt | ||
Makefile | ||
Makefile.include |