Re: minor compiler warning on OpenBSD

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: minor compiler warning on OpenBSD
Дата
Msg-id 20070711222646.GF5267@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: minor compiler warning on OpenBSD  (Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>)
Ответы Re: minor compiler warning on OpenBSD
Список pgsql-hackers
Stefan Kaltenbrunner wrote:
> Tom Lane wrote:
> > Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
> >> while looking at some other stuff I noticed that we have the following
> >> compiler warning on OpenBSD 4.0/amd64 with the OS supplied compiler:
> >> initdb.c:2187: warning: `%x' yields only last 2 digits of year in some
> >> locales
> > 
> > Yeah, mine complains about that too.  Peter's response was "get a newer
> > compiler" --- apparently the gcc folks thought better of this warning
> > after the Y2K panic subsided.
> 
> hmm ok - but at least on openbsd we will have to accept that warning for
>  a few years to go (4.1 shipped with 3.3.5 and it seems that the
> upcoming 4.2 is not getting an upgraded compiler either)

My local manpage for strftime says that we can get around this warning
by overloading it with something like

size_t
my_strftime(char *s, size_t max, const char *fmt,    const struct tm *tm)
{return strftime(s, max, fmt, tm);
}


-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Count(*) throws error
Следующее
От: Greg Smith
Дата:
Сообщение: Re: doubt