Commit 035a101b authored by Denis Samoilov's avatar Denis Samoilov
Browse files

Suppress unused-value warning

When _DEBUG is not defined the _CrtSetDbgFlag turns into ((int)0),
which causes unused-value warning for clang.
parent 1a3e2a26
...@@ -377,12 +377,12 @@ class MemoryIsNotDeallocated ...@@ -377,12 +377,12 @@ class MemoryIsNotDeallocated
old_crtdbg_flag_ = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); old_crtdbg_flag_ = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
// Set heap allocation block type to _IGNORE_BLOCK so that MS debug CRT // Set heap allocation block type to _IGNORE_BLOCK so that MS debug CRT
// doesn't report mem leak if there's no matching deallocation. // 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() { ~MemoryIsNotDeallocated() {
// Restore the original _CRTDBG_ALLOC_MEM_DF flag // Restore the original _CRTDBG_ALLOC_MEM_DF flag
_CrtSetDbgFlag(old_crtdbg_flag_); (void)_CrtSetDbgFlag(old_crtdbg_flag_);
} }
private: private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment