Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC 8.1 and 8.2 compilation error: cast between incompatible function types #1357

Closed
akornatskyy opened this issue Jul 26, 2018 · 2 comments
Closed

Comments

@akornatskyy
Copy link

akornatskyy commented Jul 26, 2018

nginx 1.15.1
lua-nginx-module 1.10.13
luajit 2.1
gcc version 8.1.0 (Debian 8.1.0-12)
gcc version 8.2.0 (Debian 8.2.0-1)
debian buster 4.17.8-1 (2018-07-20) x86_64

./lua-nginx-module/src/ngx_http_lua_script.c: In function ‘ngx_http_lua_script_add_copy_code’:
./lua-nginx-module/src/ngx_http_lua_script.c:332:18: error: cast between incompatible function types from ‘size_t (*)(ngx_http_lua_script_engine_t *)’ {aka ‘long unsigned int (*)(struct <anonymous> *)’} to ‘void (*)(ngx_http_lua_script_engine_t *)’ {aka ‘void (*)(struct <anonymous> *)’} [-Werror=cast-function-type]
     code->code = (ngx_http_lua_script_code_pt)
                  ^
./lua-nginx-module/src/ngx_http_lua_script.c: In function ‘ngx_http_lua_script_add_capture_code’:
./lua-nginx-module/src/ngx_http_lua_script.c:402:18: error: cast between incompatible function types from ‘size_t (*)(ngx_http_lua_script_engine_t *)’ {aka ‘long unsigned int (*)(struct <anonymous> *)’} to ‘void (*)(ngx_http_lua_script_engine_t *)’ {aka ‘void (*)(struct <anonymous> *)’} [-Werror=cast-function-type]
     code->code = (ngx_http_lua_script_code_pt)
@akornatskyy akornatskyy changed the title GCC 8.1 compilation error: cast between incompatible function types GCC 8.1 and 8.2 compilation error: cast between incompatible function types Aug 3, 2018
@ghedo
Copy link
Contributor

ghedo commented Aug 23, 2018

@thibaultcha
Copy link
Member

This is now fixed in master thanks to @ghedo's patch. Closing this, thanks for the report @akornatskyy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants