Commit 15251168 authored by Philipp A Hartmann's avatar Philipp A Hartmann Committed by Philipp A Hartmann

Suppress -Wformat-overflow warning/error

GCC 7 and later warn about overflow/truncation when using
sprintf and related functions with fixed-size buffers.

Suppress the warning in schematest.cpp.
parent a26267d1
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
using namespace rapidjson; using namespace rapidjson;
RAPIDJSON_DIAG_PUSH
#if defined(__GNUC__) && __GNUC__ >= 7
RAPIDJSON_DIAG_OFF(format-overflow)
#endif
template <typename Allocator> template <typename Allocator>
static char* ReadFile(const char* filename, Allocator& allocator) { static char* ReadFile(const char* filename, Allocator& allocator) {
const char *paths[] = { const char *paths[] = {
...@@ -42,6 +47,8 @@ static char* ReadFile(const char* filename, Allocator& allocator) { ...@@ -42,6 +47,8 @@ static char* ReadFile(const char* filename, Allocator& allocator) {
return json; return json;
} }
RAPIDJSON_DIAG_POP
class Schema : public PerfTest { class Schema : public PerfTest {
public: public:
Schema() {} Schema() {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment