Skip to content

Commit

Permalink
Ignore "array out of bounds" warning in nlohmann-json
Browse files Browse the repository at this point in the history
These are false positives (see
nlohmann/json#3808), and really clutter up the
output during a build.
  • Loading branch information
cspiegel committed Dec 29, 2024
1 parent e0414fb commit 1734a95
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion garglk/theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,18 @@
#endif

#include "format.h"
#include "optional.hpp"

#define JSON_DIAGNOSTICS 1
#ifdef __GNUC__
// Ignore false positives (see https://github.com/nlohmann/json/issues/3808)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#include "json.hpp"
#include "optional.hpp"
#pragma GCC diagnostic pop
#else
#include "json.hpp"
#endif

#include "garglk.h"

Expand Down

0 comments on commit 1734a95

Please sign in to comment.