Merge pull request #316 from libtom/more-msvc-warning-free Attempt to eliminate more MSVC compiler warnings
diff --git a/bn_s_mp_rand_platform.c b/bn_s_mp_rand_platform.c
index 63262ce..1349b7c 100644
--- a/bn_s_mp_rand_platform.c
+++ b/bn_s_mp_rand_platform.c
@@ -22,9 +22,16 @@
#define ARM
#endif
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning (disable : 4668)
+#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <wincrypt.h>
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
static mp_err s_read_win_csp(void *p, size_t n)
{
diff --git a/makefile.msvc b/makefile.msvc
index 03ef8b8..c7dabcf 100644
--- a/makefile.msvc
+++ b/makefile.msvc
@@ -14,7 +14,7 @@ PREFIX = c:\devel
CFLAGS = /Ox
#Compilation flags
-LTM_CFLAGS = /nologo /I./ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D__STDC_WANT_SECURE_LIB__=0 /Wall /wd4146 /wd4127 /wd4710 /wd4711 /wd4820 $(CFLAGS)
+LTM_CFLAGS = /nologo /I./ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D__STDC_WANT_SECURE_LIB__=1 /D_CRT_HAS_CXX17=0 /Wall /wd4146 /wd4127 /wd4710 /wd4711 /wd4820 /WX $(CFLAGS)
LTM_LDFLAGS = advapi32.lib
#Libraries to be created (this makefile builds only static libraries)