[HACKERS] new gcc 7.0.1 warnings
От | Pavel Stehule |
---|---|
Тема | [HACKERS] new gcc 7.0.1 warnings |
Дата | |
Msg-id | CAFj8pRA=xV0_-aDF5UtGVY8HGvg+ovA_js_P8z4jLHxvX0Wa=A@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: [HACKERS] new gcc 7.0.1 warnings
Re: [HACKERS] new gcc 7.0.1 warnings |
Список | pgsql-hackers |
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, num);
^~~~
float.c:382:5: note: ‘snprintf’ output between 2 and 311 bytes into a destination of size 65
snprintf(ascii, MAXFLOATWIDTH + 1, "%.*g", ndig, num);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
float.c: In function ‘float8out_internal’:
float.c:618:42: warning: ‘%.*g’ directive output may be truncated writing between 1 and 310 bytes into a region of size 129 [-Wformat-truncation=]
snprintf(ascii, MAXDOUBLEWIDTH + 1, "%.*g", ndig, num);
^~~~
float.c:618:5: note: ‘snprintf’ output between 2 and 311 bytes into a destination of size 129
snprintf(ascii, MAXDOUBLEWIDTH + 1, "%.*g", ndig, num);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Regards
Pavel
В списке pgsql-hackers по дате отправления: