diff options
| author | Sergey Kandaurov <pluknet@nginx.com> | 2018-05-07 09:54:37 +0000 |
|---|---|---|
| committer | Sergey Kandaurov <pluknet@nginx.com> | 2018-05-07 09:54:37 +0000 |
| commit | ed41ac66a24d51820391ef207db492f026193758 (patch) | |
| tree | de7654699e48a8af04080e098491965a93052ead /src/http/ngx_http_script.c | |
| parent | 87c1e1bd364699ac20376be62506ac0877ca035c (diff) | |
| download | nginx-ed41ac66a24d51820391ef207db492f026193758.tar.gz nginx-ed41ac66a24d51820391ef207db492f026193758.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/ngx_http_script.c')
| -rw-r--r-- | src/http/ngx_http_script.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c index 96f3ec696..1a8773561 100644 --- a/src/http/ngx_http_script.c +++ b/src/http/ngx_http_script.c @@ -695,7 +695,8 @@ ngx_http_script_add_copy_code(ngx_http_script_compile_t *sc, ngx_str_t *value, return NGX_ERROR; } - code->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code; + code->code = (ngx_http_script_code_pt) (void *) + ngx_http_script_copy_len_code; code->len = len; size = (sizeof(ngx_http_script_copy_code_t) + len + sizeof(uintptr_t) - 1) @@ -784,7 +785,8 @@ ngx_http_script_add_var_code(ngx_http_script_compile_t *sc, ngx_str_t *name) return NGX_ERROR; } - code->code = (ngx_http_script_code_pt) ngx_http_script_copy_var_len_code; + code->code = (ngx_http_script_code_pt) (void *) + ngx_http_script_copy_var_len_code; code->index = (uintptr_t) index; code = ngx_http_script_add_code(*sc->values, @@ -1178,8 +1180,8 @@ ngx_http_script_add_capture_code(ngx_http_script_compile_t *sc, ngx_uint_t n) return NGX_ERROR; } - code->code = (ngx_http_script_code_pt) - ngx_http_script_copy_capture_len_code; + code->code = (ngx_http_script_code_pt) (void *) + ngx_http_script_copy_capture_len_code; code->n = 2 * n; @@ -1293,7 +1295,8 @@ ngx_http_script_add_full_name_code(ngx_http_script_compile_t *sc) return NGX_ERROR; } - code->code = (ngx_http_script_code_pt) ngx_http_script_full_name_len_code; + code->code = (ngx_http_script_code_pt) (void *) + ngx_http_script_full_name_len_code; code->conf_prefix = sc->conf_prefix; code = ngx_http_script_add_code(*sc->values, |
