]> granicus.if.org Git - git/commitdiff
msvc: add pragmas for common warnings
authorPhilip Oakley <philipoakley@iee.org>
Tue, 25 Jun 2019 14:49:40 +0000 (07:49 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Jun 2019 17:46:57 +0000 (10:46 -0700)
MSVC can be overzealous about some warnings. Disable them.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/msvc.h

index d7525cf61dabf66d4c9e42cc33bda4346720f61d..1d7a8c614565a6088f92f7c06d79210476ce505e 100644 (file)
@@ -6,6 +6,10 @@
 #include <malloc.h>
 #include <io.h>
 
+#pragma warning(disable: 4018) /* signed/unsigned comparison */
+#pragma warning(disable: 4244) /* type conversion, possible loss of data */
+#pragma warning(disable: 4090) /* 'function' : different 'const' qualifiers (ALLOC_GROW etc.)*/
+
 /* porting function */
 #define inline __inline
 #define __inline__ __inline