comparison src/http/modules/ngx_http_uwsgi_module.c @ 7406:ed5b3c4c1284 stable-1.14

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
comparison
equal deleted inserted replaced
7405:d1525e45255a 7406:ed5b3c4c1284
1985 sizeof(ngx_http_script_copy_code_t)); 1985 sizeof(ngx_http_script_copy_code_t));
1986 if (copy == NULL) { 1986 if (copy == NULL) {
1987 return NGX_ERROR; 1987 return NGX_ERROR;
1988 } 1988 }
1989 1989
1990 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code; 1990 copy->code = (ngx_http_script_code_pt) (void *)
1991 ngx_http_script_copy_len_code;
1991 copy->len = src[i].key.len; 1992 copy->len = src[i].key.len;
1992 1993
1993 copy = ngx_array_push_n(params->lengths, 1994 copy = ngx_array_push_n(params->lengths,
1994 sizeof(ngx_http_script_copy_code_t)); 1995 sizeof(ngx_http_script_copy_code_t));
1995 if (copy == NULL) { 1996 if (copy == NULL) {
1996 return NGX_ERROR; 1997 return NGX_ERROR;
1997 } 1998 }
1998 1999
1999 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code; 2000 copy->code = (ngx_http_script_code_pt) (void *)
2001 ngx_http_script_copy_len_code;
2000 copy->len = src[i].skip_empty; 2002 copy->len = src[i].skip_empty;
2001 2003
2002 2004
2003 size = (sizeof(ngx_http_script_copy_code_t) 2005 size = (sizeof(ngx_http_script_copy_code_t)
2004 + src[i].key.len + sizeof(uintptr_t) - 1) 2006 + src[i].key.len + sizeof(uintptr_t) - 1)