summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2018-05-07 09:54:37 +0000
committerSergey Kandaurov <pluknet@nginx.com>2018-05-07 09:54:37 +0000
commit68b50f71e193e58ee117ef36f25387cbaa75edf3 (patch)
tree69ae290ce40d3e7a7d9bb703d26e22df64b3e345 /src/http/modules
parent658a84f4252b65ef060b1d33b2ff0e749902978b (diff)
downloadnginx-68b50f71e193e58ee117ef36f25387cbaa75edf3.tar.gz
nginx-68b50f71e193e58ee117ef36f25387cbaa75edf3.tar.bz2
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.
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c6
-rw-r--r--src/http/modules/ngx_http_grpc_module.c3
-rw-r--r--src/http/modules/ngx_http_proxy_module.c3
-rw-r--r--src/http/modules/ngx_http_scgi_module.c6
-rw-r--r--src/http/modules/ngx_http_uwsgi_module.c6
5 files changed, 16 insertions, 8 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index bc43f53ed..3eec1b7dd 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -3264,7 +3264,8 @@ ngx_http_fastcgi_init_params(ngx_conf_t *cf, ngx_http_fastcgi_loc_conf_t *conf,
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,
@@ -3273,7 +3274,8 @@ ngx_http_fastcgi_init_params(ngx_conf_t *cf, ngx_http_fastcgi_loc_conf_t *conf,
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;
diff --git a/src/http/modules/ngx_http_grpc_module.c b/src/http/modules/ngx_http_grpc_module.c
index 837ad9a2e..300d92704 100644
--- a/src/http/modules/ngx_http_grpc_module.c
+++ b/src/http/modules/ngx_http_grpc_module.c
@@ -4389,7 +4389,8 @@ ngx_http_grpc_init_headers(ngx_conf_t *cf, ngx_http_grpc_loc_conf_t *conf,
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;
size = (sizeof(ngx_http_script_copy_code_t)
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index c9ad638df..e7f829d65 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -3493,7 +3493,8 @@ ngx_http_proxy_init_headers(ngx_conf_t *cf, ngx_http_proxy_loc_conf_t *conf,
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;
size = (sizeof(ngx_http_script_copy_code_t)
diff --git a/src/http/modules/ngx_http_scgi_module.c b/src/http/modules/ngx_http_scgi_module.c
index 3fb227b28..9bd45bd13 100644
--- a/src/http/modules/ngx_http_scgi_module.c
+++ b/src/http/modules/ngx_http_scgi_module.c
@@ -1724,7 +1724,8 @@ ngx_http_scgi_init_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
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 + 1;
copy = ngx_array_push_n(params->lengths,
@@ -1733,7 +1734,8 @@ ngx_http_scgi_init_params(ngx_conf_t *cf, ngx_http_scgi_loc_conf_t *conf,
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;
diff --git a/src/http/modules/ngx_http_uwsgi_module.c b/src/http/modules/ngx_http_uwsgi_module.c
index 124da4db5..238bcf8a3 100644
--- 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 *cf, ngx_http_uwsgi_loc_conf_t *conf,
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 *cf, ngx_http_uwsgi_loc_conf_t *conf,
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;