Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>
Subject: Re: Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)
Date: 2021-04-11 19:25:12
Message-ID: 20210411192512.GA20530@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhihong Yu 2021-04-11 19:57:32 Re: Have I found an interval arithmetic bug?
Previous Message Ranier Vilela 2021-04-11 18:38:10 Uninitialized scalar variable (UNINIT) (src/backend/statistics/extended_stats.c)