aileone / nginx-rtmp-module

add hevc support for rtmp and hls(增加支持H265,修复gcc -Werror警告)
BSD 2-Clause "Simplified" License
39 stars 16 forks source link

Compilation error #2

Closed rharunzade closed 4 years ago

rharunzade commented 4 years ago

-o objs/addon/nginx-rtmp-module/ngx_rtmp_codec_module.o \ ../nginx-rtmp-module/ngx_rtmp_codec_module.c ../nginx-rtmp-module/ngx_rtmp_codec_module.c: In function ‘ngx_rtmp_codec_parse_hevc_header’: ../nginx-rtmp-module/ngx_rtmp_codec_module.c:556:42: error: variable ‘nal_type’ set but not used [-Werror=unused-but-set-variable] ngx_uint_t i, j, narrs, nal_type, nnal, nnall; ^~~~ cc1: all warnings being treated as errors objs/Makefile:1390: recipe for target 'objs/addon/nginx-rtmp-module/ngx_rtmp_codec_module.o' failed make[1]: [objs/addon/nginx-rtmp-module/ngx_rtmp_codec_module.o] Error 1 make[1]: Leaving directory '/root/build/nginx-1.17.4' Makefile:8: recipe for target 'build' failed make: [build] Error 2

aileone commented 4 years ago

Your compiler checks very strictly, It's not a error, it's a warning。 You can modify the Makefile, find -Werror, and remove it. Recompile it!

donatid commented 3 years ago

Hi,

You can try to skip the error using the following command: $ make CFLAGS='-Wno-implicit-fallthrough'