diff --git a/cfg/windows.cfg b/cfg/windows.cfg index ab0ccf5b2..7a7d47c39 100644 --- a/cfg/windows.cfg +++ b/cfg/windows.cfg @@ -5098,6 +5098,83 @@ HFONT CreateFont( + + + false + + + + + 0: + + + + + + + + + + false + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false diff --git a/test/cfg/windows.cpp b/test/cfg/windows.cpp index 8ce3a7278..b48d2a0b1 100644 --- a/test/cfg/windows.cpp +++ b/test/cfg/windows.cpp @@ -159,6 +159,10 @@ void validCode() SecureZeroMemory(byteBuf, sizeof(byteBuf)); RtlFillMemory(byteBuf, sizeof(byteBuf), 0xff); + // cppcheck-suppress LocalAllocCalled + HLOCAL pLocalAlloc = LocalAlloc(1, 2); + LocalFree(pLocalAlloc); + // Intrinsics __noop(); __noop(1, "test", NULL); @@ -326,6 +330,18 @@ void memleak_HeapAlloc() // cppcheck-suppress memleak } +void memleak_LocalAlloc() +{ + LPTSTR pszBuf; + // cppcheck-suppress LocalAllocCalled + pszBuf = (LPTSTR)LocalAlloc(LPTR, MAX_PATH*sizeof(TCHAR)); + (void)LocalSize(pszBuf); + (void)LocalFlags(pszBuf); + LocalLock(pszBuf); + LocalUnlock(pszBuf); + // cppcheck-suppress memleak +} + void resourceLeak_CreateSemaphoreA() { HANDLE hSemaphore;