On 04/28/2011 12:30 AM, Tom Lane wrote:
> Andrew Dunstan<andrew@dunslane.net> writes:
>> 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?
> +1 ... those __attribute__ declarations are messy enough already
> without wrapping #ifdefs around them. (Don't want to find out
> what pgindent would do with that ...)
>
> Possibly PG_PRINTF_ATTRIBUTE would be a better name, but he who
> does the work gets to pick.
Done with that name. FYI, here is the complete set of warnings now
generated on pitta:
scan.c:16256:23: warning: unused variable 'yyg'
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.3240/../pgsql/src/backend/port/win32/mingwcompat.c:60:1: warning:
'RegisterWaitForSingleObject'redeclared without dllimport attribute: previous dllimport ignored
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.3240/../pgsql/src/backend/postmaster/postmaster.c:3305:2: warning:
format'%d' expects type 'int', but argument 3 has type 'pgsocket'
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.3240/../pgsql/src/backend/postmaster/postmaster.c:4810:4: warning:
format'%d' expects type 'int', but argument 2 has type 'SOCKET'
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.3240/../pgsql/src/backend/postmaster/syslogger.c:636:3: warning:
format'%ld' expects type 'long int', but argument 4 has type 'intptr_t'
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.3240/../pgsql/src/interfaces/ecpg/pgtypeslib/timestamp.c:505:6:
warning:unknown conversion type character 'G' in format
c:/mingw/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.3240/../pgsql/src/interfaces/ecpg/pgtypeslib/timestamp.c:685:6:
warning:unknown conversion type character 'V' in format
cheers
andrew