mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-04 21:24:26 +02:00
Second try at silencing "unused" warning for strerror_r
This commit is contained in:
10
tz.cpp
10
tz.cpp
@@ -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)
|
||||||
|
Reference in New Issue
Block a user