Skip to content

Commit 90591c7

Browse files
committed
Suppress GCC deprecated-declarations warning for tests
1 parent 4cfae89 commit 90591c7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/jsontestrunner/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// recognized in your jurisdiction.
44
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
55

6+
#pragma GCC diagnostic push
7+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
8+
69
/* This executable is used for testing parser/writer using real JSON files.
710
*/
811

@@ -324,3 +327,5 @@ int main(int argc, const char* argv[]) {
324327
return 1;
325328
}
326329
}
330+
331+
#pragma GCC diagnostic pop

src/test_lib_json/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// recognized in your jurisdiction.
44
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
55

6+
#pragma GCC diagnostic push
7+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
8+
69
#include "jsontest.h"
710
#include <json/config.h>
811
#include <json/json.h>
@@ -2587,3 +2590,5 @@ int main(int argc, const char* argv[]) {
25872590

25882591
return runner.runCommandLine(argc, argv);
25892592
}
2593+
2594+
#pragma GCC diagnostic pop

0 commit comments

Comments
 (0)