Second try at silencing "unused" warning for strerror_r

This commit is contained in:
Howard Hinnant
2017-02-07 17:28:06 -05:00
parent 6a31edcb38
commit 098223cf6d

10
tz.cpp
View File

@@ -3083,6 +3083,12 @@ current_zone()
#else // !WIN32 #else // !WIN32
#ifdef __GNUC__
// GCC complains about unused return from strerror_r
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-result"
#endif
const time_zone* const time_zone*
current_zone() current_zone()
{ {
@@ -3160,6 +3166,10 @@ current_zone()
throw std::runtime_error("Could not get current timezone"); throw std::runtime_error("Could not get current timezone");
} }
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
#endif // !WIN32 #endif // !WIN32
#if defined(TZ_TEST) && defined(TIMEZONE_MAPPING) #if defined(TZ_TEST) && defined(TIMEZONE_MAPPING)