Re: Fix last unitialized memory warning - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Fix last unitialized memory warning
Date
Msg-id 7ae6b2ac-b7e4-8a19-9421-2c6e7add0188@eisentraut.org
Whole thread Raw
In response to Re: Fix last unitialized memory warning  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Fix last unitialized memory warning
List pgsql-hackers
On 09.08.23 10:07, Peter Eisentraut wrote:
> 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

This patch has apparently upset one buildfarm member with a very old 
compiler: 
https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=lapwing&br=HEAD

Any thoughts?




pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: [BackendXidGetPid] only access allProcs when xid matches
Next
From: Junwang Zhao
Date:
Subject: Re: [BackendXidGetPid] only access allProcs when xid matches