comparison src/http/modules/ngx_http_scgi_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 45e513c3540d
comparison
equal deleted inserted replaced
7270:46c0c7ef4913 7271:9e25a5380a21
1722 sizeof(ngx_http_script_copy_code_t)); 1722 sizeof(ngx_http_script_copy_code_t));
1723 if (copy == NULL) { 1723 if (copy == NULL) {
1724 return NGX_ERROR; 1724 return NGX_ERROR;
1725 } 1725 }
1726 1726
1727 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code; 1727 copy->code = (ngx_http_script_code_pt) (void *)
1728 ngx_http_script_copy_len_code;
1728 copy->len = src[i].key.len + 1; 1729 copy->len = src[i].key.len + 1;
1729 1730
1730 copy = ngx_array_push_n(params->lengths, 1731 copy = ngx_array_push_n(params->lengths,
1731 sizeof(ngx_http_script_copy_code_t)); 1732 sizeof(ngx_http_script_copy_code_t));
1732 if (copy == NULL) { 1733 if (copy == NULL) {
1733 return NGX_ERROR; 1734 return NGX_ERROR;
1734 } 1735 }
1735 1736
1736 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code; 1737 copy->code = (ngx_http_script_code_pt) (void *)
1738 ngx_http_script_copy_len_code;
1737 copy->len = src[i].skip_empty; 1739 copy->len = src[i].skip_empty;
1738 1740
1739 1741
1740 size = (sizeof(ngx_http_script_copy_code_t) 1742 size = (sizeof(ngx_http_script_copy_code_t)
1741 + src[i].key.len + 1 + sizeof(uintptr_t) - 1) 1743 + src[i].key.len + 1 + sizeof(uintptr_t) - 1)