lint: add missing assignment to $$ in grammar

Byacc and Bison both provide this assignment for all actions, whether
default or not, but the wording in POSIX doesn't guarantee this.
This commit is contained in:
rillig 2024-03-27 21:14:09 +00:00
parent 8910413e27
commit 30c6c279e2
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
%{
/* $NetBSD: cgram.y,v 1.491 2024/03/09 13:54:47 rillig Exp $ */
/* $NetBSD: cgram.y,v 1.492 2024/03/27 21:14:09 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID)
__RCSID("$NetBSD: cgram.y,v 1.491 2024/03/09 13:54:47 rillig Exp $");
__RCSID("$NetBSD: cgram.y,v 1.492 2024/03/27 21:14:09 rillig Exp $");
#endif
#include <limits.h>
@ -651,6 +651,7 @@ argument_expression_list:
add_function_argument($$, $1);
}
| argument_expression_list T_COMMA assignment_expression {
$$ = $1;
add_function_argument($1, $3);
}
;