Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+6-1
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)