Re: complier warnings from ecpg tests

2019-08-02 Thread Sergei Kornilov
Hi >>  Thanks for the set of flags. So this comes from the use of -Og, and >>  the rest of the tree does not complain. The issue is that gcc >>  complains about the buffer not being large enough, but %d only uses up >>  to 2 characters so there is no overflow. In order to fix the issue it >>  is f

Re: complier warnings from ecpg tests

2019-08-01 Thread Michael Paquier
On Thu, Aug 01, 2019 at 03:14:06PM +0900, Michael Paquier wrote: > Thanks for the set of flags. So this comes from the use of -Og, and > the rest of the tree does not complain. The issue is that gcc > complains about the buffer not being large enough, but %d only uses up > to 2 characters so ther

Re: complier warnings from ecpg tests

2019-07-31 Thread Michael Paquier
On Thu, Jul 11, 2019 at 04:57:08PM +0300, Sergei Kornilov wrote: > I use: ./configure --prefix=somepath --enable-cassert --enable-debug > CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer" --enable-tap-tests > No other explicit options. Thanks for the set of flags. So this comes from the use of -Og,

Re: complier warnings from ecpg tests

2019-07-11 Thread Sergei Kornilov
Hi > Are you using -Wformat-overflow? At which level? I use: ./configure --prefix=somepath --enable-cassert --enable-debug CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer" --enable-tap-tests No other explicit options. pg_config reports: CPPFLAGS = -D_GNU_SOURCE CFLAGS = -Wall -Wmissing-prototype

Re: complier warnings from ecpg tests

2019-07-11 Thread Michael Paquier
On Thu, Jul 11, 2019 at 03:21:15PM +0300, Sergei Kornilov wrote: > I noticed few warnings from my compiler (gcc version 8.3.0 (Debian > 8.3.0-6)) during make check-world: > > They coming from src/interfaces/ecpg tests ( > ./src/interfaces/ecpg/test/sql/array.pgc ). > Seems this code is 4 year old b

complier warnings from ecpg tests

2019-07-11 Thread Sergei Kornilov
Hello I noticed few warnings from my compiler (gcc version 8.3.0 (Debian 8.3.0-6)) during make check-world: array.pgc: In function ‘main’: array.pgc:41:16: warning: ‘%d’ directive writing between 1 and 11 bytes into a region of size 10 [-Wformat-overflow=] sprintf(str, "2000-1-1 0%d:00:00",