Re: Fixes for compiler warnings

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fixes for compiler warnings
Дата
Msg-id 5689.1232306128@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fixes for compiler warnings  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: Fixes for compiler warnings
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> The really nasty cases are like this:
>> const char *myfmt = gettext_noop("Some bleat about object \"%s\".");
>> ...
>> errmsg(myfmt, objectname)

> It makes sense to me: if you have arguments for the format string then
> presumably you've at some point had to check that the format string has
> escapes for those arguments.

Actually, there was just an issue in the open patch for column
privileges where Stephen had added a format string that failed to match
the arguments that would be supplied.  What'd be really useful is some
way to tie the constants themselves to the errmsg call for error
checking purposes ... can't see a decent way to do it though.

BTW, does the gettext infrastructure make any checks to ensure that
translators didn't bollix the format codes?  It seems like that should
be doable with just a SMOP, but I don't know if it's in there or not.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: libpq WSACleanup is not needed
Следующее
От: Tom Lane
Дата:
Сообщение: Re: libpq WSACleanup is not needed