Re: Fix last unitialized memory warning

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Tristan Partin <tristan(at)neon(dot)tech>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fix last unitialized memory warning
Date: 2023-08-09 08:07:08
Message-ID: a88b0adf-9e26-fbbc-805e-6e0da5ae64bf@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yuya Watari 2023-08-09 08:14:56 Re: [PoC] Reducing planning time when tables have many partitions
Previous Message Kyotaro Horiguchi 2023-08-09 08:00:49 Re: Incorrect handling of OOM in WAL replay leading to data loss