Avoid void pointer to function pointer casts
This commit is contained in:
parent
acc7758335
commit
4b5e033bc8
1 changed files with 2 additions and 3 deletions
|
@ -184,8 +184,7 @@ static JSValue js_printf_internal(JSContext *ctx,
|
||||||
int64_t int64_arg;
|
int64_t int64_arg;
|
||||||
double double_arg;
|
double double_arg;
|
||||||
const char *string_arg;
|
const char *string_arg;
|
||||||
/* Use indirect call to dbuf_printf to prevent gcc warning */
|
int (*dbuf_printf_fun)(DynBuf *s, const char *fmt, ...) = dbuf_printf;
|
||||||
int (*dbuf_printf_fun)(DynBuf *s, const char *fmt, ...) = (void*)dbuf_printf;
|
|
||||||
|
|
||||||
js_std_dbuf_init(ctx, &dbuf);
|
js_std_dbuf_init(ctx, &dbuf);
|
||||||
|
|
||||||
|
@ -518,7 +517,7 @@ static JSModuleDef *js_module_loader_so(JSContext *ctx,
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
init = dlsym(hd, "js_init_module");
|
init = (JSInitModuleFunc *)dlsym(hd, "js_init_module");
|
||||||
if (!init) {
|
if (!init) {
|
||||||
JS_ThrowReferenceError(ctx, "could not load module filename '%s': js_init_module not found",
|
JS_ThrowReferenceError(ctx, "could not load module filename '%s': js_init_module not found",
|
||||||
module_name);
|
module_name);
|
||||||
|
|
Loading…
Reference in a new issue