commit 40368ff586dd77b11c035214edefc11e7cc5e6cc
parent edd62c1d8fccfa7b8c8ab21c944a38dc8b7b8deb
Author: Alexey Yerin <yyp@disroot.org>
Date: Tue, 7 Jun 2022 14:12:16 +0300
parse: set name to NULL to prevent -Wsometimes-uninitialized with clang
Fixes harec CI on FreeBSD.
Signed-off-by: Alexey Yerin <yyp@disroot.org>
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/parse.c b/src/parse.c
@@ -2019,14 +2019,12 @@ parse_binding_unpack(struct lexer *lexer, struct ast_binding_unpack **next)
bool more = true;
while (more) {
- char *name;
-
+ char *name = NULL;
switch (lex(lexer, &tok)) {
case T_NAME:
name = tok.name;
break;
case T_UNDERSCORE:
- name = NULL;
break;
default:
synassert(false, &tok, T_NAME, T_UNDERSCORE, T_EOF);