Mercurial > hg > nginx
comparison src/http/modules/ngx_http_fastcgi_module.c @ 9312:098019656024
Changed script length code casts to work with -Wpedantic.
Script length code casts though "void *", as introduced in
7271:9e25a5380a21 to silence -Wcast-function-type warnings, result
in "ISO C forbids conversion of function pointer to object pointer type"
warnings with -Wpedantic. Fix is to cast though uintptr_t instead.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 07 Aug 2024 03:56:38 +0300 |
parents | 35bb47f65cab |
children |
comparison
equal
deleted
inserted
replaced
9311:0ad3dde83947 | 9312:098019656024 |
---|---|
3434 sizeof(ngx_http_script_copy_code_t)); | 3434 sizeof(ngx_http_script_copy_code_t)); |
3435 if (copy == NULL) { | 3435 if (copy == NULL) { |
3436 return NGX_ERROR; | 3436 return NGX_ERROR; |
3437 } | 3437 } |
3438 | 3438 |
3439 copy->code = (ngx_http_script_code_pt) (void *) | 3439 copy->code = (ngx_http_script_code_pt) (uintptr_t) |
3440 ngx_http_script_copy_len_code; | 3440 ngx_http_script_copy_len_code; |
3441 copy->len = src[i].key.len; | 3441 copy->len = src[i].key.len; |
3442 | 3442 |
3443 copy = ngx_array_push_n(params->lengths, | 3443 copy = ngx_array_push_n(params->lengths, |
3444 sizeof(ngx_http_script_copy_code_t)); | 3444 sizeof(ngx_http_script_copy_code_t)); |
3445 if (copy == NULL) { | 3445 if (copy == NULL) { |
3446 return NGX_ERROR; | 3446 return NGX_ERROR; |
3447 } | 3447 } |
3448 | 3448 |
3449 copy->code = (ngx_http_script_code_pt) (void *) | 3449 copy->code = (ngx_http_script_code_pt) (uintptr_t) |
3450 ngx_http_script_copy_len_code; | 3450 ngx_http_script_copy_len_code; |
3451 copy->len = src[i].skip_empty; | 3451 copy->len = src[i].skip_empty; |
3452 | 3452 |
3453 | 3453 |
3454 size = (sizeof(ngx_http_script_copy_code_t) | 3454 size = (sizeof(ngx_http_script_copy_code_t) |