Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c) - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)
Date
Msg-id 20210411192512.GA20530@telsasoft.com
Whole thread Raw
In response to Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Responses Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
On Sun, Apr 11, 2021 at 03:38:10PM -0300, Ranier Vilela wrote:
> Per Coverity.
> 
> It seems to me that some recent commit has failed to properly initialize a
> structure, in extended_stats.c, when is passed to heap_copytuple.

I think you're right.  You can look in the commit history to find the relevant
commit and copy the committer.

I think it's cleanest to write:
|HeapTupleData tmptup = {0};

-- 
Justin



pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)
Next
From: Zhihong Yu
Date:
Subject: Re: Have I found an interval arithmetic bug?