diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2023-08-10 16:55:07 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2023-08-10 16:55:07 +0200 |
commit | 5e0c761d0a13c7b4f7c5de618ac38560d74d74d0 (patch) | |
tree | e5a3cbfc15401eea22bce174db3356834bed4f77 /src | |
parent | f25b18500a8405e6b800fb81b1dea2b875867143 (diff) | |
download | postgresql-5e0c761d0a13c7b4f7c5de618ac38560d74d74d0.tar.gz postgresql-5e0c761d0a13c7b4f7c5de618ac38560d74d74d0.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pgbench/pgbench.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 2ba3e367c48..d2b7fc87e44 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -2239,10 +2239,15 @@ evalStandardFunc(CState *st, { /* evaluate all function arguments */ int nargs = 0; - PgBenchValue vargs[MAX_FARGS] = { 0 }; PgBenchExprLink *l = args; bool has_null = false; + /* + * This value is double braced to workaround GCC bug 53119, which seems to + * exist at least on gcc (Debian 4.7.2-5) 4.7.2, 32-bit. + */ + PgBenchValue vargs[MAX_FARGS] = { { 0 } }; + for (nargs = 0; nargs < MAX_FARGS && l != NULL; nargs++, l = l->next) { if (!evaluateExpr(st, l->expr, &vargs[nargs])) |