From a258b5fbd796f146e9824e9f39d9f742c4bf073f Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sat, 6 Aug 2011 17:02:54 +0000 Subject: [PATCH] [WIN32K] - Fix uninitialized variable usage [ADVAPI32] - Fix a TRACE [PCIX] - Fix statements without effect Spotted by MSVC. svn path=/trunk/; revision=53102 --- reactos/dll/win32/advapi32/reg/reg.c | 2 +- reactos/drivers/bus/pcix/device.c | 2 +- reactos/drivers/bus/pcix/pci/ppbridge.c | 2 +- reactos/subsystems/win32/win32k/ntuser/hook.c | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/advapi32/reg/reg.c b/reactos/dll/win32/advapi32/reg/reg.c index 6f79ea466fc..28dcbe4dabb 100644 --- a/reactos/dll/win32/advapi32/reg/reg.c +++ b/reactos/dll/win32/advapi32/reg/reg.c @@ -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); diff --git a/reactos/drivers/bus/pcix/device.c b/reactos/drivers/bus/pcix/device.c index c26fd92b7fe..360f5ceec5a 100644 --- a/reactos/drivers/bus/pcix/device.c +++ b/reactos/drivers/bus/pcix/device.c @@ -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; } } diff --git a/reactos/drivers/bus/pcix/pci/ppbridge.c b/reactos/drivers/bus/pcix/pci/ppbridge.c index b7a9356bf25..d1a0eab1966 100644 --- a/reactos/drivers/bus/pcix/pci/ppbridge.c +++ b/reactos/drivers/bus/pcix/pci/ppbridge.c @@ -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; } } diff --git a/reactos/subsystems/win32/win32k/ntuser/hook.c b/reactos/subsystems/win32/win32k/ntuser/hook.c index 4885ccc2013..c743294f596 100644 --- a/reactos/subsystems/win32/win32k/ntuser/hook.c +++ b/reactos/subsystems/win32/win32k/ntuser/hook.c @@ -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;