PR #1735: Avoid `int` to `bool` conversion warning
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1735
If asan is enabled with VS, the following warning is issued by the compiler:
1>C:\work\abseil-cpp\absl\debugging\leak_check.cc(46,68): error C4800: Implicit conversion from 'int' to bool. Possible information loss
1> C:\work\abseil-cpp\absl\debugging\leak_check.cc(46,68):
1> consider using explicit cast or comparison to 0 to avoid this warning
Merge 9a6a677add58a9cd31b2381f6bdb5328c9b03c02 into 8cdf48213629f34b014f8e0d594ac16fe7954686
Merging this change closes #1735
COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1735 from pps83:master-int-bool-warn 9a6a677add58a9cd31b2381f6bdb5328c9b03c02
PiperOrigin-RevId: 657591557
Change-Id: I709424b5064160860186a42f854a1856465e80d0
diff --git a/absl/debugging/leak_check.cc b/absl/debugging/leak_check.cc
index fdb8798..1e57e6a 100644
--- a/absl/debugging/leak_check.cc
+++ b/absl/debugging/leak_check.cc
@@ -43,7 +43,7 @@
bool LeakCheckerIsActive() { return true; }
#endif
-bool FindAndReportLeaks() { return __lsan_do_recoverable_leak_check(); }
+bool FindAndReportLeaks() { return __lsan_do_recoverable_leak_check() != 0; }
void DoIgnoreLeak(const void* ptr) { __lsan_ignore_object(ptr); }
void RegisterLivePointers(const void* ptr, size_t size) {
__lsan_register_root_region(ptr, size);