mdbx-tools: hush MSVC's internal warnings.

Change-Id: I2b2bdb149149aa8bafff0bb7df205547f645fe10
This commit is contained in:
Leo Yuriev 2017-07-21 22:45:42 +03:00
parent f96bb5ef4a
commit 425254aba5
2 changed files with 24 additions and 0 deletions

View File

@ -20,6 +20,8 @@ src/tools/mdbx_load.1
src/tools/mdbx_load.c
src/tools/mdbx_stat.1
src/tools/mdbx_stat.c
src/tools/wingetopt.c
src/tools/wingetopt.h
src/version.c
test/actor.cc
test/base.h

View File

@ -6,10 +6,32 @@
* Code given out at the 1985 UNIFORUM conference in Dallas.
*/
/*----------------------------------------------------------------------------*/
/* Microsoft compiler generates a lot of warning for self includes... */
#ifdef _MSC_VER
#pragma warning(push, 1)
#pragma warning(disable : 4548) /* expression before comma has no effect; \
expected expression with side - effect */
#pragma warning(disable : 4530) /* C++ exception handler used, but unwind \
* semantics are not enabled. Specify /EHsc */
#pragma warning(disable : 4577) /* 'noexcept' used with no exception handling \
* mode specified; termination on exception is \
* not guaranteed. Specify /EHsc */
#if !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS
#endif
#endif /* _MSC_VER (warnings) */
#include "wingetopt.h"
#include <stdio.h>
#include <string.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
/*----------------------------------------------------------------------------*/
#ifndef NULL
#define NULL 0
#endif