Hello, I noticed that when you compile with "-Wextra", "-Wall", etc., gcc complains that "this statement may fall through" in the switch cases. The idea is to warn the programmer that the "standard" is to use a break statement. Assuming you do want to go through all cases, maybe you can add a __attribute__ ((fallthrough)); in the cases? ( https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/ ) Something like
Hello, I noticed that when you compile with "-Wextra", "-Wall", etc., gcc complains that "this statement may fall through" in the
switch
cases. The idea is to warn the programmer that the "standard" is to use abreak
statement. Assuming you do want to go through all cases, maybe you can add a__attribute__ ((fallthrough));
in the cases? ( https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/ ) Something like