Thread: ECPG warning

ECPG warning

From
Peter Eisentraut
Date:
I'm getting a warning:

gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -Wcast-align
-Wpointer-arith  -fpic -I../../../../src/interfaces/ecpg/include
-I../../../../src/interfaces/libpq -I../../../../src/include   -c -o
data.o data.c
data.c: In function `ECPGget_data':
data.c:96: warning: `res' might be used uninitialized in this function

The code looks pretty suspicious, 'res' and 'ures' might be getting mixed
up.  Check please.

-- 
Peter Eisentraut   peter_e@gmx.net



Re: ECPG warning

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> The code looks pretty suspicious, 'res' and 'ures' might be getting mixed
> up.  Check please.

Clearly a copy-and-paste bug.  I committed a fix an hour or so ago.
        regards, tom lane