summaryrefslogtreecommitdiff
path: root/compat/msvc.h
diff options
context:
space:
mode:
authorPhilip Oakley <philipoakley@iee.org>2019-06-25 14:49:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-25 17:46:57 (GMT)
commitb7bd9a73381df1dcc3c408a8f4379cb6f1db6785 (patch)
tree3f18ded8c59fa73f3a9047617e069c3d4d18f018 /compat/msvc.h
parent556702f86cb043f18bf46dceec25fe1e783c4590 (diff)
downloadgit-b7bd9a73381df1dcc3c408a8f4379cb6f1db6785.zip
git-b7bd9a73381df1dcc3c408a8f4379cb6f1db6785.tar.gz
git-b7bd9a73381df1dcc3c408a8f4379cb6f1db6785.tar.bz2
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/msvc.h')
-rw-r--r--compat/msvc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compat/msvc.h b/compat/msvc.h
index d7525cf..1d7a8c6 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