summaryrefslogtreecommitdiff
path: root/src/wasm-binary-reader-ast.c
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2016-04-28 20:33:06 -0700
committerBen Smith <binji@chromium.org>2016-04-28 20:35:52 -0700
commit8ef2f014f80ad118c901db4c65d4feb0baf878da (patch)
treed5217568ca923468474e5600467ef0a191d4ab74 /src/wasm-binary-reader-ast.c
parent310ab15d442195fdee0ce0de20ff79ab054c19d6 (diff)
downloadwabt-8ef2f014f80ad118c901db4c65d4feb0baf878da.tar.gz
wabt-8ef2f014f80ad118c901db4c65d4feb0baf878da.tar.bz2
wabt-8ef2f014f80ad118c901db4c65d4feb0baf878da.zip
add printf format attribute; fix some format bugs
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);
}