From: John Darrington Date: Sun, 4 Jul 2021 17:44:07 +0000 (+0200) Subject: Fix broken build due to missing braces X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afda22462a88ca2ec887fce3f0acef7ff5d5a6b7;p=pspp Fix broken build due to missing braces --- diff --git a/src/language/lexer/lexer.c b/src/language/lexer/lexer.c index bc031189fb..9753024cc3 100644 --- a/src/language/lexer/lexer.c +++ b/src/language/lexer/lexer.c @@ -1775,10 +1775,12 @@ lex_source_try_get__ (struct lex_source *src) case SCAN_EXPECTED_QUOTE: case SCAN_EXPECTED_EXPONENT: case SCAN_UNEXPECTED_CHAR: + { char *msg = scan_token_to_error (&token->token); lex_get_error (src, msg); free (msg); return false; + } case SCAN_SKIP: lex_source_pop_front (src); diff --git a/src/language/lexer/scan.c b/src/language/lexer/scan.c index 141e1e0f15..3b9e3c5a22 100644 --- a/src/language/lexer/scan.c +++ b/src/language/lexer/scan.c @@ -459,9 +459,11 @@ scan_token_to_error (const struct token *token) token->string.string); case SCAN_UNEXPECTED_CHAR: + { char c_name[16]; return xasprintf (_("Bad character %s in input."), uc_name (token->number, c_name)); + } } return NULL;