From 86b1853a21064f22074b2e6647692d0c22185541 Mon Sep 17 00:00:00 2001 From: satk0 Date: Mon, 7 Oct 2024 22:07:26 +0200 Subject: [PATCH] Improve gcc warning fix --- CMakeLists.txt | 1 - quickjs.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aabaf5a..5af3fef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,6 @@ xcheck_add_c_compiler_flag(-Wno-unused-parameter) xcheck_add_c_compiler_flag(-Wno-unused-but-set-variable) xcheck_add_c_compiler_flag(-Wno-array-bounds) xcheck_add_c_compiler_flag(-Wno-format-truncation) -xcheck_add_c_compiler_flag(-Wno-format-zero-length) xcheck_add_c_compiler_flag(-funsigned-char) # ClangCL is command line compatible with MSVC, so 'MSVC' is set. diff --git a/quickjs.c b/quickjs.c index bdc0cc8..38a0fdc 100644 --- a/quickjs.c +++ b/quickjs.c @@ -34643,7 +34643,7 @@ static JSString *JS_ReadString(BCReaderState *s) } #ifdef DUMP_READ_OBJECT if (check_dump_flag(s->ctx->rt, DUMP_READ_OBJECT)) { - bc_read_trace(s, ""); // hex dump and indentation + bc_read_trace(s, "%s", ""); // hex dump and indentation JS_DumpString(s->ctx->rt, p); printf("\n"); } @@ -34703,7 +34703,7 @@ static int JS_ReadFunctionBytecode(BCReaderState *s, JSFunctionBytecode *b, const uint8_t *save_ptr = s->ptr; s->ptr = s->ptr_last + len; s->level -= 4; - bc_read_trace(s, ""); // hex dump + indent + bc_read_trace(s, "%s", ""); // hex dump + indent dump_single_byte_code(s->ctx, bc_buf + pos, b, s->ptr - s->buf_start - len); s->level += 4;