summaryrefslogtreecommitdiffstats
path: root/googletest/include
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@google.com>2023-01-04 14:40:19 (GMT)
committerCopybara-Service <copybara-worker@google.com>2023-01-04 14:40:48 (GMT)
commit3a99ab6d8326c845af0672a0cd64dd05ad7734fe (patch)
tree71bf7886ac6368c02bedf50ca8f9634f2ac0eed9 /googletest/include
parent71140c3ca7a87bb1b5b9c9f1500fea8858cce344 (diff)
downloadgoogletest-3a99ab6d8326c845af0672a0cd64dd05ad7734fe.zip
googletest-3a99ab6d8326c845af0672a0cd64dd05ad7734fe.tar.gz
googletest-3a99ab6d8326c845af0672a0cd64dd05ad7734fe.tar.bz2
Fix _MSC_VER check
Use "#if defined(_MSC_VER)" instead of "#if _MSC_VER" to be consistent with other usages in the file and to work with the "-Wundef" warning. PiperOrigin-RevId: 499471290 Change-Id: I34a9442eecf266afd74d4332cab7d39766df4ed9
Diffstat (limited to 'googletest/include')
-rw-r--r--googletest/include/gtest/internal/gtest-port.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index 01bfd1f..d427f71 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -2142,7 +2142,7 @@ GTEST_DISABLE_MSC_DEPRECATED_POP_()
// MSVC-based platforms. We map the GTEST_SNPRINTF_ macro to the appropriate
// function in order to achieve that. We use macro definition here because
// snprintf is a variadic function.
-#if _MSC_VER && !GTEST_OS_WINDOWS_MOBILE
+#if defined(_MSC_VER) && !GTEST_OS_WINDOWS_MOBILE
// MSVC 2005 and above support variadic macros.
#define GTEST_SNPRINTF_(buffer, size, format, ...) \
_snprintf_s(buffer, size, size, format, __VA_ARGS__)