Skip to content

Commit 4d30bad

Browse files
committed
[ESI][Runtime] Disable warnings from json library
The nlohmann JSON library emits a ton of covered switch warnings. Use '#pragma' to suppress them.
1 parent 24ad90a commit 4d30bad

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/Dialect/ESI/runtime/cpp/lib/Manifest.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
#include "esi/Accelerator.h"
1717
#include "esi/Services.h"
1818

19+
#pragma GCC diagnostic push
20+
#pragma GCC diagnostic ignored "-Wcovered-switch-default"
1921
#include <nlohmann/json.hpp>
22+
#pragma GCC diagnostic pop
2023
#include <sstream>
2124

2225
using namespace ::esi;

lib/Dialect/ESI/runtime/cpp/tools/esiquery.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
#include <algorithm>
2222
#include <iostream>
2323
#include <map>
24+
#pragma GCC diagnostic push
25+
#pragma GCC diagnostic ignored "-Wcovered-switch-default"
2426
#include <nlohmann/json.hpp>
27+
#pragma GCC diagnostic pop
2528
#include <stdexcept>
2629
#include <string>
2730

0 commit comments

Comments
 (0)