diff options
author | Peter Eisentraut | 2023-08-09 08:00:50 +0000 |
---|---|---|
committer | Peter Eisentraut | 2023-08-09 08:00:50 +0000 |
commit | 4a8fef0d733965c1a1836022f8a42ab1e83a721f (patch) | |
tree | b687033d5f273325a0da814b569c29d797b0eb67 | |
parent | a72d613b4c91462d9405c4e1b05c42d33013c333 (diff) |
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 <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/CT6HJ3U8068R.3A8SJMV02D9BC@gonk
-rw-r--r-- | src/bin/pgbench/pgbench.c | 2 | ||||
-rw-r--r-- | src/bin/pgbench/pgbench.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 539c2795e29..2ba3e367c48 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -2239,7 +2239,7 @@ evalStandardFunc(CState *st, { /* evaluate all function arguments */ int nargs = 0; - PgBenchValue vargs[MAX_FARGS]; + PgBenchValue vargs[MAX_FARGS] = { 0 }; PgBenchExprLink *l = args; bool has_null = false; diff --git a/src/bin/pgbench/pgbench.h b/src/bin/pgbench/pgbench.h index 957c9ca9dad..f8efa4b868a 100644 --- a/src/bin/pgbench/pgbench.h +++ b/src/bin/pgbench/pgbench.h @@ -33,7 +33,7 @@ union YYSTYPE; */ typedef enum { - PGBT_NO_VALUE, + PGBT_NO_VALUE = 0, PGBT_NULL, PGBT_INT, PGBT_DOUBLE, |