linux下编译nginx-1.10.1报错:src/http/ngx_http_parse.c:1384:32: warning: this statement may fall through [-Wimplicit-fallthrough=]


linux下编译nginx-1.10.1报错:src/http/ngx_http_parse.c:1384:32: warning: this statement may fall through [-Wimplicit-fallthrough=]

原因:gcc编译版本问题导致。

解决办法:

解决办法:进入到/root/nginpage/nginx-1.10.1/objs/目录下(解压的目录)
打开编辑文件Makefile,找到有一下内容的这行:
CFLAGS = -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g
把这行内容中的后面加上-Wno-implicit-fallthrough 即可忽略gcc7编译时switch-case中缺少break的错误。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM