Klaus Demo nginx / ed41ac6
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. Sergey Kandaurov 3 years ago
7 changed file(s) with 31 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
32633263 return NGX_ERROR;
32643264 }
32653265
3266 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
3266 copy->code = (ngx_http_script_code_pt) (void *)
3267 ngx_http_script_copy_len_code;
32673268 copy->len = src[i].key.len;
32683269
32693270 copy = ngx_array_push_n(params->lengths,
32723273 return NGX_ERROR;
32733274 }
32743275
3275 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
3276 copy->code = (ngx_http_script_code_pt) (void *)
3277 ngx_http_script_copy_len_code;
32763278 copy->len = src[i].skip_empty;
32773279
32783280
44034403 return NGX_ERROR;
44044404 }
44054405
4406 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
4406 copy->code = (ngx_http_script_code_pt) (void *)
4407 ngx_http_script_copy_len_code;
44074408 copy->len = src[i].key.len;
44084409
44094410 size = (sizeof(ngx_http_script_copy_code_t)
34923492 return NGX_ERROR;
34933493 }
34943494
3495 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
3495 copy->code = (ngx_http_script_code_pt) (void *)
3496 ngx_http_script_copy_len_code;
34963497 copy->len = src[i].key.len;
34973498
34983499 size = (sizeof(ngx_http_script_copy_code_t)
17231723 return NGX_ERROR;
17241724 }
17251725
1726 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
1726 copy->code = (ngx_http_script_code_pt) (void *)
1727 ngx_http_script_copy_len_code;
17271728 copy->len = src[i].key.len + 1;
17281729
17291730 copy = ngx_array_push_n(params->lengths,
17321733 return NGX_ERROR;
17331734 }
17341735
1735 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
1736 copy->code = (ngx_http_script_code_pt) (void *)
1737 ngx_http_script_copy_len_code;
17361738 copy->len = src[i].skip_empty;
17371739
17381740
19861986 return NGX_ERROR;
19871987 }
19881988
1989 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
1989 copy->code = (ngx_http_script_code_pt) (void *)
1990 ngx_http_script_copy_len_code;
19901991 copy->len = src[i].key.len;
19911992
19921993 copy = ngx_array_push_n(params->lengths,
19951996 return NGX_ERROR;
19961997 }
19971998
1998 copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
1999 copy->code = (ngx_http_script_code_pt) (void *)
2000 ngx_http_script_copy_len_code;
19992001 copy->len = src[i].skip_empty;
20002002
20012003
694694 return NGX_ERROR;
695695 }
696696
697 code->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code;
697 code->code = (ngx_http_script_code_pt) (void *)
698 ngx_http_script_copy_len_code;
698699 code->len = len;
699700
700701 size = (sizeof(ngx_http_script_copy_code_t) + len + sizeof(uintptr_t) - 1)
783784 return NGX_ERROR;
784785 }
785786
786 code->code = (ngx_http_script_code_pt) ngx_http_script_copy_var_len_code;
787 code->code = (ngx_http_script_code_pt) (void *)
788 ngx_http_script_copy_var_len_code;
787789 code->index = (uintptr_t) index;
788790
789791 code = ngx_http_script_add_code(*sc->values,
11771179 return NGX_ERROR;
11781180 }
11791181
1180 code->code = (ngx_http_script_code_pt)
1181 ngx_http_script_copy_capture_len_code;
1182 code->code = (ngx_http_script_code_pt) (void *)
1183 ngx_http_script_copy_capture_len_code;
11821184 code->n = 2 * n;
11831185
11841186
12921294 return NGX_ERROR;
12931295 }
12941296
1295 code->code = (ngx_http_script_code_pt) ngx_http_script_full_name_len_code;
1297 code->code = (ngx_http_script_code_pt) (void *)
1298 ngx_http_script_full_name_len_code;
12961299 code->conf_prefix = sc->conf_prefix;
12971300
12981301 code = ngx_http_script_add_code(*sc->values,
586586 return NGX_ERROR;
587587 }
588588
589 code->code = (ngx_stream_script_code_pt) ngx_stream_script_copy_len_code;
589 code->code = (ngx_stream_script_code_pt) (void *)
590 ngx_stream_script_copy_len_code;
590591 code->len = len;
591592
592593 size = (sizeof(ngx_stream_script_copy_code_t) + len + sizeof(uintptr_t) - 1)
676677 return NGX_ERROR;
677678 }
678679
679 code->code = (ngx_stream_script_code_pt)
680 ngx_stream_script_copy_var_len_code;
680 code->code = (ngx_stream_script_code_pt) (void *)
681 ngx_stream_script_copy_var_len_code;
681682 code->index = (uintptr_t) index;
682683
683684 code = ngx_stream_script_add_code(*sc->values,
766767 return NGX_ERROR;
767768 }
768769
769 code->code = (ngx_stream_script_code_pt)
770 ngx_stream_script_copy_capture_len_code;
770 code->code = (ngx_stream_script_code_pt) (void *)
771 ngx_stream_script_copy_capture_len_code;
771772 code->n = 2 * n;
772773
773774
858859 return NGX_ERROR;
859860 }
860861
861 code->code = (ngx_stream_script_code_pt)
862 code->code = (ngx_stream_script_code_pt) (void *)
862863 ngx_stream_script_full_name_len_code;
863864 code->conf_prefix = sc->conf_prefix;
864865