Author: tkreuzer
Date: Sun Oct 19 13:17:49 2014
New Revision: 64822

URL: http://svn.reactos.org/svn/reactos?rev=64822&view=rev
Log:
[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)

Modified:
    trunk/reactos/win32ss/user/user32/windows/class.c
    trunk/reactos/win32ss/user/user32/windows/draw.c
    trunk/reactos/win32ss/user/user32/windows/message.c

Modified: trunk/reactos/win32ss/user/user32/windows/class.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/windows/class.c?rev=64822&r1=64821&r2=64822&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/class.c   [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/class.c   [iso-8859-1] Sun Oct 19 
13:17:49 2014
@@ -67,7 +67,7 @@
                                                    
ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION,
                                                   &SectionName,
                                                   &KeyedData );
- 
+
    if (NT_SUCCESS(Status) && KeyedData.ulDataFormatVersion == 1)
    {
       struct dll_redirect *dll = KeyedData.lpSectionBase;
@@ -165,7 +165,7 @@
 Error_Exit:
    if ( Ret || !hLibModule )
    {
-      if ( phLibModule ) *phLibModule = hLibModule;  
+      if ( phLibModule ) *phLibModule = hLibModule;
    }
    else
    {
@@ -173,7 +173,7 @@
       FreeLibrary(hLibModule);
       SetLastError(save_error);
    }
-                                  
+
    return Ret;
 }
 
