diff options
author | Ben Smith <binji@chromium.org> | 2016-04-28 20:33:06 -0700 |
---|---|---|
committer | Ben Smith <binji@chromium.org> | 2016-04-28 20:35:52 -0700 |
commit | 8ef2f014f80ad118c901db4c65d4feb0baf878da (patch) | |
tree | d5217568ca923468474e5600467ef0a191d4ab74 /src/wasm-lexer.c | |
parent | 310ab15d442195fdee0ce0de20ff79ab054c19d6 (diff) | |
download | wabt-8ef2f014f80ad118c901db4c65d4feb0baf878da.tar.gz wabt-8ef2f014f80ad118c901db4c65d4feb0baf878da.tar.bz2 wabt-8ef2f014f80ad118c901db4c65d4feb0baf878da.zip |
add printf format attribute; fix some format bugs
Diffstat (limited to 'src/wasm-lexer.c')
-rw-r--r-- | src/wasm-lexer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wasm-lexer.c b/src/wasm-lexer.c index d28391ab..f5d38dc8 100644 --- a/src/wasm-lexer.c +++ b/src/wasm-lexer.c @@ -227,7 +227,8 @@ int wasm_lexer_lex(WASM_PARSER_STYPE* lval, <i> '"' => BAD_TEXT { continue; } <BAD_TEXT> character { continue; } <BAD_TEXT> "\n" => i { ERROR("newline in string"); NEWLINE; continue; } - <BAD_TEXT> "\\". { ERROR("bad escape \"%.*s\"", yyleng, yytext); continue; } + <BAD_TEXT> "\\". { ERROR("bad escape \"%.*s\"", (int)yyleng, yytext); + continue; } <BAD_TEXT> '"' => i { TEXT; RETURN(TEXT); } <BAD_TEXT> EOF { ERROR("unexpected EOF"); RETURN(EOF); } <BAD_TEXT> [^] { ERROR("illegal character in string"); continue; } @@ -441,7 +442,7 @@ int wasm_lexer_lex(WASM_PARSER_STYPE* lval, <i> "\n" { NEWLINE; continue; } <i> [ \t\r]+ { continue; } <i> atom { ERROR("unexpected token \"%.*s\"", - yyleng, yytext); + (int)yyleng, yytext); continue; } <*> EOF { RETURN(EOF); } <*> [^] { ERROR("unexpected char"); continue; } |