windows.cfg: Ensure the return value is taken into account for memory (re)-allocation functions.
This commit is contained in:
parent
2fad53e4f8
commit
360823203f
|
@ -4490,6 +4490,7 @@ HFONT CreateFont(
|
||||||
size_t size);-->
|
size_t size);-->
|
||||||
<function name="_malloca">
|
<function name="_malloca">
|
||||||
<returnValue type="void *"/>
|
<returnValue type="void *"/>
|
||||||
|
<use-retval/>
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
<arg nr="1">
|
<arg nr="1">
|
||||||
<not-uninit/>
|
<not-uninit/>
|
||||||
|
@ -4600,6 +4601,7 @@ HFONT CreateFont(
|
||||||
<function name="HeapAlloc">
|
<function name="HeapAlloc">
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
<returnValue type="LPVOID"/>
|
<returnValue type="LPVOID"/>
|
||||||
|
<use-retval/>
|
||||||
<arg nr="1">
|
<arg nr="1">
|
||||||
<not-uninit/>
|
<not-uninit/>
|
||||||
</arg>
|
</arg>
|
||||||
|
@ -4619,6 +4621,7 @@ HFONT CreateFont(
|
||||||
<function name="HeapReAlloc">
|
<function name="HeapReAlloc">
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
<returnValue type="LPVOID"/>
|
<returnValue type="LPVOID"/>
|
||||||
|
<use-retval/>
|
||||||
<arg nr="1">
|
<arg nr="1">
|
||||||
<not-uninit/>
|
<not-uninit/>
|
||||||
</arg>
|
</arg>
|
||||||
|
@ -5309,6 +5312,7 @@ HFONT CreateFont(
|
||||||
<function name="LocalAlloc">
|
<function name="LocalAlloc">
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
<returnValue type="HLOCAL"/>
|
<returnValue type="HLOCAL"/>
|
||||||
|
<use-retval/>
|
||||||
<arg nr="1">
|
<arg nr="1">
|
||||||
<not-uninit/>
|
<not-uninit/>
|
||||||
<not-bool/>
|
<not-bool/>
|
||||||
|
@ -5327,6 +5331,7 @@ HFONT CreateFont(
|
||||||
<function name="LocalReAlloc">
|
<function name="LocalReAlloc">
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
<returnValue type="HLOCAL"/>
|
<returnValue type="HLOCAL"/>
|
||||||
|
<use-retval/>
|
||||||
<arg nr="1">
|
<arg nr="1">
|
||||||
<not-bool/>
|
<not-bool/>
|
||||||
</arg>
|
</arg>
|
||||||
|
@ -7231,6 +7236,16 @@ HFONT CreateFont(
|
||||||
<define name="CO_E_ACNOTINITIALIZED" value="0x8001013F"/>
|
<define name="CO_E_ACNOTINITIALIZED" value="0x8001013F"/>
|
||||||
<define name="CO_E_CANCEL_DISABLED" value="0x80010140"/>
|
<define name="CO_E_CANCEL_DISABLED" value="0x80010140"/>
|
||||||
<define name="RPC_E_UNEXPECTED" value="0x8001FFFF"/>
|
<define name="RPC_E_UNEXPECTED" value="0x8001FFFF"/>
|
||||||
|
<define name="LHND" value="0x0042"/>
|
||||||
|
<define name="LMEM_FIXED" value="0x0000"/>
|
||||||
|
<define name="LMEM_MOVEABLE" value="0x0002"/>
|
||||||
|
<define name="LMEM_ZEROINIT" value="0x0040"/>
|
||||||
|
<define name="LPTR" value="0x0040"/>
|
||||||
|
<define name="NONZEROLHND" value="0x0002"/>
|
||||||
|
<define name="NONZEROLPTR" value="0x0000"/>
|
||||||
|
<define name="HEAP_GENERATE_EXCEPTIONS" value="0x0004"/>
|
||||||
|
<define name="HEAP_NO_SERIALIZE" value="0x0001"/>
|
||||||
|
<define name="HEAP_ZERO_MEMORY" value="0x0008"/>
|
||||||
<!-- Winerror.h: COM Error Codes (Security and Setup) Ref.: https://msdn.microsoft.com/en-us/library/windows/desktop/dd542646(v=vs.85).aspx-->
|
<!-- Winerror.h: COM Error Codes (Security and Setup) Ref.: https://msdn.microsoft.com/en-us/library/windows/desktop/dd542646(v=vs.85).aspx-->
|
||||||
<define name="ERROR_AUDITING_DISABLED" value="0xC0090001"/>
|
<define name="ERROR_AUDITING_DISABLED" value="0xC0090001"/>
|
||||||
<define name="ERROR_ALL_SIDS_FILTERED" value="0xC0090002"/>
|
<define name="ERROR_ALL_SIDS_FILTERED" value="0xC0090002"/>
|
||||||
|
|
|
@ -472,6 +472,7 @@ void ignoredReturnValue()
|
||||||
// cppcheck-suppress leakReturnValNotUsed
|
// cppcheck-suppress leakReturnValNotUsed
|
||||||
CreateEventEx(NULL, L"test", CREATE_EVENT_INITIAL_SET, EVENT_MODIFY_STATE);
|
CreateEventEx(NULL, L"test", CREATE_EVENT_INITIAL_SET, EVENT_MODIFY_STATE);
|
||||||
|
|
||||||
|
// cppcheck-suppress ignoredReturnValue
|
||||||
// cppcheck-suppress leakReturnValNotUsed
|
// cppcheck-suppress leakReturnValNotUsed
|
||||||
_malloca(10);
|
_malloca(10);
|
||||||
// cppcheck-suppress ignoredReturnValue
|
// cppcheck-suppress ignoredReturnValue
|
||||||
|
@ -482,8 +483,10 @@ void ignoredReturnValue()
|
||||||
|
|
||||||
// cppcheck-suppress ignoredReturnValue
|
// cppcheck-suppress ignoredReturnValue
|
||||||
GetProcessHeap()
|
GetProcessHeap()
|
||||||
|
// cppcheck-suppress ignoredReturnValue
|
||||||
// cppcheck-suppress leakReturnValNotUsed
|
// cppcheck-suppress leakReturnValNotUsed
|
||||||
HeapAlloc(GetProcessHeap(), 0, 10);
|
HeapAlloc(GetProcessHeap(), 0, 10);
|
||||||
|
// cppcheck-suppress ignoredReturnValue
|
||||||
// cppcheck-suppress leakReturnValNotUsed
|
// cppcheck-suppress leakReturnValNotUsed
|
||||||
HeapReAlloc(GetProcessHeap(), 0, 1, 0);
|
HeapReAlloc(GetProcessHeap(), 0, 1, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue