-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Closed
Labels
Description
I did this
Building the latest release of curl (7.77) on RHEL6 using newly built gcc toolchain (git: 12.0.0)
When using Werror, I'm getting these many implicit-fallthrough error:
>[21/206] Building C object lib/CMakeFiles/libcurl.dir/content_encoding.c.o
FAILED: lib/CMakeFiles/libcurl.dir/content_encoding.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/content_encoding.c.o -MF lib/CMakeFiles/libcurl.dir/content_encoding.c.o.d -o lib/CMakeFiles/libcurl.dir/content_encoding.c.o -c ../lib/content_encoding.c
../lib/content_encoding.c: In function 'inflate_stream':
../lib/content_encoding.c:230:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
230 | if(zp->zlib_init == ZLIB_INIT) {
| ^
../lib/content_encoding.c:244:5: note: here
244 | default:
| ^~~~~~~
cc1: all warnings being treated as errors
[23/206] Building C object lib/CMakeFiles/libcurl.dir/cookie.c.o
FAILED: lib/CMakeFiles/libcurl.dir/cookie.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/cookie.c.o -MF lib/CMakeFiles/libcurl.dir/cookie.c.o.d -o lib/CMakeFiles/libcurl.dir/cookie.c.o -c ../lib/cookie.c
../lib/cookie.c: In function 'Curl_cookie_add':
../lib/cookie.c:899:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
899 | fields++; /* add a field and fall down to secure */
| ~~~~~~^~
../lib/cookie.c:901:7: note: here
901 | case 3:
| ^~~~
cc1: all warnings being treated as errors
[45/206] Building C object lib/CMakeFiles/libcurl.dir/ftp.c.o
FAILED: lib/CMakeFiles/libcurl.dir/ftp.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/ftp.c.o -MF lib/CMakeFiles/libcurl.dir/ftp.c.o.d -o lib/CMakeFiles/libcurl.dir/ftp.c.o -c ../lib/ftp.c
../lib/ftp.c: In function 'ftp_done':
../lib/ftp.c:3216:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
3216 | if(!premature)
| ^
../lib/ftp.c:3222:3: note: here
3222 | default: /* by default, an error means the control connection is
| ^~~~~~~
cc1: all warnings being treated as errors
[57/206] Building C object lib/CMakeFiles/libcurl.dir/formdata.c.o
FAILED: lib/CMakeFiles/libcurl.dir/formdata.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/formdata.c.o -MF lib/CMakeFiles/libcurl.dir/formdata.c.o.d -o lib/CMakeFiles/libcurl.dir/formdata.c.o -c ../lib/formdata.c
../lib/formdata.c: In function 'FormAdd':
../lib/formdata.c:278:27: error: this statement may fall through [-Werror=implicit-fallthrough=]
278 | current_form->flags |= HTTPPOST_PTRNAME; /* fall through */
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
../lib/formdata.c:281:5: note: here
281 | case CURLFORM_COPYNAME:
| ^~~~
../lib/formdata.c:305:27: error: this statement may fall through [-Werror=implicit-fallthrough=]
305 | current_form->flags |= HTTPPOST_PTRCONTENTS;
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
../lib/formdata.c:307:5: note: here
307 | case CURLFORM_COPYCONTENTS:
| ^~~~
cc1: all warnings being treated as errors
[61/206] Building C object lib/CMakeFiles/libcurl.dir/http_ntlm.c.o
FAILED: lib/CMakeFiles/libcurl.dir/http_ntlm.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/http_ntlm.c.o -MF lib/CMakeFiles/libcurl.dir/http_ntlm.c.o.d -o lib/CMakeFiles/libcurl.dir/http_ntlm.c.o -c ../lib/http_ntlm.c
../lib/http_ntlm.c: In function 'Curl_output_ntlm':
../lib/http_ntlm.c:252:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
252 | *state = NTLMSTATE_LAST;
| ~~~~~~~^~~~~~~~~~~~~~~~
../lib/http_ntlm.c:254:3: note: here
254 | case NTLMSTATE_LAST:
| ^~~~
cc1: all warnings being treated as errors
[73/206] Building C object lib/CMakeFiles/libcurl.dir/http.c.o
FAILED: lib/CMakeFiles/libcurl.dir/http.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/http.c.o -MF lib/CMakeFiles/libcurl.dir/http.c.o.d -o lib/CMakeFiles/libcurl.dir/http.c.o -c ../lib/http.c
../lib/http.c: In function 'Curl_http_statusline':
../lib/http.c:3746:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
3746 | if(data->set.timecondition)
| ^
../lib/http.c:3749:3: note: here
3749 | case 204:
| ^~~~
cc1: all warnings being treated as errors
[77/206] Building C object lib/CMakeFiles/libcurl.dir/mqtt.c.o
FAILED: lib/CMakeFiles/libcurl.dir/mqtt.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/mqtt.c.o -MF lib/CMakeFiles/libcurl.dir/mqtt.c.o.d -o lib/CMakeFiles/libcurl.dir/mqtt.c.o -c ../lib/mqtt.c
../lib/mqtt.c: In function 'mqtt_doing':
../lib/mqtt.c:575:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
575 | mqstate(data, MQTT_REMAINING_LENGTH, MQTT_NOSTATE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/mqtt.c:577:3: note: here
577 | case MQTT_REMAINING_LENGTH:
| ^~~~
../lib/mqtt.c: In function 'mqtt_read_publish':
../lib/mqtt.c:483:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
483 | mq->npacket = remlen; /* get this many bytes */
| ~~~~~~~~~~~~^~~~~~~~
../lib/mqtt.c:485:3: note: here
485 | case MQTT_PUB_REMAIN: {
| ^~~~
cc1: all warnings being treated as errors
[82/206] Building C object lib/CMakeFiles/libcurl.dir/multi.c.o
FAILED: lib/CMakeFiles/libcurl.dir/multi.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/multi.c.o -MF lib/CMakeFiles/libcurl.dir/multi.c.o.d -o lib/CMakeFiles/libcurl.dir/multi.c.o -c ../lib/multi.c
../lib/multi.c: In function 'Curl_update_timer':
../lib/multi.c:3199:64: error: '?:' using integer constants in boolean context [-Werror=int-in-bool-context]
3199 | if(Curl_splaycomparekeys(none, multi->timer_lastcall)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
cc1: all warnings being treated as errors
[90/206] Building C object lib/CMakeFiles/libcurl.dir/mprintf.c.o
FAILED: lib/CMakeFiles/libcurl.dir/mprintf.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/mprintf.c.o -MF lib/CMakeFiles/libcurl.dir/mprintf.c.o.d -o lib/CMakeFiles/libcurl.dir/mprintf.c.o -c ../lib/mprintf.c
../lib/mprintf.c: In function 'dprintf_Pass1':
../lib/mprintf.c:362:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
362 | if(!(flags & FLAGS_LEFT))
| ^
../lib/mprintf.c:365:9: note: here
365 | case '1': case '2': case '3': case '4':
| ^~~~
../lib/mprintf.c:399:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
399 | flags |= FLAGS_ALT;
| ~~~~~~^~~~~~~~~~~~
../lib/mprintf.c:401:7: note: here
401 | case 's':
| ^~~~
cc1: all warnings being treated as errors
[99/206] Building C object lib/CMakeFiles/libcurl.dir/socks.c.o
FAILED: lib/CMakeFiles/libcurl.dir/socks.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/socks.c.o -MF lib/CMakeFiles/libcurl.dir/socks.c.o.d -o lib/CMakeFiles/libcurl.dir/socks.c.o -c ../lib/socks.c
../lib/socks.c: In function 'Curl_SOCKS4':
../lib/socks.c:262:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
262 | if(dns) {
| ^
../lib/socks.c:279:3: note: here
279 | CONNECT_RESOLVED:
| ^~~~~~~~~~~~~~~~
../lib/socks.c:280:26: error: this statement may fall through [-Werror=implicit-fallthrough=]
280 | case CONNECT_RESOLVED: {
| ^
../lib/socks.c:317:3: note: here
317 | CONNECT_REQ_INIT:
| ^~~~~~~~~~~~~~~~
../lib/socks.c:359:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
359 | sxstate(data, CONNECT_REQ_SENDING);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/socks.c:362:3: note: here
362 | case CONNECT_REQ_SENDING:
| ^~~~
../lib/socks.c:380:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
380 | sxstate(data, CONNECT_SOCKS_READ);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/socks.c:383:3: note: here
383 | case CONNECT_SOCKS_READ:
| ^~~~
../lib/socks.c: In function 'Curl_SOCKS5':
../lib/socks.c:584:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
584 | if(written != sx->outstanding) {
| ^
../lib/socks.c:591:3: note: here
591 | CONNECT_SOCKS_READ_INIT:
| ^~~~~~~~~~~~~~~~~~~~~~~
../lib/socks.c:594:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
594 | sx->outp = socksreq; /* store it here */
| ~~~~~~~~~^~~~~~~~~~
../lib/socks.c:596:3: note: here
596 | case CONNECT_SOCKS_READ:
| ^~~~
../lib/socks.c:706:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
706 | sx->outp = socksreq;
| ~~~~~~~~~^~~~~~~~~~
../lib/socks.c:709:3: note: here
709 | case CONNECT_AUTH_SEND:
| ^~~~
../lib/socks.c:724:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
724 | sxstate(data, CONNECT_AUTH_READ);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/socks.c:726:3: note: here
726 | case CONNECT_AUTH_READ:
| ^~~~
../lib/socks.c:752:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
752 | sxstate(data, CONNECT_REQ_INIT);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/socks.c:754:3: note: here
754 | CONNECT_REQ_INIT:
| ^~~~~~~~~~~~~~~~
../lib/socks.c:784:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
784 | if(!dns) {
| ^
../lib/socks.c:793:3: note: here
793 | CONNECT_RESOLVED:
| ^~~~~~~~~~~~~~~~
../lib/socks.c:856:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
856 | if(!socks5_resolve_local) {
| ^
../lib/socks.c:866:3: note: here
866 | CONNECT_REQ_SEND:
| ^~~~~~~~~~~~~~~~
../lib/socks.c:881:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
881 | sxstate(data, CONNECT_REQ_SENDING);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/socks.c:883:3: note: here
883 | case CONNECT_REQ_SENDING:
| ^~~~
../lib/socks.c:904:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
904 | sxstate(data, CONNECT_REQ_READ);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/socks.c:906:3: note: here
906 | case CONNECT_REQ_READ:
| ^~~~
../lib/socks.c:992:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
992 | if(len > 10) {
| ^
../lib/socks.c:1005:3: note: here
1005 | case CONNECT_REQ_READ_MORE:
| ^~~~
cc1: all warnings being treated as errors
[105/206] Building C object lib/CMakeFiles/libcurl.dir/mime.c.o
FAILED: lib/CMakeFiles/libcurl.dir/mime.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/mime.c.o -MF lib/CMakeFiles/libcurl.dir/mime.c.o.d -o lib/CMakeFiles/libcurl.dir/mime.c.o -c ../lib/mime.c
../lib/mime.c: In function 'encoder_base64_read':
../lib/mime.c:467:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
467 | i = (st->buf[st->bufbeg + 1] & 0xFF) << 8;
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/mime.c:469:7: note: here
469 | case 1:
| ^~~~
../lib/mime.c: In function 'readback_part':
../lib/mime.c:966:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
966 | if(part->kind == MIMEKIND_FILE && part->fp) {
| ^
../lib/mime.c:971:7: note: here
971 | case CURL_READFUNC_ABORT:
| ^~~~
../lib/mime.c:924:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
924 | if(match_header(hdr, "Content-Type", 12)) {
| ^
../lib/mime.c:929:5: note: here
929 | case MIMESTATE_CURLHEADERS:
| ^~~~
../lib/mime.c: In function 'read_part_content':
../lib/mime.c:804:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
804 | if(part->fp && feof(part->fp))
| ^
../lib/mime.c:807:5: note: here
807 | default:
| ^~~~~~~
cc1: all warnings being treated as errors
[114/206] Building C object lib/CMakeFiles/libcurl.dir/telnet.c.o
FAILED: lib/CMakeFiles/libcurl.dir/telnet.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/telnet.c.o -MF lib/CMakeFiles/libcurl.dir/telnet.c.o.d -o lib/CMakeFiles/libcurl.dir/telnet.c.o -c ../lib/telnet.c
../lib/telnet.c: In function 'telnet_do':
../lib/telnet.c:1495:22: error: this statement may fall through [-Werror=implicit-fallthrough=]
1495 | pfd[1].revents = 0;
| ~~~~~~~~~~~~~~~^~~
../lib/telnet.c:1497:5: note: here
1497 | default: /* read! */
| ^~~~~~~
cc1: all warnings being treated as errors
[115/206] Building C object lib/CMakeFiles/libcurl.dir/urlapi.c.o
FAILED: lib/CMakeFiles/libcurl.dir/urlapi.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/urlapi.c.o -MF lib/CMakeFiles/libcurl.dir/urlapi.c.o.d -o lib/CMakeFiles/libcurl.dir/urlapi.c.o -c ../lib/urlapi.c
../lib/urlapi.c: In function 'strlen_url':
../lib/urlapi.c:162:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
162 | left = FALSE;
../lib/urlapi.c:164:5: note: here
164 | default:
| ^~~~~~~
../lib/urlapi.c: In function 'strcpy_url':
../lib/urlapi.c:207:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
207 | left = FALSE;
../lib/urlapi.c:209:5: note: here
209 | default:
| ^~~~~~~
cc1: all warnings being treated as errors
[152/206] Building C object lib/CMakeFiles/libcurl.dir/vtls/openssl.c.o
FAILED: lib/CMakeFiles/libcurl.dir/vtls/openssl.c.o
/usr/lib/ccache/bin/gcc -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -I../include -Ilib/../include -I../lib/.. -I../lib/../include -Ilib/.. -I../lib -Ilib -isystem /var/data/gcc12gnu212/x86_64-linux-gnu/sysroot/usr/include -Ofast -s -fPIC -pipe -DNDEBUG -march=x86-64 -Wl,--strip-debug,--strip-all -pedantic -Wall -W -Wpointer-arith -Wwrite-strings -Wunused -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wstrict-aliasing=3 -Wcast-align -Wtype-limits -Wold-style-declaration -Wmissing-parameter-type -Wempty-body -Wclobbered -Wignored-qualifiers -Wconversion -Wvla -Wdouble-promotion -Wno-long-long -Wno-multichar -Wno-format-nonliteral -Wno-sign-conversion -Wno-system-headers -Werror -O3 -DNDEBUG -fvisibility=hidden -MD -MT lib/CMakeFiles/libcurl.dir/vtls/openssl.c.o -MF lib/CMakeFiles/libcurl.dir/vtls/openssl.c.o.d -o lib/CMakeFiles/libcurl.dir/vtls/openssl.c.o -c ../lib/vtls/openssl.c
../lib/vtls/openssl.c: In function 'cert_stuff':
../lib/vtls/openssl.c:998:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
998 | if(cert_done)
| ^
../lib/vtls/openssl.c:1001:5: note: here
1001 | case SSL_FILETYPE_ASN1:
| ^~~~
cc1: all warnings being treated as errors
[154/206] Building C object lib/CMakeFiles/libcurl.dir/url.c.o
ninja: build stopped: cannot make progress due to previous errors.
I expected the following
Successful build
curl/libcurl version
7.77
operating system
Linux localhost.localdomain 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux