diff src/http/modules/ngx_http_uwsgi_module.c @ 7271:9e25a5380a21

Silenced -Wcast-function-type warnings (closes #1546). Cast to intermediate "void *" to lose compiler knowledge about the original type and pass the warning. This is not a real fix but rather a workaround. Found by gcc8.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 07 May 2018 09:54:37 +0000
parents f684178faec9
children 696df3ac27ac
line wrap: on
line diff
--- a/src/http/modules/ngx_http_uwsgi_module.c
+++ b/src/http/modules/ngx_http_uwsgi_module.c
@@ -1987,7 +1987,8 @@ ngx_http_uwsgi_init_params(ngx_conf_t *c
             return NGX_ERROR;
         }
 
-        copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
+        copy->code = (ngx_http_script_code_pt) (void *)
+                                                 ngx_http_script_copy_len_code;
         copy->len = src[i].key.len;
 
         copy = ngx_array_push_n(params->lengths,
@@ -1996,7 +1997,8 @@ ngx_http_uwsgi_init_params(ngx_conf_t *c
             return NGX_ERROR;
         }
 
-        copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
+        copy->code = (ngx_http_script_code_pt) (void *)
+                                                 ngx_http_script_copy_len_code;
         copy->len = src[i].skip_empty;