mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:45:40 +00:00
[USER32]
Fix uninitialized variable use/warnings in - RegisterClassExWOWW (found by MSVC runtime checks) - IntDrawState (CID-514399) - IntCallWindowProcA (CID-514389) - IntCallWindowProcW (CID-414390) - SendMessageA (CID-514392) - SendMessageW (CID-514393) - SendMessageTimeoutA (CID-514441) - SendMessageCallbackA (CID-514442) - SendNotifyMessageW (CID-514443) - SendNotifyMessageA (CID-514444) - User32CallWindowProcFromKernel (CID-514445) - DesktopWndProcA (CID-716765) svn path=/trunk/; revision=64822
This commit is contained in:
parent
74cb166477
commit
50e22a432f
3 changed files with 43 additions and 8 deletions
|
@ -1472,6 +1472,7 @@ RegisterClassExWOWW(WNDCLASSEXW *lpwcx,
|
||||||
WndClass.hIconSm = CreateSmallIcon(WndClass.hIcon);
|
WndClass.hIconSm = CreateSmallIcon(WndClass.hIcon);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
RtlInitEmptyAnsiString(&AnsiMenuName, NULL, 0);
|
||||||
if (WndClass.lpszMenuName != NULL)
|
if (WndClass.lpszMenuName != NULL)
|
||||||
{
|
{
|
||||||
if (!IS_INTRESOURCE(WndClass.lpszMenuName))
|
if (!IS_INTRESOURCE(WndClass.lpszMenuName))
|
||||||
|
|
|
@ -1272,6 +1272,10 @@ IntDrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC func, LPARAM lp, WPARAM wp,
|
||||||
|
|
||||||
case DST_COMPLEX: /* cx and cy must be set in this mode */
|
case DST_COMPLEX: /* cx and cy must be set in this mode */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
default:
|
||||||
|
ERR("Invalid opcode: %u\n", opcode);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!cx)
|
if(!cx)
|
||||||
|
|
|
@ -1357,6 +1357,9 @@ DesktopWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
|
||||||
AnsiMsg.message = message;
|
AnsiMsg.message = message;
|
||||||
AnsiMsg.wParam = wParam;
|
AnsiMsg.wParam = wParam;
|
||||||
AnsiMsg.lParam = lParam;
|
AnsiMsg.lParam = lParam;
|
||||||
|
AnsiMsg.time = 0;
|
||||||
|
AnsiMsg.pt.x = 0;
|
||||||
|
AnsiMsg.pt.y = 0;
|
||||||
|
|
||||||
// Desktop is always Unicode so convert Ansi here.
|
// Desktop is always Unicode so convert Ansi here.
|
||||||
if (!MsgiAnsiToUnicodeMessage(hwnd, &UcMsg, &AnsiMsg))
|
if (!MsgiAnsiToUnicodeMessage(hwnd, &UcMsg, &AnsiMsg))
|
||||||
|
@ -1501,7 +1504,10 @@ IntCallWindowProcW(BOOL IsAnsiProc,
|
||||||
UnicodeMsg.message = Msg;
|
UnicodeMsg.message = Msg;
|
||||||
UnicodeMsg.wParam = wParam;
|
UnicodeMsg.wParam = wParam;
|
||||||
UnicodeMsg.lParam = lParam;
|
UnicodeMsg.lParam = lParam;
|
||||||
if (! MsgiUnicodeToAnsiMessage(hWnd, &AnsiMsg, &UnicodeMsg))
|
UnicodeMsg.time = 0;
|
||||||
|
UnicodeMsg.pt.x = 0;
|
||||||
|
UnicodeMsg.pt.y = 0;
|
||||||
|
if (! MsgiUnicodeToAnsiMessage(hWnd, &AnsiMsg, &UnicodeMsg))
|
||||||
{
|
{
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
@ -1699,6 +1705,9 @@ IntCallWindowProcA(BOOL IsAnsiProc,
|
||||||
AnsiMsg.message = Msg;
|
AnsiMsg.message = Msg;
|
||||||
AnsiMsg.wParam = wParam;
|
AnsiMsg.wParam = wParam;
|
||||||
AnsiMsg.lParam = lParam;
|
AnsiMsg.lParam = lParam;
|
||||||
|
AnsiMsg.time = 0;
|
||||||
|
AnsiMsg.pt.x = 0;
|
||||||
|
AnsiMsg.pt.y = 0;
|
||||||
if (! MsgiAnsiToUnicodeMessage(hWnd, &UnicodeMsg, &AnsiMsg))
|
if (! MsgiAnsiToUnicodeMessage(hWnd, &UnicodeMsg, &AnsiMsg))
|
||||||
{
|
{
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
@ -2428,6 +2437,9 @@ SendMessageW(HWND Wnd,
|
||||||
UMMsg.message = Msg;
|
UMMsg.message = Msg;
|
||||||
UMMsg.wParam = wParam;
|
UMMsg.wParam = wParam;
|
||||||
UMMsg.lParam = lParam;
|
UMMsg.lParam = lParam;
|
||||||
|
UMMsg.time = 0;
|
||||||
|
UMMsg.pt.x = 0;
|
||||||
|
UMMsg.pt.y = 0;
|
||||||
|
|
||||||
if (! MsgiUMToKMMessage(&UMMsg, &KMMsg, FALSE))
|
if (! MsgiUMToKMMessage(&UMMsg, &KMMsg, FALSE))
|
||||||
{
|
{
|
||||||
|
@ -2492,6 +2504,9 @@ SendMessageA(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||||
AnsiMsg.message = Msg;
|
AnsiMsg.message = Msg;
|
||||||
AnsiMsg.wParam = wParam;
|
AnsiMsg.wParam = wParam;
|
||||||
AnsiMsg.lParam = lParam;
|
AnsiMsg.lParam = lParam;
|
||||||
|
AnsiMsg.time = 0;
|
||||||
|
AnsiMsg.pt.x = 0;
|
||||||
|
AnsiMsg.pt.y = 0;
|
||||||
|
|
||||||
if (!MsgiAnsiToUnicodeMessage(Wnd, &UcMsg, &AnsiMsg))
|
if (!MsgiAnsiToUnicodeMessage(Wnd, &UcMsg, &AnsiMsg))
|
||||||
{
|
{
|
||||||
|
@ -2548,6 +2563,9 @@ SendMessageCallbackA(
|
||||||
AnsiMsg.message = Msg;
|
AnsiMsg.message = Msg;
|
||||||
AnsiMsg.wParam = wParam;
|
AnsiMsg.wParam = wParam;
|
||||||
AnsiMsg.lParam = lParam;
|
AnsiMsg.lParam = lParam;
|
||||||
|
AnsiMsg.time = 0;
|
||||||
|
AnsiMsg.pt.x = 0;
|
||||||
|
AnsiMsg.pt.y = 0;
|
||||||
|
|
||||||
if (!MsgiAnsiToUnicodeMessage(hWnd, &UcMsg, &AnsiMsg))
|
if (!MsgiAnsiToUnicodeMessage(hWnd, &UcMsg, &AnsiMsg))
|
||||||
{
|
{
|
||||||
|
@ -2635,6 +2653,9 @@ SendMessageTimeoutA(
|
||||||
AnsiMsg.message = Msg;
|
AnsiMsg.message = Msg;
|
||||||
AnsiMsg.wParam = wParam;
|
AnsiMsg.wParam = wParam;
|
||||||
AnsiMsg.lParam = lParam;
|
AnsiMsg.lParam = lParam;
|
||||||
|
AnsiMsg.time = 0;
|
||||||
|
AnsiMsg.pt.x = 0;
|
||||||
|
AnsiMsg.pt.y = 0;
|
||||||
|
|
||||||
if (! MsgiAnsiToUnicodeMessage(hWnd, &UcMsg, &AnsiMsg))
|
if (! MsgiAnsiToUnicodeMessage(hWnd, &UcMsg, &AnsiMsg))
|
||||||
{
|
{
|
||||||
|
@ -2728,6 +2749,9 @@ SendNotifyMessageA(
|
||||||
AnsiMsg.message = Msg;
|
AnsiMsg.message = Msg;
|
||||||
AnsiMsg.wParam = wParam;
|
AnsiMsg.wParam = wParam;
|
||||||
AnsiMsg.lParam = lParam;
|
AnsiMsg.lParam = lParam;
|
||||||
|
AnsiMsg.time = 0;
|
||||||
|
AnsiMsg.pt.x = 0;
|
||||||
|
AnsiMsg.pt.y = 0;
|
||||||
if (! MsgiAnsiToUnicodeMessage(hWnd, &UcMsg, &AnsiMsg))
|
if (! MsgiAnsiToUnicodeMessage(hWnd, &UcMsg, &AnsiMsg))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -2763,6 +2787,9 @@ SendNotifyMessageW(
|
||||||
UMMsg.message = Msg;
|
UMMsg.message = Msg;
|
||||||
UMMsg.wParam = wParam;
|
UMMsg.wParam = wParam;
|
||||||
UMMsg.lParam = lParam;
|
UMMsg.lParam = lParam;
|
||||||
|
UMMsg.time = 0;
|
||||||
|
UMMsg.pt.x = 0;
|
||||||
|
UMMsg.pt.y = 0;
|
||||||
if (! MsgiUMToKMMessage(&UMMsg, &KMMsg, TRUE))
|
if (! MsgiUMToKMMessage(&UMMsg, &KMMsg, TRUE))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -2924,6 +2951,9 @@ User32CallWindowProcFromKernel(PVOID Arguments, ULONG ArgumentLength)
|
||||||
KMMsg.hwnd = CallbackArgs->Wnd;
|
KMMsg.hwnd = CallbackArgs->Wnd;
|
||||||
KMMsg.message = CallbackArgs->Msg;
|
KMMsg.message = CallbackArgs->Msg;
|
||||||
KMMsg.wParam = CallbackArgs->wParam;
|
KMMsg.wParam = CallbackArgs->wParam;
|
||||||
|
KMMsg.time = 0;
|
||||||
|
KMMsg.pt.x = 0;
|
||||||
|
KMMsg.pt.y = 0;
|
||||||
/* Check if lParam is really a pointer and adjust it if it is */
|
/* Check if lParam is really a pointer and adjust it if it is */
|
||||||
if (0 <= CallbackArgs->lParamBufferSize)
|
if (0 <= CallbackArgs->lParamBufferSize)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue