Re: [HACKERS] windows consolidated cleanup

2011-04-24 Thread Andrew Chernow
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

Re: [HACKERS] windows consolidated cleanup

2011-04-24 Thread Peter Eisentraut
On sön, 2011-04-24 at 01:29 -0400, Andrew Dunstan wrote: 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.

Re: [HACKERS] windows consolidated cleanup

2011-04-24 Thread Peter Eisentraut
The hunk below looks a bit evil. At least a comment would be good to explain why this is necessary. On sön, 2011-04-24 at 01:29 -0400, Andrew Dunstan wrote: *** a/src/backend/port/win32/socket.c --- b/src/backend/port/win32/socket.c *** *** 370,376 pgwin32_recv(SOCKET s,

Re: [HACKERS] windows consolidated cleanup

2011-04-24 Thread Andrew Dunstan
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

Re: [HACKERS] windows consolidated cleanup

2011-04-24 Thread Andrew Dunstan
On 04/24/2011 10:53 AM, Peter Eisentraut wrote: On sön, 2011-04-24 at 01:29 -0400, Andrew Dunstan wrote: 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

Re: [HACKERS] windows consolidated cleanup

2011-04-24 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: The hunk below looks a bit evil. At least a comment would be good to explain why this is necessary. Yeah, having to cast away const seems uglier than the original problem. Can't we avoid that? BTW, all of my machines as well as the Single Unix Spec are

Re: [HACKERS] windows consolidated cleanup

2011-04-24 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: 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. BTW, this hunk: *** a/src/pl/plpython/plpython.c ---

Re: [HACKERS] windows consolidated cleanup

2011-04-24 Thread Andrew Dunstan
On 04/24/2011 12:25 PM, Tom Lane wrote: Andrew Dunstanand...@dunslane.net writes: 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. BTW, this hunk:

Re: [HACKERS] windows consolidated cleanup

2011-04-24 Thread Andrew Dunstan
On 04/24/2011 12:14 PM, Tom Lane wrote: Peter Eisentrautpete...@gmx.net writes: The hunk below looks a bit evil. At least a comment would be good to explain why this is necessary. Yeah, having to cast away const seems uglier than the original problem. Can't we avoid that? I'm not sure

Re: [HACKERS] windows consolidated cleanup

2011-04-24 Thread Andrew Dunstan
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

Re: [HACKERS] windows consolidated cleanup

2011-04-24 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 04/24/2011 09:11 AM, Andrew Chernow wrote: 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

Re: [HACKERS] windows consolidated cleanup

2011-04-24 Thread Peter Eisentraut
On sön, 2011-04-24 at 12:25 -0400, Tom Lane wrote: This file is in fundamental violation of the first commandment of Postgres #includes, which is thou shalt have no other gods before c.h. We need to put postgres.h *before* the Python.h include. I don't know what issues led to the current

[HACKERS] windows consolidated cleanup

2011-04-23 Thread Andrew Dunstan
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