summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCopybara-Service <copybara-worker@google.com>2021-11-18 16:53:52 (GMT)
committerCopybara-Service <copybara-worker@google.com>2021-11-18 16:53:52 (GMT)
commita0dc888bf180ae91a4e728e3eb948dcceac9c4f8 (patch)
treef5067718d483f8d04140578d9e5499abd0aaf785
parent1a3e2a265f35e604378156cd675b11ef0a184627 (diff)
parent035a101b62b144655d771c3a252e4cd52bde19a2 (diff)
downloadgoogletest-a0dc888bf180ae91a4e728e3eb948dcceac9c4f8.zip
googletest-a0dc888bf180ae91a4e728e3eb948dcceac9c4f8.tar.gz
googletest-a0dc888bf180ae91a4e728e3eb948dcceac9c4f8.tar.bz2
Merge pull request #3672 from densamoilov:densamoilov/main/suppress-warning
PiperOrigin-RevId: 410816204 Change-Id: Ib4c4851ae4e8a612d60184f53cd565c75671c4c6
-rw-r--r--googletest/src/gtest-port.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc
index a34c1c9..d47550a 100644
--- a/googletest/src/gtest-port.cc
+++ b/googletest/src/gtest-port.cc
@@ -377,12 +377,12 @@ class MemoryIsNotDeallocated
old_crtdbg_flag_ = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
// Set heap allocation block type to _IGNORE_BLOCK so that MS debug CRT
// doesn't report mem leak if there's no matching deallocation.
- _CrtSetDbgFlag(old_crtdbg_flag_ & ~_CRTDBG_ALLOC_MEM_DF);
+ (void)_CrtSetDbgFlag(old_crtdbg_flag_ & ~_CRTDBG_ALLOC_MEM_DF);
}
~MemoryIsNotDeallocated() {
// Restore the original _CRTDBG_ALLOC_MEM_DF flag
- _CrtSetDbgFlag(old_crtdbg_flag_);
+ (void)_CrtSetDbgFlag(old_crtdbg_flag_);
}
private: