Fix last remaining uninitialized memory warnings

gcc (version 13) fails to properly analyze the code due to the loop
stop condition including `l != NULL`. Let's just help it out.

Author: Tristan Partin <tristan@neon.tech>
Discussion: https://www.postgresql.org/message-id/flat/CT6HJ3U8068R.3A8SJMV02D9BC@gonk
This commit is contained in:
Peter Eisentraut 2023-08-09 10:00:50 +02:00
parent a72d613b4c
commit 4a8fef0d73
2 changed files with 2 additions and 2 deletions

View File

@ -2239,7 +2239,7 @@ evalStandardFunc(CState *st,
{ {
/* evaluate all function arguments */ /* evaluate all function arguments */
int nargs = 0; int nargs = 0;
PgBenchValue vargs[MAX_FARGS]; PgBenchValue vargs[MAX_FARGS] = { 0 };
PgBenchExprLink *l = args; PgBenchExprLink *l = args;
bool has_null = false; bool has_null = false;

View File

@ -33,7 +33,7 @@ union YYSTYPE;
*/ */
typedef enum typedef enum
{ {
PGBT_NO_VALUE, PGBT_NO_VALUE = 0,
PGBT_NULL, PGBT_NULL,
PGBT_INT, PGBT_INT,
PGBT_DOUBLE, PGBT_DOUBLE,