Merge branch 'fix_compile_warnings'

This commit is contained in:
2026-02-20 15:34:50 -06:00
40 changed files with 282 additions and 312 deletions

View File

@@ -1060,7 +1060,6 @@ JSValue js_cell_character (JSContext *ctx, JSValue this_val, int argc, JSValue *
static JSValue js_cell_number (JSContext *ctx, JSValue this_val, int argc, JSValue *argv);
static JSValue js_cell_object (JSContext *ctx, JSValue this_val, int argc, JSValue *argv);
static JSValue js_cell_text_format (JSContext *ctx, JSValue this_val, int argc, JSValue *argv);
static JSValue js_print (JSContext *ctx, JSValue this_val, int argc, JSValue *argv);
JSValue JS_GetStack(JSContext *ctx);
JSValue JS_RaiseOOM (JSContext *ctx);

View File

@@ -8135,19 +8135,6 @@ static JSValue js_cell_text_format (JSContext *ctx, JSValue this_val, int argc,
return pretext_end (ctx, result);
}
/* print(args...) - print arguments to stdout */
static JSValue js_print (JSContext *ctx, JSValue this_val, int argc, JSValue *argv) {
for (int i = 0; i < argc; i++) {
const char *str = JS_ToCString (ctx, argv[i]);
if (str) {
fputs (str, stdout);
JS_FreeCString (ctx, str);
}
if (i < argc - 1) fputc (' ', stdout);
}
fputc ('\n', stdout);
return JS_NULL;
}
static JSValue js_stacktrace (JSContext *ctx, JSValue this_val, int argc, JSValue *argv) {
(void)this_val; (void)argc; (void)argv;
@@ -11554,7 +11541,6 @@ static void JS_AddIntrinsicBaseObjects (JSContext *ctx) {
}
/* I/O functions */
js_set_global_cfunc(ctx, "print", js_print, -1); /* variadic: length < 0 means no arg limit */
js_set_global_cfunc(ctx, "stacktrace", js_stacktrace, 0);
js_set_global_cfunc(ctx, "caller_info", js_caller_info, 1);
}