Re: Some architectures need "signed char" declarations

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Some architectures need "signed char" declarations
Дата
Msg-id 14306.1010603756@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Some architectures need "signed char" declarations  (Oliver Elphick <olly@lfix.co.uk>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Does getopt() return "-1", or "EOF", at end?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: again on index usage