Essentially, nginx 1.17.7 + 2.0.4.2 of this repo produces the following error after ./configure --with-debug --add-module=../nginx-rtmp-module-2.0.4.2 --with-cc-opt="-Wimplicit-fallthrough=0" --with-http_ssl_module\ && make \ && make install \
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c: In function 'ngx_rtmp_notify_get_http_header':
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:971:16: error: pointer targets in assignment from 'u_char *' {aka 'unsigned char *'} to 'char *' differ in signedness [-Werror=pointer-sign]
971 | for (p = b->pos; p != b->last; ++p) {
| ^
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:971:28: error: comparison of distinct pointer types lacks a cast [-Werror]
971 | for (p = b->pos; p != b->last; ++p) {
| ^~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c: In function 'str_replace':
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1169:20: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
1169 | for(count = 0; tmp = strstr(ins, rep); ++count){
| ^~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c: In function 'ngx_rtmp_notify_publish_handle':
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1219:40: error: pointer targets in passing argument 1 of 'strcmp' differ in signedness [-Werror=pointer-sign]
1219 | if(strcmp(headers.hs[i].name, "Content-Length") == 0){
| ~~~~~~~~~~~~~^~~~~
| |
| u_char * {aka unsigned char *}
In file included from src/os/unix/ngx_linux_config.h:27,
from src/core/ngx_config.h:26,
from ../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:7:
/usr/include/string.h:37:13: note: expected 'const char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
37 | int strcmp (const char *, const char *);
| ^~~~~~~~~~~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1220:56: error: pointer targets in passing argument 1 of 'atoi' differ in signedness [-Werror=pointer-sign]
1220 | content_length = atoi(headers.hs[i].value);
| ~~~~~~~~~~~~~^~~~~~
| |
| u_char * {aka unsigned char *}
In file included from src/os/unix/ngx_linux_config.h:24,
from src/core/ngx_config.h:26,
from ../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:7:
/usr/include/stdlib.h:21:11: note: expected 'const char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
21 | int atoi (const char *);
| ^~~~~~~~~~~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1229:66: error: pointer targets in passing argument 2 of 'str_replace' differ in signedness [-Werror=pointer-sign]
1229 | p = (u_char*)str_replace(s, ctx->playlist.data, ctx->name.data, body.data);
| ~~~~~~~~~~~~~^~~~~
| |
| u_char * {aka unsigned char *}
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1148:48: note: expected 'char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
1148 | char *str_replace(ngx_rtmp_session_t *s, char *orig, char *rep, char *with)
| ~~~~~~^~~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1229:82: error: pointer targets in passing argument 3 of 'str_replace' differ in signedness [-Werror=pointer-sign]
1229 | p = (u_char*)str_replace(s, ctx->playlist.data, ctx->name.data, body.data);
| ~~~~~~~~~^~~~~
| |
| u_char * {aka unsigned char *}
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1148:60: note: expected 'char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
1148 | char *str_replace(ngx_rtmp_session_t *s, char *orig, char *rep, char *with)
| ~~~~~~^~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1229:93: error: pointer targets in passing argument 4 of 'str_replace' differ in signedness [-Werror=pointer-sign]
1229 | p = (u_char*)str_replace(s, ctx->playlist.data, ctx->name.data, body.data);
| ~~~~^~~~~
| |
| u_char * {aka unsigned char *}
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1148:71: note: expected 'char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
1148 | char *str_replace(ngx_rtmp_session_t *s, char *orig, char *rep, char *with)
| ~~~~~~^~~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1238:70: error: pointer targets in passing argument 2 of 'str_replace' differ in signedness [-Werror=pointer-sign]
1238 | p = (u_char*)str_replace(s, ctx->playlist_bak.data, ctx->name.data, body.data);
| ~~~~~~~~~~~~~~~~~^~~~~
| |
| u_char * {aka unsigned char *}
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1148:48: note: expected 'char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
1148 | char *str_replace(ngx_rtmp_session_t *s, char *orig, char *rep, char *with)
| ~~~~~~^~~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1238:86: error: pointer targets in passing argument 3 of 'str_replace' differ in signedness [-Werror=pointer-sign]
1238 | p = (u_char*)str_replace(s, ctx->playlist_bak.data, ctx->name.data, body.data);
| ~~~~~~~~~^~~~~
| |
| u_char * {aka unsigned char *}
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1148:60: note: expected 'char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
1148 | char *str_replace(ngx_rtmp_session_t *s, char *orig, char *rep, char *with)
| ~~~~~~^~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1238:97: error: pointer targets in passing argument 4 of 'str_replace' differ in signedness [-Werror=pointer-sign]
1238 | p = (u_char*)str_replace(s, ctx->playlist_bak.data, ctx->name.data, body.data);
| ~~~~^~~~~
| |
| u_char * {aka unsigned char *}
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1148:71: note: expected 'char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
1148 | char *str_replace(ngx_rtmp_session_t *s, char *orig, char *rep, char *with)
| ~~~~~~^~~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1246:64: error: pointer targets in passing argument 2 of 'str_replace' differ in signedness [-Werror=pointer-sign]
1246 | p = (u_char*)str_replace(s, ctx->stream.data, ctx->name.data, body.data);
| ~~~~~~~~~~~^~~~~
| |
| u_char * {aka unsigned char *}
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1148:48: note: expected 'char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
1148 | char *str_replace(ngx_rtmp_session_t *s, char *orig, char *rep, char *with)
| ~~~~~~^~~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1246:80: error: pointer targets in passing argument 3 of 'str_replace' differ in signedness [-Werror=pointer-sign]
1246 | p = (u_char*)str_replace(s, ctx->stream.data, ctx->name.data, body.data);
| ~~~~~~~~~^~~~~
| |
| u_char * {aka unsigned char *}
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1148:60: note: expected 'char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
1148 | char *str_replace(ngx_rtmp_session_t *s, char *orig, char *rep, char *with)
| ~~~~~~^~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1246:91: error: pointer targets in passing argument 4 of 'str_replace' differ in signedness [-Werror=pointer-sign]
1246 | p = (u_char*)str_replace(s, ctx->stream.data, ctx->name.data, body.data);
| ~~~~^~~~~
| |
| u_char * {aka unsigned char *}
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1148:71: note: expected 'char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
1148 | char *str_replace(ngx_rtmp_session_t *s, char *orig, char *rep, char *with)
| ~~~~~~^~~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1254:62: error: pointer targets in passing argument 2 of 'str_replace' differ in signedness [-Werror=pointer-sign]
1254 | p = (u_char*)str_replace(s, ctx->name.data, ctx->name.data, body.data);
| ~~~~~~~~~^~~~~
| |
| u_char * {aka unsigned char *}
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1148:48: note: expected 'char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
1148 | char *str_replace(ngx_rtmp_session_t *s, char *orig, char *rep, char *with)
| ~~~~~~^~~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1254:78: error: pointer targets in passing argument 3 of 'str_replace' differ in signedness [-Werror=pointer-sign]
1254 | p = (u_char*)str_replace(s, ctx->name.data, ctx->name.data, body.data);
| ~~~~~~~~~^~~~~
| |
| u_char * {aka unsigned char *}
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1148:60: note: expected 'char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
1148 | char *str_replace(ngx_rtmp_session_t *s, char *orig, char *rep, char *with)
| ~~~~~~^~~
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1254:89: error: pointer targets in passing argument 4 of 'str_replace' differ in signedness [-Werror=pointer-sign]
1254 | p = (u_char*)str_replace(s, ctx->name.data, ctx->name.data, body.data);
| ~~~~^~~~~
| |
| u_char * {aka unsigned char *}
../nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.c:1148:71: note: expected 'char *' but argument is of type 'u_char *' {aka 'unsigned char *'}
1148 | char *str_replace(ngx_rtmp_session_t *s, char *orig, char *rep, char *with)
| ~~~~~~^~~~
cc1: all warnings being treated as errors
make[1]: *** [objs/Makefile:1467: objs/addon/nginx-rtmp-module-2.0.4.2/ngx_rtmp_notify_module.o] Error 1
make[1]: Leaving directory '/opt/nginx-rtmp/nginx-1.17.7'
make: *** [Makefile:8: build] Error 2
My Dockerfile (so you can reproduce the exact environment I am using) and output of
docker build .
https://gist.github.com/gburgwardt/795ae1e7c66eef43a780697658af70ee
Essentially, nginx 1.17.7 + 2.0.4.2 of this repo produces the following error after
./configure --with-debug --add-module=../nginx-rtmp-module-2.0.4.2 --with-cc-opt="-Wimplicit-fallthrough=0" --with-http_ssl_module\ && make \ && make install \