strophe / libstrophe

A simple, lightweight C library for writing XMPP clients
http://strophe.im/libstrophe
Other
401 stars 163 forks source link

Compile Error (GCC 7, implicit-fallthrough) #108

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi, I get some compile errors with gcc. Maybe disable 'implicit-fallthrough' by default for the build or fix this proper.

gcc (GCC) 7.1.1 20170528 Copyright (C) 2017 Free Software Foundation, Inc.

src/snprintf.c: In Funktion »dopr«: src/snprintf.c:288:8: Fehler: diese Anweisung könnte durchfallen [-Werror=implicit-fallthrough=] flags |= DP_F_UP; ^ src/snprintf.c:289:7: Anmerkung: hier case 'x': ^~~~ src/snprintf.c:308:8: Fehler: diese Anweisung könnte durchfallen [-Werror=implicit-fallthrough=] flags |= DP_F_UP; ^ src/snprintf.c:309:7: Anmerkung: hier case 'e': ^~~~ src/snprintf.c:316:8: Fehler: diese Anweisung könnte durchfallen [-Werror=implicit-fallthrough=] flags |= DP_F_UP; ^ src/snprintf.c:317:7: Anmerkung: hier case 'g': ^~~~

pasis commented 7 years ago

Thank you for report. I'll install gcc-7 and check it. Meanwhile, you can build libstrophe with make CFLAGS="-DHAVE_SNPRINTF -DHAVE_VSNPRINTF" as workaround.

pasis commented 7 years ago

Should be fixed in master.