ext/rj_schema/rapidjson/test/perftest/schematest.cpp in rj_schema-0.1.4 vs ext/rj_schema/rapidjson/test/perftest/schematest.cpp in rj_schema-0.2.0
- old
+ new
@@ -9,10 +9,15 @@
#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
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[] = {
"",
"bin/",
@@ -39,9 +44,11 @@
size_t readLength = fread(json, 1, length, fp);
json[readLength] = '\0';
fclose(fp);
return json;
}
+
+RAPIDJSON_DIAG_POP
class Schema : public PerfTest {
public:
Schema() {}