Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22031

"Error: this statement may fall through" when compiling from source

$
0
0

I'm trying to compile OpenOCD 0.10 from source, but when running make I get

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./src -I./src -I./src/helper -DPKGDATADIR=\"/usr/local/share/openocd\" -DBINDIR=\"/usr/local/bin\" -I./jimtcl -I./jimtcl -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -g -O2 -MT src/svf/svf.lo -MD -MP -MF src/svf/.deps/svf.Tpo -c src/svf/svf.c -o src/svf/svf.o
src/svf/svf.c: In function ‘svf_read_command_from_file’:
src/svf/svf.c:663:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
  663 |     i = -1;
      |     ~~^~~~
src/svf/svf.c:664:4: note: here
  664 |    case '\r':
      |    ^~~~
src/svf/svf.c:667:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
  667 |     if (!cmd_pos)
      |        ^
src/svf/svf.c:669:4: note: here
  669 |    default:
      |    ^~~~~~~

Similar questions like "Error: this statement may fall through [-Werror=implicit-fallthrough=]" and "Why is GCC warning me about a fallthrough even when I use [[fallthrough]]?" had as a solution to modify the source code. That being not feasible in this case, what can I do? Is there a way to ignore this error?


Viewing all articles
Browse latest Browse all 22031

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>