hi team,
gcc7 warns about switch/case that may fallthrough (no break at the end of case). this can be easily fixed by a comment / fallthrough / or // fallthrough or attribute ((fallthrough)) at the position in which you'd place the break; otherwise.
i see warnings (maybe bugs!?) in
./os/hal/ports/STM32/LLD/TIMv1/hal_pwm_lld.c
and
./os/rt/src/chschd.c
in chschd.c there are comments already, but not exactly as above.
Thanks, fixed in all versions in repository.
hmm,
still falls through with warning. it seems you have to put the comment right before the following case statement (even if there are some #if #else #endif)
then the warning is gone.
Last edit: Niki W. Waibel 2017-11-23
it seems,
has removed the feature to get rid of the warning by using a comment.
i use
__attribute__ ((fallthrough));
for now.Last edit: Niki W. Waibel 2018-04-05
ups, i have to correct myself! i was playing with gcc -save-temps :-o (which might have removed the comments in some way, the attributes not).
--> the comments
/* falls through */
or similar are NOT ignored. sorry for false report.Last edit: Niki W. Waibel 2018-04-05