gnosek / fcgiwrap

Simple FastCGI wrapper for CGI scripts
http://nginx.localdomain.pl/
MIT License
407 stars 134 forks source link

fcgiwrap.c:555:4: error: this statement may fall through #57

Open Irbis-snowbars opened 3 years ago

Irbis-snowbars commented 3 years ago

# make fcgiwrap

cc -std=gnu99 -Wall -Wextra -Werror -pedantic -O2 -g3    fcgiwrap.c  -lfcgi  -o fcgiwrap
fcgiwrap.c: In function ‘handle_fcgi_request’:
fcgiwrap.c:555:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
555 |    cgi_error("502 Bad Gateway", "Cannot execute script", filename);
    |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fcgiwrap.c:557:3: note: here
557 |   default: /* parent */
    |   ^~~~~~~
cc1: all warnings being treated as errors
make: *** [<builtin>: fcgiwrap] Error 1
tianakack commented 3 years ago

you can edit the Makefile generated by ./configure, and remove the -Werror in CFLAGS

#CFLAGS = -std=gnu99 -Wall -Wextra -Werror -pedantic -O2 -g3                                                        
CFLAGS = -std=gnu99 -Wall -Wextra -pedantic -O2 -g3