2017-03-08 17:33 GMT+01:00 Alvaro Herrera :
> Pavel Stehule wrote:
> > 2017-02-18 18:35 GMT+01:00 Tom Lane :
> >
> > > Pavel Stehule writes:
>
> > > Do the warnings go away if you add some explicit guard to the precision
> > > variable, say like this:
> > >
> > > {
> > >
Pavel Stehule wrote:
> 2017-02-18 18:35 GMT+01:00 Tom Lane :
>
> > Pavel Stehule writes:
> > Do the warnings go away if you add some explicit guard to the precision
> > variable, say like this:
> >
> > {
> > intndig = DBL_DIG + extra_float_digits;
> >
> >
2017-03-08 16:59 GMT+01:00 Peter Eisentraut <
peter.eisentr...@2ndquadrant.com>:
> On 2/18/17 02:08, Pavel Stehule wrote:
> > I am checking new Fedora 26, where new gcc compiler is used.
> >
> > float.c: In function ‘float4out’:
> > float.c:382:41: warning: ‘%.*g’ directive output may be truncated
On 2/18/17 02:08, Pavel Stehule wrote:
> I am checking new Fedora 26, where new gcc compiler is used.
>
> float.c: In function ‘float4out’:
> float.c:382:41: warning: ‘%.*g’ directive output may be truncated
> writing between 1 and 310 bytes into a region of size 65
> [-Wformat-truncation=]
>
2017-02-18 18:35 GMT+01:00 Tom Lane :
> Pavel Stehule writes:
> > float.c:382:5: note: ‘snprintf’ output between 2 and 311 bytes into a
> > destination of size 65
> > float.c:618:5: note: ‘snprintf’ output between 2 and 311 bytes into a
> > destination of size 129
>
> That's kind of annoying. I
Pavel Stehule writes:
> float.c:382:5: note: ‘snprintf’ output between 2 and 311 bytes into a
> destination of size 65
> float.c:618:5: note: ‘snprintf’ output between 2 and 311 bytes into a
> destination of size 129
That's kind of annoying. I suppose the point is that the compiler can't
see wha
Hi
I am checking new Fedora 26, where new gcc compiler is used.
float.c: In function ‘float4out’:
float.c:382:41: warning: ‘%.*g’ directive output may be truncated writing
between 1 and 310 bytes into a region of size 65 [-Wformat-truncation=]
snprintf(ascii, MAXFLOATWIDTH + 1, "%.*g", ndig,