Re: Fix last unitialized memory warning
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Tristan Partin <tristan@neon.tech>, pgsql-hackers@postgresql.org
Date: 2023-08-09T08:07:08Z
Lists: pgsql-hackers
On 08.08.23 17:14, Tristan Partin wrote:
>> I was able to reproduce the warning now on Fedora. I agree with the
>> patch
>>
>> - PgBenchValue vargs[MAX_FARGS];
>> + PgBenchValue vargs[MAX_FARGS] = { 0 };
>>
>> I suggest to also do
>>
>> typedef enum
>> {
>> - PGBT_NO_VALUE,
>> + PGBT_NO_VALUE = 0,
>>
>> to make clear that the initialization value is meant to be invalid.
>>
>> I also got the plpgsql warning that you showed earlier, but I couldn't
>> think of a reasonable way to fix that.
>
> Applied in v2.
committed
Commits
-
Fix erroneous -Werror=missing-braces on old GCC
- 5e0c761d0a13 17.0 landed
-
Fix last remaining uninitialized memory warnings
- 4a8fef0d7339 17.0 landed