From 73417b59c7c8afe32578694e0e9bf05a5f684202 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 24 Aug 2001 07:43:24 +0000 Subject: [PATCH] T. Bharath's patch. It is kind of dirty, as it #pragma aways a whole bunch of compiler warnings, but I guess they make the life somewhat easier to live for a ms dude compiling this. For a rainy day: remove the pragmas and correct the source code that cause the warnings! --- config-win32.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/config-win32.h b/config-win32.h index 28c461ef9..465769296 100644 --- a/config-win32.h +++ b/config-win32.h @@ -101,6 +101,9 @@ /* Define if you have the header file. */ /*#define HAVE_ALLOCA_H 1*/ +/* Define if you have the malloc.h file. */ +#define HAVE_MALLOC_H 1 + /* Define if you have the header file. */ #define HAVE_ARPA_INET_H 1 @@ -185,3 +188,28 @@ #define HAVE_UNISTD_H 1 #endif + +/************************************************** + *This is to eliminate the warnings when compiled * + * using MS VC++ compiler * + **************************************************/ +#ifdef _MSC_VER + +#pragma warning (disable: 4244) /* truncation from 'const int' to 'char' */ +#pragma warning (disable: 4127) /* conditional expression is constant */ +#pragma warning (disable: 4706) /* assignment within conditional expression */ +#pragma warning (disable: 4761) /* integral size mismatch in argument */ +#pragma warning (disable: 4101) /* unreferenced local variable */ +#pragma warning (disable: 4131) /* uses old-style declarator */ +#pragma warning (disable: 4057) /* const char *' differs in indirection to + slightly different base types from + 'unsigned char [x] */ +#pragma warning (disable: 4100) /* unreferenced formal parameter */ +#pragma warning (disable: 4055) /* type cast' : from data pointer 'void *' to + function pointer + 'void *(__cdecl *)(char *,int ) */ +#pragma warning (disable: 4701) /* local variable may be used without having + been initialized */ +#pragma warning (disable: 4715) /* ToHour' : not all control paths return a + value */ +#endif