ECPG buglet?

Lists: pgsql-hackers
From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ECPG buglet?
Date: 2007-01-25 12:23:57
Message-ID: 20070125122357.GB27011@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Looking at the VC warnings, I find that in ECPGDynamicType()
(typename.c in ecpglib), the default branch of the case statement
returns "-type". But the function returns "unsigned int", so returning a
negative value seems very strange to me.

At least it throws a warning in VC++.

//Magnus


From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ECPG buglet?
Date: 2007-01-25 16:26:12
Message-ID: 20070125162612.GB8956@feivel.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Jan 25, 2007 at 01:23:57PM +0100, Magnus Hagander wrote:
> Looking at the VC warnings, I find that in ECPGDynamicType()
> (typename.c in ecpglib), the default branch of the case statement
> returns "-type". But the function returns "unsigned int", so returning a
> negative value seems very strange to me.

And I see no reason at all why this function is unsigned. After all
there are about 20 different return values. Will change it.

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!