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.
This commit is contained in:
parent
a26267d16d
commit
152511689b
@ -11,6 +11,11 @@
|
||||
|
||||
using namespace rapidjson;
|
||||
|
||||
RAPIDJSON_DIAG_PUSH
|
||||
#if defined(__GNUC__) && __GNUC__ >= 7
|
||||
RAPIDJSON_DIAG_OFF(format-overflow)
|
||||
#endif
|
||||
|
||||
template <typename Allocator>
|
||||
static char* ReadFile(const char* filename, Allocator& allocator) {
|
||||
const char *paths[] = {
|
||||
@ -42,6 +47,8 @@ static char* ReadFile(const char* filename, Allocator& allocator) {
|
||||
return json;
|
||||
}
|
||||
|
||||
RAPIDJSON_DIAG_POP
|
||||
|
||||
class Schema : public PerfTest {
|
||||
public:
|
||||
Schema() {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user