Skip to content

Commit 5e0c761

Browse files
committed
Fix erroneous -Werror=missing-braces on old GCC
The buildfarm reports that this is an error on gcc (Debian 4.7.2-5) 4.7.2, 32-bit. The bug seems to be GCC bug 53119, which has obviously been fixed for years. Author: Tristan Partin <tristan@neon.tech> Discussion: https://www.postgresql.org/message-id/flat/CT6HJ3U8068R.3A8SJMV02D9BC@gonk
1 parent f25b185 commit 5e0c761

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bin/pgbench/pgbench.c

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

2245+
/*
2246+
* This value is double braced to workaround GCC bug 53119, which seems to
2247+
* exist at least on gcc (Debian 4.7.2-5) 4.7.2, 32-bit.
2248+
*/
2249+
PgBenchValue vargs[MAX_FARGS] = { { 0 } };
2250+
22462251
for (nargs = 0; nargs < MAX_FARGS && l != NULL; nargs++, l = l->next)
22472252
{
22482253
if (!evaluateExpr(st, l->expr, &vargs[nargs]))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy