summaryrefslogtreecommitdiff
path: root/src/wasm-binary-reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-binary-reader.c')
-rw-r--r--src/wasm-binary-reader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wasm-binary-reader.c b/src/wasm-binary-reader.c
index d62e1fab..47497b07 100644
--- a/src/wasm-binary-reader.c
+++ b/src/wasm-binary-reader.c
@@ -86,7 +86,8 @@ typedef struct WasmContext {
WasmUint32Vector target_depths;
} WasmContext;
-static void raise_error(WasmContext* ctx, const char* format, ...) {
+static void WASM_PRINTF_FORMAT(2, 3)
+ raise_error(WasmContext* ctx, const char* format, ...) {
WASM_SNPRINTF_ALLOCA(buffer, length, format);
assert(ctx->reader->on_error);
ctx->reader->on_error(ctx->offset, buffer, ctx->reader->user_data);