Content-Length: 282720 | pFad | http://github.com/postgrespro/postgres/commit/4a8fef0d733965c1a1836022f8a42ab1e83a721f

A6 Fix last remaining uninitialized memory warnings · postgrespro/postgres@4a8fef0 · GitHub
Skip to content

Commit 4a8fef0

Browse files
committed
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
1 parent a72d613 commit 4a8fef0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/bin/pgbench/pgbench.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2239,7 +2239,7 @@ evalStandardFunc(CState *st,
22392239
{
22402240
/* evaluate all function arguments */
22412241
int nargs = 0;
2242-
PgBenchValue vargs[MAX_FARGS];
2242+
PgBenchValue vargs[MAX_FARGS] = { 0 };
22432243
PgBenchExprLink *l = args;
22442244
bool has_null = false;
22452245

src/bin/pgbench/pgbench.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ union YYSTYPE;
3333
*/
3434
typedef enum
3535
{
36-
PGBT_NO_VALUE,
36+
PGBT_NO_VALUE = 0,
3737
PGBT_NULL,
3838
PGBT_INT,
3939
PGBT_DOUBLE,

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/4a8fef0d733965c1a1836022f8a42ab1e83a721f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy