From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
Cc: | ranier_gyn(at)hotmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: [BUG FIX] Uninitialized var fargtypes used. |
Date: | 2019-11-12 08:46:49 |
Message-ID: | 20191112084649.GN1549@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Nov 12, 2019 at 03:27:35PM +0900, Kyotaro Horiguchi wrote:
> At Tue, 12 Nov 2019 12:31:41 +0900, Michael Paquier <michael(at)paquier(dot)xyz> wrote in
> > On Mon, Nov 11, 2019 at 06:28:47PM +0000, Ranier Vilela wrote:
> > > Can anyone check this bug fix?
> > >
> > > +++ event_trigger.c Mon Nov 11 13:52:35 2019
> > > @@ -171,7 +171,7 @@
> > > HeapTuple tuple;
> > > Oid funcoid;
> > > Oid funcrettype;
> > > - Oid fargtypes[1]; /* dummy */
> > > + Oid fargtypes[1] = {InvalidOid, InvalidOid}; /* dummy */
> > > Oid evtowner = GetUserId();
> >
> > Yeah, it would be better to fix this initialization.
>
> Agreed, but compiler should complain since the initializer is too
> long. And I found at least five other instances of the same. Or there
> might be similar cases.
Would you like to write a patch with everything you found? I have
commented on a rather similar topic about the style of the
initialization close to here:
https://www.postgresql.org/message-id/3378.1571684676@sss.pgh.pa.us
However, if it comes to InvalidOid and if we are talking about only
one element, I think that we should just assign the value without
memset.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2019-11-12 08:47:47 | Re: Monitoring disk space from within the server |
Previous Message | Thomas Munro | 2019-11-12 08:39:17 | Re: BUG #16108: Colorization to the output of command-line has unproperly behaviors at Windows platform |