diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-20 06:02:29 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-20 06:08:07 +0200 |
commit | d9dc87d8409ddf8361b7fcb311ae97088ed1d984 (patch) | |
tree | c63be2cf2a7d978dd5b30b3a404d9442acefdff7 /src/lex.c | |
parent | 3fd947a2d13a3f110f7c558b1d294dddfd2d25e0 (diff) | |
download | fastd-d9dc87d8409ddf8361b7fcb311ae97088ed1d984.tar fastd-d9dc87d8409ddf8361b7fcb311ae97088ed1d984.zip |
Fix lots of -Wextra warnings
Everything clang and GCC warn about, except GCC's missing-field-initializers
which are just stupid as they don't allow {} syntax to zero a field.
Diffstat (limited to 'src/lex.c')
-rw-r--r-- | src/lex.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -169,7 +169,7 @@ static void consume(fastd_lex_t *lex, bool needspace) { lex->needspace = needspace; } -static int io_error(YYSTYPE *yylval, fastd_lex_t *lex) { +static int io_error(YYSTYPE *yylval, fastd_lex_t *lex UNUSED) { yylval->error = "I/O error"; return -1; } @@ -354,7 +354,7 @@ static int parse_keyword(YYSTYPE *yylval, YYLTYPE *yylloc, fastd_lex_t *lex) { } char *token = get_token(lex); - const keyword_t key = {token}; + const keyword_t key = { .keyword = token }; const keyword_t *ret = bsearch(&key, keywords, sizeof(keywords)/sizeof(keyword_t), sizeof(keyword_t), compare_keywords); free(token); |