Added `maybe-uninitialized` warning suppression code.
This commit is contained in:
Takatoshi Kondo 2017-06-12 15:33:05 +09:00
parent 7214b4c73f
commit ffcaaeb482

View File

@ -20,6 +20,10 @@ static void feed_file(msgpack::unpacker& pac, const char* path)
TEST(cases, format)
{
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
msgpack::unpacker pac;
msgpack::unpacker pac_compact;
@ -34,4 +38,7 @@ TEST(cases, format)
}
EXPECT_FALSE( pac_compact.next(oh) );
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif // (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
}