报错:
src/core/ngx_murmurhash.c: In function ‘ngx_murmur_hash2’:
src/core/ngx_murmurhash.c:37:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
h ^= data[2] << 16;
~~^~~~~~~~~~~~~~~~
src/core/ngx_murmurhash.c:38:5: note: here
case 2:
^~~~
src/core/ngx_murmurhash.c:39:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
h ^= data[1] << 8;
~~^~~~~~~~~~~~~~~
src/core/ngx_murmurhash.c:40:5: note: here
case 1:
^~~~
原因,是将警告当成了错误处理,打开
/home/vagrant/nginx-1.11.2/objs/Makefile
去掉CFLAGS中的
-Werror
再重新
make
-Wall 表示打开gcc的所有警告
-Werror,它要求gcc将所有的警告当成错误进行处理