Re: windows consolidated cleanup
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Andrew Chernow <ac@esilo.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-04-24T15:10:56Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Move include for Python.h above postgres.h to eliminate compiler warning.
- ab6ee1f9fc70 8.0.0 cited
On 04/24/2011 09:11 AM, Andrew Chernow wrote: > On 4/24/2011 1:29 AM, Andrew Dunstan wrote: >> >> The attached patch is intended to clean up a bunch of compiler >> warnings seen on >> Windows due to mismatches of signedness or constness, unused variables, >> redefined macros and a missing prototype. >> >> It doesn't clean up all the warnings by any means, but it fixes quite >> a few. >> >> One thing I'm a bit confused about is this type of warning: >> >> src\backend\utils\misc\guc-file.c(977): warning C4003: not enough actual >> parameters for macro 'GUC_yywrap' >> >> >> If someone can suggest a good fix That would be nice. >> > > The macro is defined as taking one argument. > > // guc-file.c line 354 > #define GUC_yywrap(n) 1 > > The macro is overriding the prototype declared at line 627, which has > a void argument list (assuming YY_SKIP_YYWRAP is !defined). Since all > code references to this do not provide an argument, I'd say the macro > is incorrect. Thanks for looking. All our scanners are in fact defined with "%option noyywrap", so YY_SKIP_WRAP is defined. But the macro is incorrect unless you're generating a reentrant scanner as we are for the core scanner (which is why we don't see this error for the core scanner, only all the others). I have a mildly ugly fix for it in pg_flex.bat (only MSVC compilers complain about it AFAIK). cheers andrew