windows.cfg: SendMessage must not be <leak-ignore/>
This commit is contained in:
parent
9082c097c8
commit
5c92c231b8
|
@ -2161,7 +2161,6 @@ HFONT CreateFont(
|
||||||
</function>
|
</function>
|
||||||
<function name="SendMessage,SendMessageA,SendMessageW">
|
<function name="SendMessage,SendMessageA,SendMessageW">
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
<leak-ignore/>
|
|
||||||
<arg nr="1">
|
<arg nr="1">
|
||||||
<not-null/>
|
<not-null/>
|
||||||
<not-uninit/>
|
<not-uninit/>
|
||||||
|
|
|
@ -5978,6 +5978,7 @@ private:
|
||||||
|
|
||||||
TEST_CASE(openfileNoLeak);
|
TEST_CASE(openfileNoLeak);
|
||||||
TEST_CASE(returnValueNotUsed_tfopen_s);
|
TEST_CASE(returnValueNotUsed_tfopen_s);
|
||||||
|
TEST_CASE(sendMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void openfileNoLeak() {
|
void openfileNoLeak() {
|
||||||
|
@ -6011,6 +6012,14 @@ private:
|
||||||
"}");
|
"}");
|
||||||
TODO_ASSERT_EQUALS("[test.c:3]: (error) Resource leak: fp\n", "", errout.str());
|
TODO_ASSERT_EQUALS("[test.c:3]: (error) Resource leak: fp\n", "", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sendMessage() {
|
||||||
|
check("void SetFont() {\n"
|
||||||
|
" HFONT hf = CreateFontIndirect(&lf);\n"
|
||||||
|
" SendMessage(hwnd, WM_SETFONT, (WPARAM)hf, TRUE);\n" // We do not know what the handler for the message will do with 'hf', so it might be closed later
|
||||||
|
"}");
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_TEST(TestMemleakWindows)
|
REGISTER_TEST(TestMemleakWindows)
|
||||||
|
|
Loading…
Reference in New Issue