From 8ef2f014f80ad118c901db4c65d4feb0baf878da Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Thu, 28 Apr 2016 20:33:06 -0700 Subject: add printf format attribute; fix some format bugs --- src/wasm-option-parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/wasm-option-parser.c') diff --git a/src/wasm-option-parser.c b/src/wasm-option-parser.c index 4d9eeabd..8aea99b3 100644 --- a/src/wasm-option-parser.c +++ b/src/wasm-option-parser.c @@ -49,7 +49,8 @@ static int option_match(const char* s, return i; } -static void error(WasmOptionParser* parser, const char* format, ...) { +static void WASM_PRINTF_FORMAT(2, 3) + error(WasmOptionParser* parser, const char* format, ...) { WASM_SNPRINTF_ALLOCA(buffer, length, format); parser->on_error(parser, buffer); } -- cgit v1.2.3