nginx-rtmp-module icon indicating copy to clipboard operation
nginx-rtmp-module copied to clipboard

Building this with GCC 7 causes error.

Open pmukherjeee opened this issue 9 years ago • 4 comments

Platform: OpenSUSE Tumbleweed.

GCC version: gcc version 7.1.1 20170802 [gcc-7-branch revision 250825] (SUSE Linux)

Log:

cc -c -pipe  -O -W -Wpointer-arith -Wno-unused-parameter -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../nginx-rtmp -I objs -I src/http -I src/http/modules \
	-o objs/addon/nginx-rtmp/ngx_rtmp_init.o \
	../nginx-rtmp/ngx_rtmp_init.c
../nginx-rtmp/ngx_rtmp_init.c: In function ‘ngx_rtmp_init_connection’:
../nginx-rtmp/ngx_rtmp_init.c:81:25: error: this statement may fall through [-Werror=implicit-fallthrough=]
             unix_socket = 1;
             ~~~~~~~~~~~~^~~
../nginx-rtmp/ngx_rtmp_init.c:83:9: note: here
         default: /* AF_INET */
         ^~~~~~~
../nginx-rtmp/ngx_rtmp_init.c:112:25: error: this statement may fall through [-Werror=implicit-fallthrough=]
             unix_socket = 1;
             ~~~~~~~~~~~~^~~
../nginx-rtmp/ngx_rtmp_init.c:114:9: note: here
         default: /* AF_INET */
         ^~~~~~~
cc1: all warnings being treated as errors

Workaround

Manually change objs/Makefile. Remove -Werror (unsafe).

pmukherjeee avatar Sep 01 '17 16:09 pmukherjeee

@arut Is there any update on this?

dolftax avatar Oct 13 '17 09:10 dolftax

got the same problem

SnailTowardThesun avatar Oct 23 '17 05:10 SnailTowardThesun

Same problem, "fixed" mine by building it with gcc6 instead.

theochita avatar Oct 25 '17 06:10 theochita

PR #1125 solves the issue but has yet to be merged.

nitrix avatar Oct 25 '17 15:10 nitrix