Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
error: this statement may fall through [-Werror=implicit-fal
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
lhw828
n00b
n00b


Joined: 05 Sep 2013
Posts: 58

PostPosted: Mon Nov 20, 2017 8:22 am    Post subject: error: this statement may fall through [-Werror=implicit-fal Reply with quote

error: this statement may fall through [-Werror=implicit-fallthrough=]
Code:
++ Mark Compile start  : "json-c" "0.12.1" "Mon, 20 Nov 2017 08:16:45 +0000"
configure: WARNING: unrecognized options: --enable-threading
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make sets $(MAKE)... (cached) yes
RDRAND Hardware RNG Hash Seed enabled on supported x86/x64 platforms
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... cpp
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for strings.h... (cached) yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking sys/cdefs.h usability... yes
checking sys/cdefs.h presence... yes
checking for sys/cdefs.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking for inttypes.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for vprintf... yes
checking for _doprnt... no
checking for working memcmp... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for strcasecmp... yes
checking for strdup... yes
checking for strerror... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for vasprintf... yes
checking for open... yes
checking for vsyslog... yes
checking for strncasecmp... yes
checking for setlocale... yes
checking whether INFINITY is declared... yes
checking whether nan is declared... yes
checking whether isnan is declared... yes
checking whether isinf is declared... yes
checking whether _isnan is declared... no
checking whether _finite is declared... no
checking if .gnu.warning accepts long strings... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /var/lib/lunar/compilers/ld
checking if the linker (/var/lib/lunar/compilers/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /var/lib/lunar/compilers/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/var/lib/lunar/compilers/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for -Bsymbolic-functions linker flag... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating json-c.pc
config.status: creating tests/Makefile
config.status: creating json-c-uninstalled.pc
config.status: creating config.h
config.status: creating json_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING: unrecognized options: --enable-threading
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /usr/src/json-c-0.12.1/missing autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
/usr/bin/make  all-recursive
make[1]: Entering directory '/usr/src/json-c-0.12.1'
Making all in .
make[2]: Entering directory '/usr/src/json-c-0.12.1'
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -D_FORTIFY_SOURCE=2 -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -O2 -march=x86-64 -pipe -Wno-error=unused-but-set-variable -MT arraylist.lo -MD -MP -MF .deps/arraylist.Tpo -c -o arraylist.lo arraylist.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -O2 -march=x86-64 -pipe -Wno-error=unused-but-set-variable -MT arraylist.lo -MD -MP -MF .deps/arraylist.Tpo -c arraylist.c  -fPIC -DPIC -o .libs/arraylist.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -O2 -march=x86-64 -pipe -Wno-error=unused-but-set-variable -MT arraylist.lo -MD -MP -MF .deps/arraylist.Tpo -c arraylist.c -o arraylist.o >/dev/null 2>&1
mv -f .deps/arraylist.Tpo .deps/arraylist.Plo
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -D_FORTIFY_SOURCE=2 -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -O2 -march=x86-64 -pipe -Wno-error=unused-but-set-variable -MT debug.lo -MD -MP -MF .deps/debug.Tpo -c -o debug.lo debug.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -O2 -march=x86-64 -pipe -Wno-error=unused-but-set-variable -MT debug.lo -MD -MP -MF .deps/debug.Tpo -c debug.c  -fPIC -DPIC -o .libs/debug.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -O2 -march=x86-64 -pipe -Wno-error=unused-but-set-variable -MT debug.lo -MD -MP -MF .deps/debug.Tpo -c debug.c -o debug.o >/dev/null 2>&1
mv -f .deps/debug.Tpo .deps/debug.Plo
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -D_FORTIFY_SOURCE=2 -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -O2 -march=x86-64 -pipe -Wno-error=unused-but-set-variable -MT json_c_version.lo -MD -MP -MF .deps/json_c_version.Tpo -c -o json_c_version.lo json_c_version.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -O2 -march=x86-64 -pipe -Wno-error=unused-but-set-variable -MT json_c_version.lo -MD -MP -MF .deps/json_c_version.Tpo -c json_c_version.c  -fPIC -DPIC -o .libs/json_c_version.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -O2 -march=x86-64 -pipe -Wno-error=unused-but-set-variable -MT json_c_version.lo -MD -MP -MF .deps/json_c_version.Tpo -c json_c_version.c -o json_c_version.o >/dev/null 2>&1
mv -f .deps/json_c_version.Tpo .deps/json_c_version.Plo
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.   -D_FORTIFY_SOURCE=2 -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -O2 -march=x86-64 -pipe -Wno-error=unused-but-set-variable -MT json_object.lo -MD -MP -MF .deps/json_object.Tpo -c -o json_object.lo json_object.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -D_FORTIFY_SOURCE=2 -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -O2 -march=x86-64 -pipe -Wno-error=unused-but-set-variable -MT json_object.lo -MD -MP -MF .deps/json_object.Tpo -c json_object.c  -fPIC -DPIC -o .libs/json_object.o
++ Mark Compile stop   : "json-c" "0.12.1" "Mon, 20 Nov 2017 08:16:50 +0000"
json_object.c: In function 'json_object_get_int64':
json_object.c:554:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
  if (json_parse_int64(jso->o.c_string.str, &cint) == 0) return cint;
     ^
json_object.c:555:3: note: here
   default:
   ^~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:572: json_object.lo] Error 1
make[2]: Leaving directory '/usr/src/json-c-0.12.1'
make[1]: *** [Makefile:636: all-recursive] Error 1
make[1]: Leaving directory '/usr/src/json-c-0.12.1'
make: *** [Makefile:436: all] Error 2

Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16906
Location: here

PostPosted: Mon Nov 20, 2017 8:51 am    Post subject: Reply with quote

I think is json-c gcc7 bug. Try to apply patch proposed here

EDIT: patch here and here how to apply user patch
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum