summaryrefslogtreecommitdiffstats
path: root/src/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lex.c')
-rw-r--r--src/lex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lex.c b/src/lex.c
index 59599ee..9e68bc2 100644
--- a/src/lex.c
+++ b/src/lex.c
@@ -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);