summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorPhilip Oakley <philipoakley@iee.org>2019-06-25 07:49:40 -0700
committerJunio C Hamano <gitster@pobox.com>2019-06-25 10:46:57 -0700
commitb7bd9a73381df1dcc3c408a8f4379cb6f1db6785 (patch)
tree3f18ded8c59fa73f3a9047617e069c3d4d18f018 /compat
parent556702f86cb043f18bf46dceec25fe1e783c4590 (diff)
downloadgit-b7bd9a73381df1dcc3c408a8f4379cb6f1db6785.tar.gz
msvc: add pragmas for common warnings
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>
Diffstat (limited to 'compat')
-rw-r--r--compat/msvc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compat/msvc.h b/compat/msvc.h
index d7525cf61d..1d7a8c6145 100644
--- a/compat/msvc.h
+++ b/compat/msvc.h
@@ -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