Re: pgsql: Fix last remaining uninitialized memory warnings

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix last remaining uninitialized memory warnings
Date: 2023-08-10 00:30:25
Message-ID: CAHut+PutWAqecinVS-Qsi=SWpD8ApjexYg+peMQ3EyCFViV-9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

FYI - When building the latest HEAD I noticed some compiler warnings
that seem related to this change

pgbench.c: In function ‘evalStandardFunc’:
pgbench.c:2242:2: warning: missing braces around initializer [-Wmissing-braces]
PgBenchValue vargs[MAX_FARGS] = { 0 };
^
pgbench.c:2242:2: warning: (near initialization for ‘vargs[0]’)
[-Wmissing-braces]

------
Kind Regards,
Peter Smith.
Fujitsu Australia

On Wed, Aug 9, 2023 at 6:05 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> 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(at)neon(dot)tech>
> Discussion: https://www.postgresql.org/message-id/flat/CT6HJ3U8068R(dot)3A8SJMV02D9BC(at)gonk
>
> Branch
> ------
> master
>
> Details
> -------
> https://git.postgresql.org/pg/commitdiff/4a8fef0d733965c1a1836022f8a42ab1e83a721f
>
> Modified Files
> --------------
> src/bin/pgbench/pgbench.c | 2 +-
> src/bin/pgbench/pgbench.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2023-08-10 00:38:06 pgsql: doc: PG 16 relnotes, small wording improvement
Previous Message Jeff Davis 2023-08-09 23:12:15 Re: pgsql: Recalculate search_path after ALTER ROLE.