Disable MSVC function deprecation when using Clang

This commit is contained in:
Loo Rong Jie
2018-07-13 21:23:28 +08:00
parent b4d4438df9
commit 3a8d744030
4 changed files with 24 additions and 8 deletions

View File

@@ -444,10 +444,10 @@ class FormatEpochTimeInMillisAsIso8601Test : public Test {
virtual void SetUp() {
saved_tz_ = NULL;
GTEST_DISABLE_MSC_WARNINGS_PUSH_(4996 /* getenv, strdup: deprecated */)
GTEST_DISABLE_MSC_DEPRECATED_PUSH_(/* getenv, strdup: deprecated */)
if (getenv("TZ"))
saved_tz_ = strdup(getenv("TZ"));
GTEST_DISABLE_MSC_WARNINGS_POP_()
GTEST_DISABLE_MSC_DEPRECATED_POP_()
// Set up the time zone for FormatEpochTimeInMillisAsIso8601 to use. We
// cannot use the local time zone because the function's output depends