diff options
author | Darkvater <Darkvater@openttd.org> | 2005-11-26 12:57:42 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2005-11-26 12:57:42 +0000 |
commit | 43b09db5edd1eedf91a71952bb99bec727f815fa (patch) | |
tree | 70ff31422b33d818ffb0291281d2327d83291d64 | |
parent | af706b9ed34f2a365f292af0628df1dabcae8459 (diff) | |
download | openttd-43b09db5edd1eedf91a71952bb99bec727f815fa.tar.xz |
(svn r3236) - Fix: warnings about 'CDECL must be used with ...' on VS6
-rw-r--r-- | ai/ai_event.h | 4 | ||||
-rw-r--r-- | saveload.c | 9 | ||||
-rw-r--r-- | stdafx.h | 8 |
3 files changed, 11 insertions, 10 deletions
diff --git a/ai/ai_event.h b/ai/ai_event.h index 7f96f71b8..1f49f338b 100644 --- a/ai/ai_event.h +++ b/ai/ai_event.h @@ -20,9 +20,9 @@ * Ugly, I know, but it works! */ # ifdef DEF_EVENTS - void empty_function(PlayerID player, int event, ...) {} + void CDECL empty_function(PlayerID player, int event, ...) {} # else - extern void empty_function(PlayerID player, int event, ...); + extern void CDECL empty_function(PlayerID player, int event, ...); # endif # define ai_event empty_function diff --git a/saveload.c b/saveload.c index dc7485eac..8cfc878bb 100644 --- a/saveload.c +++ b/saveload.c @@ -953,15 +953,8 @@ static void WriteMem(uint size) //******************************************** #if defined(WITH_ZLIB) - -// This is needed to zlib uses the stdcall calling convention on visual studio -#ifdef _MSC_VER -# ifndef ZLIB_WINAPI -# define ZLIB_WINAPI -# endif -#endif - #include <zlib.h> + static z_stream _z; static bool InitReadZlib(void) @@ -142,6 +142,14 @@ # undef TTD_ALIGNMENT_4 # undef TTD_ALIGNMENT_2 # define GCC_PACK + +// This is needed to zlib uses the stdcall calling convention on visual studio, also used with libpng (VS6 warning) +# if defined(WITH_ZLIB) || defined(WITH_PNG) +# ifndef ZLIB_WINAPI +# define ZLIB_WINAPI +# endif +# endif + #endif /* defined(_MSC_VER) */ |