Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Actuall fix zero-length gnu_printf format string warning #524

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ 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.
Expand Down
2 changes: 0 additions & 2 deletions quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -34057,7 +34057,6 @@ typedef struct BCReaderState {
} BCReaderState;

#ifdef DUMP_READ_OBJECT
#pragma GCC diagnostic ignored "-Wformat-zero-length"
static void __attribute__((format(printf, 2, 3))) bc_read_trace(BCReaderState *s, const char *fmt, ...) {
va_list ap;
int i, n, n0;
Expand Down Expand Up @@ -34091,7 +34090,6 @@ static void __attribute__((format(printf, 2, 3))) bc_read_trace(BCReaderState *s
if (strchr(fmt, '{'))
s->level++;
}
#pragma GCC diagnostic warning "-Wformat-zero-length"
#else
#define bc_read_trace(...)
#endif
Expand Down
Loading