f18m/large-pcap-analyzer

build fails on Fedora 26 Linux workstation

Closed this issue · 3 comments

system is Fedora 26 Linux workstation.

$ g++ --version
g++ (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

when i run make to build, get these errors:

depbase=echo src/parse.o | sed 's|[^/]*$|.deps/&|;s|\.o$||';
g++ -DHAVE_CONFIG_H -I. -I./src -Wall -Wextra -Werror -O3 -MT src/parse.o -MD -MP -MF $depbase.Tpo -c -o src/parse.o src/parse.cpp &&
mv -f $depbase.Tpo $depbase.Po
src/parse.cpp: In function ‘uint64_t FastHash64(const char*, uint32_t, uint64_t)’:
src/parse.cpp:83:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
case 7: v ^= (uint64_t)pos2[6] << 48;
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
src/parse.cpp:85:2: note: here
case 6: v ^= (uint64_t)pos2[5] << 40;
^~~~
src/parse.cpp:85:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
case 6: v ^= (uint64_t)pos2[5] << 40;
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
src/parse.cpp:87:2: note: here
case 5: v ^= (uint64_t)pos2[4] << 32;
^~~~
src/parse.cpp:87:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
case 5: v ^= (uint64_t)pos2[4] << 32;
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
src/parse.cpp:89:2: note: here
case 4: v ^= (uint64_t)pos2[3] << 24;
^~~~
src/parse.cpp:89:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
case 4: v ^= (uint64_t)pos2[3] << 24;
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
src/parse.cpp:91:2: note: here
case 3: v ^= (uint64_t)pos2[2] << 16;
^~~~
src/parse.cpp:91:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
case 3: v ^= (uint64_t)pos2[2] << 16;
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
src/parse.cpp:93:2: note: here
case 2: v ^= (uint64_t)pos2[1] << 8;
^~~~
src/parse.cpp:93:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
case 2: v ^= (uint64_t)pos2[1] << 8;
~~^~~~~~~~~~~~~~~~~~~~~~~~~
src/parse.cpp:95:2: note: here
case 1: v ^= (uint64_t)pos2[0];
^~~~
cc1plus: all warnings being treated as errors
make: *** [Makefile:407: src/parse.o] Error 1

f18m commented

Hi,
thanks for reporting this issue.
I think I fixed it now in master branch. However I don't have a GCC 7 straight away for testing... can you please clone the latest repo and try building again and report back?

Thanks,
Francesco

PS: if necessary please reopen this bug

@f18m confirmed. master builds with g++ 7.3.1 on Fedora 26.

f18m commented

Perfect, thanks!