summaryrefslogtreecommitdiff
path: root/src/wasm-binary-reader-ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-binary-reader-ast.c')
-rw-r--r--src/wasm-binary-reader-ast.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm-binary-reader-ast.c b/src/wasm-binary-reader-ast.c
index 7ff795b2..bd326050 100644
--- a/src/wasm-binary-reader-ast.c
+++ b/src/wasm-binary-reader-ast.c
@@ -108,7 +108,8 @@ typedef struct WasmContext {
static void on_error(uint32_t offset, const char* message, void* user_data);
-static void print_error(WasmContext* ctx, const char* format, ...) {
+static void WASM_PRINTF_FORMAT(2, 3)
+ print_error(WasmContext* ctx, const char* format, ...) {
WASM_SNPRINTF_ALLOCA(buffer, length, format);
on_error(WASM_UNKNOWN_OFFSET, buffer, ctx);
}