|
|
楼主 |
发表于 2026-5-10 13:03:19
|
显示全部楼层
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
" `5 q8 B, Z6 h- Q8 E+ R$ v! z; u -o objs/src/core/ngx_murmurhash.o \' @- e, H* j/ H) H. ]; ~
src/core/ngx_murmurhash.c
- u, T2 H9 Z2 r& {9 ^src/core/ngx_murmurhash.c: In function ‘ngx_murmur_hash2’:1 `2 b0 \1 m. T) H
src/core/ngx_murmurhash.c:37:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
) k" \: i% Q5 W' n/ @1 \# p4 _3 q5 L 37 | h ^= data[2] << 16;
, O, @1 n4 x: i | ~~^~~~~~~~~~~~~~~~0 y% {) K# O4 U1 C0 ?$ Z) b6 |( r; ?( }
src/core/ngx_murmurhash.c:38:5: note: here
V4 ~5 n$ z- c, n" W 38 | case 2:: J1 s8 r* i! u
| ^~~~
( t( w, V* \( a5 P/ Z5 n: Psrc/core/ngx_murmurhash.c:39:11: error: this statement may fall through [-Werror=implicit-fallthrough=]5 N" K$ O% ]- S2 P+ Q1 b2 k
39 | h ^= data[1] << 8;+ Y( D) d4 ?3 K4 m
| ~~^~~~~~~~~~~~~~~
4 |" {6 G6 r2 s" _- Ysrc/core/ngx_murmurhash.c:40:5: note: here: {% Z8 P' w9 s1 y* d; R# x
40 | case 1:3 \( |; c) J7 t5 d- q) s% _. k
| ^~~~
, K. ~% x* R5 U, h: v# t5 R+ g5 Acc1: all warnings being treated as errors
6 g6 @ t; o/ s f$ o7 Xmake[1]: *** [objs/Makefile:472: objs/src/core/ngx_murmurhash.o] Error 1
% U/ K/ c+ d' E& y2 j9 nmake[1]: Leaving directory '/usr/src/webback/nginx-1.11.3'! {1 E* h. ^$ k7 s, r) ?9 i
make: *** [Makefile:8: build] Error 22 _4 c1 n/ ]0 j9 o }! J
( v; `$ M/ ~9 |: B8 F( q$ Z/ k3 e& Q/ L. y" B* b
解决办法:
) M5 B; ~" u- g4 r( o[root@webserver nginx-1.11.3]# vim objs/Makefile ( t2 w$ Y$ u9 B& u( y- ]6 x
8 L1 N2 V* S* _3 G' Z% U#CFLAGS = -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g . y: }9 @' H" B3 u* n5 |
CFLAGS = -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -g3 h9 }1 j( m5 o" s
) H- g4 O% H' g$ K
修改后,再次编译:
" V6 v# C/ ^6 K/ q% L* j: p# K; j |
|