Re: Some architectures need "signed char" declarations - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Some architectures need "signed char" declarations
Date
Msg-id 14306.1010603756@sss.pgh.pa.us
Whole thread Raw
In response to Some architectures need "signed char" declarations  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-hackers
Oliver Elphick <olly@lfix.co.uk> writes:
> I recently got a Debian bug report about 3 architectures where char is
> unsigned by default.  There were 2 locations identified in the code
> where a char is compared with a negative value, and should therefore be
> declared as a "signed char".  There may be others in 7.2, but I don't
> myself have access to a suitable machine for testing.

> The locations I am aware of are:

>     src/backend/libpq/hba.c    GetCharSetByHost(): if (c =3D=3D EOF)
>     src/backend/utils/init/miscinit.c  SetCharSet(): if (c =3D=3D EOF)

Fix committed.  I looked at every use of "EOF" in the distribution, and
those two are the only ones I could find that were wrong.  I did also
find a place where the result of "getopt" was incorrectly stored in a
"char".
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Does getopt() return "-1", or "EOF", at end?
Next
From: Tom Lane
Date:
Subject: Re: again on index usage