Re: minor compiler warning on OpenBSD

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: minor compiler warning on OpenBSD
Date: 2007-07-11 22:26:46
Message-ID: 20070711222646.GF5267@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stefan Kaltenbrunner wrote:
> Tom Lane wrote:
> > Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2007-07-11 23:08:48 Re: doubt
Previous Message Tom Lane 2007-07-11 22:13:21 Re: [GENERAL] Count(*) throws error