summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-09-28 23:42:38 +0200
committerVicent Marti <tanoku@gmail.com>2011-09-28 23:49:55 +0200
commit5888860d2aae70914ec150bfdb82c8d7e0149ebb (patch)
tree5fcf49901dd9ad9db8224f98cd219aee1d02d84e /src
parentd215cf2429ab5a64c0b12b6dae8078626e1d9dc1 (diff)
downloadlibgit2-5888860d2aae70914ec150bfdb82c8d7e0149ebb.tar.gz
msvc: Disable warnings in header file
Remove clutter from the CMakeLists file by disabling the warnings programatically.
Diffstat (limited to 'src')
-rw-r--r--src/win32/msvc-compat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/win32/msvc-compat.h b/src/win32/msvc-compat.h
index 64ed18476..2211de53a 100644
--- a/src/win32/msvc-compat.h
+++ b/src/win32/msvc-compat.h
@@ -9,6 +9,16 @@
#if defined(_MSC_VER)
+/*
+ * Disable silly MSVC warnings
+ */
+
+/* conditional expression is constant */
+#pragma warning(disable: 4127)
+
+/* nonstandard extension used : bit field types other than int */
+#pragma warning(disable: 4214)
+
/* access() mode parameter #defines */
# define F_OK 0 /* existence check */
# define W_OK 2 /* write mode check */