Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_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 | 06cf0c4b8618 |
children | 696df3ac27ac |
comparison
equal
deleted
inserted
replaced
7270:46c0c7ef4913 | 7271:9e25a5380a21 |
---|---|
3491 sizeof(ngx_http_script_copy_code_t)); | 3491 sizeof(ngx_http_script_copy_code_t)); |
3492 if (copy == NULL) { | 3492 if (copy == NULL) { |
3493 return NGX_ERROR; | 3493 return NGX_ERROR; |
3494 } | 3494 } |
3495 | 3495 |
3496 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code; | 3496 copy->code = (ngx_http_script_code_pt) (void *) |
3497 ngx_http_script_copy_len_code; | |
3497 copy->len = src[i].key.len; | 3498 copy->len = src[i].key.len; |
3498 | 3499 |
3499 size = (sizeof(ngx_http_script_copy_code_t) | 3500 size = (sizeof(ngx_http_script_copy_code_t) |
3500 + src[i].key.len + sizeof(uintptr_t) - 1) | 3501 + src[i].key.len + sizeof(uintptr_t) - 1) |
3501 & ~(sizeof(uintptr_t) - 1); | 3502 & ~(sizeof(uintptr_t) - 1); |