From ca01ecfb49cae5d2953677bd8aebc82b164bf425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanchon?= Date: Thu, 17 Jul 2014 13:27:40 +0200 Subject: [PATCH] Added a flag to ignore deprecation warnings --- JsonParser/JsonValue.h | 8 +++++--- JsonParserTests/GbathreeBug.cpp | 2 ++ JsonParserTests/JsonArrayTests.cpp | 2 ++ JsonParserTests/JsonHashTableTests.cpp | 2 ++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/JsonParser/JsonValue.h b/JsonParser/JsonValue.h index 4478f25e..c452dd58 100644 --- a/JsonParser/JsonValue.h +++ b/JsonParser/JsonValue.h @@ -6,13 +6,15 @@ #pragma once #include "jsmn.h" - + +#ifndef ARDUINO_JSON_NO_DEPRECATED_WARNING #ifdef __GNUC__ #define DEPRECATED __attribute__((deprecated)) #elif defined(_MSC_VER) #define DEPRECATED __declspec(deprecated) -#else -#define DEPRECATED +#endif +#else +#define DEPRECATED #endif namespace ArduinoJson diff --git a/JsonParserTests/GbathreeBug.cpp b/JsonParserTests/GbathreeBug.cpp index 8499f576..ad31f058 100644 --- a/JsonParserTests/GbathreeBug.cpp +++ b/JsonParserTests/GbathreeBug.cpp @@ -3,6 +3,8 @@ * Benoit Blanchon 2014 - MIT License */ +#define ARDUINO_JSON_NO_DEPRECATED_WARNING + #include "CppUnitTest.h" #include "JsonParser.h" #include diff --git a/JsonParserTests/JsonArrayTests.cpp b/JsonParserTests/JsonArrayTests.cpp index 8ce9878f..589b45dd 100644 --- a/JsonParserTests/JsonArrayTests.cpp +++ b/JsonParserTests/JsonArrayTests.cpp @@ -3,6 +3,8 @@ * Benoit Blanchon 2014 - MIT License */ +#define ARDUINO_JSON_NO_DEPRECATED_WARNING + #include "CppUnitTest.h" #include "JsonParser.h" diff --git a/JsonParserTests/JsonHashTableTests.cpp b/JsonParserTests/JsonHashTableTests.cpp index 95e74c71..7669883f 100644 --- a/JsonParserTests/JsonHashTableTests.cpp +++ b/JsonParserTests/JsonHashTableTests.cpp @@ -2,6 +2,8 @@ * Arduino JSON library * Benoit Blanchon 2014 - MIT License */ + +#define ARDUINO_JSON_NO_DEPRECATED_WARNING #include "CppUnitTest.h" #include "JsonParser.h"