@@ -269,7 +269,7 @@
 Error_Exit:
    if ( Ret || !hLibModule )
    {
-      if ( phLibModule ) *phLibModule = hLibModule;  
+      if ( phLibModule ) *phLibModule = hLibModule;
    }
    else
    {
@@ -1022,7 +1022,7 @@
 {
     WCHAR tmpbuf[MAX_ATOM_LEN + 1];
     int len;
-  
+
     if (nMaxCount <= 0) return 0;
     if (!GetClassNameW( hWnd, tmpbuf, sizeof(tmpbuf)/sizeof(WCHAR) )) return 0;
     RtlUnicodeToMultiByteN( lpClassName, nMaxCount - 1, (PULONG)&len, tmpbuf, 
strlenW(tmpbuf) * sizeof(WCHAR) );
@@ -1256,7 +1256,7 @@
 {
     WCHAR tmpbuf[MAX_ATOM_LEN + 1];
     UINT len;
-  
+
     if ((INT)cchType <= 0) return 0;
     if (!RealGetWindowClassW( hwnd, tmpbuf, sizeof(tmpbuf)/sizeof(WCHAR) )) 
return 0;
     RtlUnicodeToMultiByteN( pszType, cchType - 1, (PULONG)&len, tmpbuf, 
strlenW(tmpbuf) * sizeof(WCHAR) );
@@ -1472,6 +1472,7 @@
       WndClass.hIconSm = CreateSmallIcon(WndClass.hIcon);
    }
 */
+   RtlInitEmptyAnsiString(&AnsiMenuName, NULL, 0);
    if (WndClass.lpszMenuName != NULL)
    {
       if (!IS_INTRESOURCE(WndClass.lpszMenuName))

Modified: trunk/reactos/win32ss/user/user32/windows/draw.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/windows/draw.c?rev=64822&r1=64821&r2=64822&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/draw.c    [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/draw.c    [iso-8859-1] Sun Oct 19 
13:17:49 2014
@@ -1272,6 +1272,10 @@
 
             case DST_COMPLEX: /* cx and cy must be set in this mode */
                 return FALSE;
+
+            default:
+                ERR("Invalid opcode: %u\n", opcode);
+                return FALSE;
         }
 
         if(!cx)
@@ -1552,7 +1556,7 @@
         /* Handle system colors */
         if (hbr <= (HBRUSH)(COLOR_MENUBAR + 1))
             hbr = GetSysColorBrush(PtrToUlong(hbr) - 1);
-        
+
         prevhbr = SelectObject(hDC, hbr);
         if (prevhbr == NULL)
             return (INT)FALSE;

Modified: trunk/reactos/win32ss/user/user32/windows/message.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/windows/message.c?rev=64822&r1=64821&r2=64822&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/message.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/message.c [iso-8859-1] Sun Oct 19 
13:17:49 2014
@@ -1357,6 +1357,9 @@
   AnsiMsg.message = message;
   AnsiMsg.wParam = wParam;
   AnsiMsg.lParam = lParam;
+  AnsiMsg.time = 0;
+  AnsiMsg.pt.x = 0;
+  AnsiMsg.pt.y = 0;
 
   // Desktop is always Unicode so convert Ansi here.
   if (!MsgiAnsiToUnicodeMessage(hwnd, &UcMsg, &AnsiMsg))
@@ -1501,7 +1504,10 @@
       UnicodeMsg.message = Msg;
       UnicodeMsg.wParam = wParam;
       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;
       }
@@ -1699,6 +1705,9 @@
       AnsiMsg.message = Msg;
       AnsiMsg.wParam = wParam;
       AnsiMsg.lParam = lParam;
+      AnsiMsg.time = 0;
+      AnsiMsg.pt.x = 0;
+      AnsiMsg.pt.y = 0;
       if (! MsgiAnsiToUnicodeMessage(hWnd, &UnicodeMsg, &AnsiMsg))
       {
           goto Exit;
@@ -2428,6 +2437,9 @@
   UMMsg.message = Msg;
   UMMsg.wParam = wParam;
   UMMsg.lParam = lParam;
+  UMMsg.time = 0;
+  UMMsg.pt.x = 0;
+  UMMsg.pt.y = 0;
 
   if (! MsgiUMToKMMessage(&UMMsg, &KMMsg, FALSE))
   {
@@ -2492,6 +2504,9 @@
   AnsiMsg.message = Msg;
   AnsiMsg.wParam = wParam;
   AnsiMsg.lParam = lParam;
+  AnsiMsg.time = 0;
+  AnsiMsg.pt.x = 0;
+  AnsiMsg.pt.y = 0;
 
   if (!MsgiAnsiToUnicodeMessage(Wnd, &UcMsg, &AnsiMsg))
   {
@@ -2548,6 +2563,9 @@
   AnsiMsg.message = Msg;
   AnsiMsg.wParam = wParam;
   AnsiMsg.lParam = lParam;
+  AnsiMsg.time = 0;
+  AnsiMsg.pt.x = 0;
+  AnsiMsg.pt.y = 0;
 
   if (!MsgiAnsiToUnicodeMessage(hWnd, &UcMsg, &AnsiMsg))
   {
@@ -2635,6 +2653,9 @@
   AnsiMsg.message = Msg;
   AnsiMsg.wParam = wParam;
   AnsiMsg.lParam = lParam;
+  AnsiMsg.time = 0;
+  AnsiMsg.pt.x = 0;
+  AnsiMsg.pt.y = 0;
 
   if (! MsgiAnsiToUnicodeMessage(hWnd, &UcMsg, &AnsiMsg))
   {
@@ -2728,6 +2749,9 @@
   AnsiMsg.message = Msg;
   AnsiMsg.wParam = wParam;
   AnsiMsg.lParam = lParam;
+  AnsiMsg.time = 0;
+  AnsiMsg.pt.x = 0;
+  AnsiMsg.pt.y = 0;
   if (! MsgiAnsiToUnicodeMessage(hWnd, &UcMsg, &AnsiMsg))
   {
      return FALSE;
@@ -2763,6 +2787,9 @@
   UMMsg.message = Msg;
   UMMsg.wParam = wParam;
   UMMsg.lParam = lParam;
+  UMMsg.time = 0;
+  UMMsg.pt.x = 0;
+  UMMsg.pt.y = 0;
   if (! MsgiUMToKMMessage(&UMMsg, &KMMsg, TRUE))
   {
      return FALSE;
@@ -2924,6 +2951,9 @@
   KMMsg.hwnd = CallbackArgs->Wnd;
   KMMsg.message = CallbackArgs->Msg;
   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 */
   if (0 <= CallbackArgs->lParamBufferSize)
     {


Reply via email to