Re: Debian 12 gcc warning - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Debian 12 gcc warning
Date
Msg-id ZO1DNWNSu/bSUCHv@momjian.us
Whole thread Raw
In response to Re: Debian 12 gcc warning  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Mon, Aug 28, 2023 at 07:10:38PM -0400, Bruce Momjian wrote:
> On Tue, Aug 29, 2023 at 07:30:15AM +0900, Michael Paquier wrote:
> > On Mon, Aug 28, 2023 at 03:37:20PM -0400, Bruce Momjian wrote:
> > > I don't see a clean way of avoiding the warning except by initializing
> > > the array, which seems wasteful.
> > 
> > Or just initialize the array with a {0}?
> 
> Uh, doesn't that set all elements to zero?  See:
> 
>     https://stackoverflow.com/questions/2589749/how-to-initialize-array-to-0-in-c

FYI, that does stop the warning.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.



pgsql-hackers by date:

Previous
From: Jimmy Yih
Date:
Subject: Re: Should the archiver process always make sure that the timeline history files exist in the archive?
Next
From: Tatsuo Ishii
Date:
Subject: Re: Wrong usage of pqMsg_Close message code?