Re: unknown conversion %m

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: unknown conversion %m
Date: 2011-04-28 04:24:10
Message-ID: 4DB8EBEA.8050608@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/28/2011 12:15 AM, Tom Lane wrote:
>
> I'd suggest adjusting the elog.h declarations to use gnu_printf only on
> Windows, and printf elsewhere, for the moment. Maybe we can migrate
> towards using gnu_printf on other platforms later.
>
>

Yeah. In fact, if I adjust most of the format specs to gnu_printf I now
get exactly five warnings on MinGW64 (down from about 600). All the 64
bit int format warnings and their cascaded effects dissolve, along with
the %m warnings.

What I'm thinking of doing is to set up something like:

#define PG_PRINTF_CHECK __printf__

and on Windows redefine it to __gnu_printf__, and then set all the
formats to use PG_PRINTF_CHECK.

Sound OK?

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-04-28 04:30:16 Re: unknown conversion %m
Previous Message Joshua Berkus 2011-04-28 04:18:31 Re: improvements to pgtune