Skip to content

Commit d067594

Browse files
ghedothibaultcha
authored andcommitted
bugfix: silenced -Wcast-function-type warnings.
Cast to intermediate "void *" to lose compiler knowledge about the original type and pass a gcc8 warning. Signed-off-by: Thibault Charbonnier <[email protected]>
1 parent 7286812 commit d067594

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ngx_http_lua_script.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ ngx_http_lua_script_add_copy_code(ngx_http_lua_script_compile_t *sc,
329329
return NGX_ERROR;
330330
}
331331

332-
code->code = (ngx_http_lua_script_code_pt)
332+
code->code = (ngx_http_lua_script_code_pt) (void *)
333333
ngx_http_lua_script_copy_len_code;
334334
code->len = len;
335335

@@ -399,7 +399,7 @@ ngx_http_lua_script_add_capture_code(ngx_http_lua_script_compile_t *sc,
399399
return NGX_ERROR;
400400
}
401401

402-
code->code = (ngx_http_lua_script_code_pt)
402+
code->code = (ngx_http_lua_script_code_pt) (void *)
403403
ngx_http_lua_script_copy_capture_len_code;
404404
code->n = 2 * n;
405405

0 commit comments

Comments
 (0)