Re: [HACKERS] new gcc 7.0.1 warnings - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [HACKERS] new gcc 7.0.1 warnings
Date
Msg-id 20170308163358.omws55zq2xr4lrfw@alvherre.pgsql
Whole thread Raw
In response to Re: [HACKERS] new gcc 7.0.1 warnings  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] new gcc 7.0.1 warnings  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Pavel Stehule wrote:
> 2017-02-18 18:35 GMT+01:00 Tom Lane <tgl@sss.pgh.pa.us>:
> 
> > Pavel Stehule <pavel.stehule@gmail.com> writes:

> > Do the warnings go away if you add some explicit guard to the precision
> > variable, say like this:
> >
> >             {
> >                 int            ndig = DBL_DIG + extra_float_digits;
> >
> >                 if (ndig < 1)
> >                     ndig = 1;
> > +               if (ndig > 50)
> > +                   ndig = 50;
> 
> This fix doesn't help

Ahh, so this is why you had this change in the xmltable patch once!
Heh.  Please be more careful.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] patch: function xmltable
Next
From: Andreas Karlsson
Date:
Subject: Re: [HACKERS] adding an immutable variant of to_date