MSVC warning fixes in tests

- only use "#pragma GCC" on GCC-compatible compilers
- suppress deprecation warnings also on MSVC
This commit is contained in:
Marcel Raad
2017-11-10 10:58:43 +01:00
parent d61cddedac
commit 240c85a10c
2 changed files with 12 additions and 4 deletions

View File

@@ -3,8 +3,12 @@
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#elif defined(_MSC_VER)
#pragma warning(disable : 4996)
#endif
#include "jsontest.h"
#include <json/config.h>
@@ -2591,4 +2595,6 @@ int main(int argc, const char* argv[]) {
return runner.runCommandLine(argc, argv);
}
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif