From dc87c1afb27046b08e41a400e52c5e494503f1eb Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 19 Oct 2018 11:27:09 +0300 Subject: [PATCH] Workaround 'identical inner return condition always true' cppcheck warning * extra/msvc_dbg.c (GetModuleBase): Change if(dwAddrBase) to if(dwAddrBase!=0). --- extra/msvc_dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/msvc_dbg.c b/extra/msvc_dbg.c index 8a72976b..d8e6088b 100644 --- a/extra/msvc_dbg.c +++ b/extra/msvc_dbg.c @@ -75,7 +75,7 @@ static ULONG_ADDR CALLBACK GetModuleBase(HANDLE hProcess, ULONG_ADDR dwAddress) { MEMORY_BASIC_INFORMATION memoryInfo; ULONG_ADDR dwAddrBase = SymGetModuleBase(hProcess, dwAddress); - if (dwAddrBase) { + if (dwAddrBase != 0) { return dwAddrBase; } if (VirtualQueryEx(hProcess, (void*)(GC_ULONG_PTR)dwAddress, &memoryInfo, -- 2.40.0