[WIN32K] - Fix uninitialized variable usage
authorThomas Faber <thomas.faber@reactos.org>
Sat, 6 Aug 2011 17:02:54 +0000 (17:02 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 6 Aug 2011 17:02:54 +0000 (17:02 +0000)
[ADVAPI32] - Fix a TRACE
[PCIX] - Fix statements without effect
Spotted by MSVC.

svn path=/trunk/; revision=53102

reactos/dll/win32/advapi32/reg/reg.c
reactos/drivers/bus/pcix/device.c
reactos/drivers/bus/pcix/pci/ppbridge.c
reactos/subsystems/win32/win32k/ntuser/hook.c

index 6f79ea4..28dcbe4 100644 (file)
@@ -4016,7 +4016,7 @@ RegQueryValueExA(HKEY hkeyorg,
     static const int info_size = offsetof( KEY_VALUE_PARTIAL_INFORMATION, Data );
 
     TRACE("(%p,%s,%p,%p,%p,%p=%d)\n",
-          hkey, debugstr_a(name), reserved, type, data, count, count ? *count : 0 );
+          hkeyorg, debugstr_a(name), reserved, type, data, count, count ? *count : 0 );
 
     if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER;
     status = MapDefaultKey(&hkey, hkeyorg);
index c26fd92..360f5ce 100644 (file)
@@ -204,7 +204,7 @@ Device_SaveLimits(IN PPCI_CONFIGURATOR_CONTEXT Context)
             /* This function returns TRUE if the BAR was 64-bit, handle this */
             ASSERT((i + 1) < PCI_TYPE0_ADDRESSES);
             i++;
-            (&Limit[i])->Type == CmResourceTypeNull;
+            Limit[i].Type = CmResourceTypeNull;
         }
     }
 
index b7a9356..d1a0eab 100644 (file)
@@ -491,7 +491,7 @@ PPBridge_SaveLimits(IN PPCI_CONFIGURATOR_CONTEXT Context)
 
             /* Skip the next descriptor since this one is double sized */
             i++;
-            (&Limit[i])->Type == CmResourceTypeNull;
+            Limit[i].Type = CmResourceTypeNull;
         }
     }
 
index 4885ccc..c743294 100644 (file)
@@ -748,7 +748,8 @@ FASTCALL
 IntGetGlobalHookHandles(PDESKTOP pdo, int HookId)
 {
     PLIST_ENTRY pLastHead, pElem;
-    unsigned i, cHooks;
+    unsigned i = 0;
+    unsigned cHooks = 0;
     HHOOK *pList;
     PHOOK pHook;