https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0af3689c2ea5e33b275a5…
commit 0af3689c2ea5e33b275a5096bc440ec84eb431bc
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sun Nov 21 12:37:04 2021 -0500
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sun Nov 21 12:57:35 2021 -0500
[REACTOS] Fix traces with missing arguments.
Courtesy of VS Code Analysis warning C6064:
Missing integer argument to 'DbgPrint' that corresponds to conversion
specifier 'N'.
---
base/services/dcomlaunch/dcomlaunch.c | 2 +-
base/services/wmisvc/wmisvc.c | 2 +-
base/services/wuauserv/wuauserv.c | 2 +-
dll/win32/kernel32/winnls/string/lang.c | 4 ++--
drivers/bus/acpi/cmbatt/cmbatt.c | 7 ++++---
drivers/network/ndis/ndis/config.c | 2 +-
drivers/wdm/audio/drivers/CMIDriver/minwave.cpp | 2 +-
ntoskrnl/mm/i386/page.c | 5 +++--
ntoskrnl/se/token.c | 4 ++--
ntoskrnl/wmi/smbios.c | 3 ++-
win32ss/user/ntuser/defwnd.c | 2 +-
11 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/base/services/dcomlaunch/dcomlaunch.c
b/base/services/dcomlaunch/dcomlaunch.c
index 49c8541c0c7..f67feb72e6e 100644
--- a/base/services/dcomlaunch/dcomlaunch.c
+++ b/base/services/dcomlaunch/dcomlaunch.c
@@ -90,7 +90,7 @@ ServiceControlHandler(DWORD dwControl,
return ERROR_SUCCESS;
default :
- DPRINT1(" Control %lu received\n");
+ DPRINT1(" Control %lu received\n", dwControl);
return ERROR_CALL_NOT_IMPLEMENTED;
}
}
diff --git a/base/services/wmisvc/wmisvc.c b/base/services/wmisvc/wmisvc.c
index 07c94eddd43..ee0281d3c07 100644
--- a/base/services/wmisvc/wmisvc.c
+++ b/base/services/wmisvc/wmisvc.c
@@ -112,7 +112,7 @@ ServiceControlHandler(DWORD dwControl,
return ERROR_SUCCESS;
default :
- DPRINT1(" Control %lu received\n");
+ DPRINT1(" Control %lu received\n", dwControl);
return ERROR_CALL_NOT_IMPLEMENTED;
}
}
diff --git a/base/services/wuauserv/wuauserv.c b/base/services/wuauserv/wuauserv.c
index 5ef0d287778..fed557d1b66 100644
--- a/base/services/wuauserv/wuauserv.c
+++ b/base/services/wuauserv/wuauserv.c
@@ -82,7 +82,7 @@ ServiceControlHandler(DWORD dwControl,
return ERROR_SUCCESS;
default :
- DPRINT1("WU ServiceControlHandler() Control %lu received\n");
+ DPRINT1("WU ServiceControlHandler() Control %lu received\n",
dwControl);
return ERROR_CALL_NOT_IMPLEMENTED;
}
}
diff --git a/dll/win32/kernel32/winnls/string/lang.c
b/dll/win32/kernel32/winnls/string/lang.c
index 06be3da8cb7..4841e7a9d57 100644
--- a/dll/win32/kernel32/winnls/string/lang.c
+++ b/dll/win32/kernel32/winnls/string/lang.c
@@ -3239,7 +3239,7 @@ EnumSystemCodePagesW (
{
ENUMSYSTEMCODEPAGES_CALLBACKS procs;
- TRACE("(%p,0x%08X,0x%08lX)\n", lpCodePageEnumProc, dwFlags);
+ TRACE("(%p,0x%08X)\n", lpCodePageEnumProc, dwFlags);
procs.procA = NULL;
procs.procW = lpCodePageEnumProc;
@@ -3261,7 +3261,7 @@ EnumSystemCodePagesA (
{
ENUMSYSTEMCODEPAGES_CALLBACKS procs;
- TRACE("(%p,0x%08X,0x%08lX)\n", lpCodePageEnumProc, dwFlags);
+ TRACE("(%p,0x%08X)\n", lpCodePageEnumProc, dwFlags);
procs.procA = lpCodePageEnumProc;
procs.procW = NULL;
diff --git a/drivers/bus/acpi/cmbatt/cmbatt.c b/drivers/bus/acpi/cmbatt/cmbatt.c
index 69000fcf032..257af8e4eb3 100644
--- a/drivers/bus/acpi/cmbatt/cmbatt.c
+++ b/drivers/bus/acpi/cmbatt/cmbatt.c
@@ -65,7 +65,7 @@ CmBattPowerCallBack(IN PCMBATT_DEVICE_EXTENSION DeviceExtension,
else if (CmBattDebug & 0x10)
{
/* Unknown value */
- DbgPrint("CmBattPowerCallBack: unknown argument2 = %08x\n");
+ DbgPrint("CmBattPowerCallBack: unknown argument2 = %08x\n",
Value);
}
}
}
@@ -770,10 +770,11 @@ CmBattSetStatusNotify(IN PCMBATT_DEVICE_EXTENSION DeviceExtension,
DbgPrint("CmBattSetStatusNotify: Want %X CurrentCap %X\n",
Capacity, DeviceExtension->RemainingCapacity);
if (CmBattDebug & CMBATT_ACPI_WARNING)
- DbgPrint("CmBattSetStatusNotify: Set to: [%#08lx][%#08lx][%#08lx] Status
%x\n",
+ DbgPrint("CmBattSetStatusNotify: Set to: [%#08lx][%#08lx][%#08lx] Status
%lx\n",
BatteryNotify->PowerState,
BatteryNotify->LowCapacity,
- BatteryNotify->HighCapacity);
+ BatteryNotify->HighCapacity,
+ Status);
return Status;
}
diff --git a/drivers/network/ndis/ndis/config.c b/drivers/network/ndis/ndis/config.c
index 288a1ce7504..a5235e8a205 100644
--- a/drivers/network/ndis/ndis/config.c
+++ b/drivers/network/ndis/ndis/config.c
@@ -553,7 +553,7 @@ NdisReadConfiguration(
(*ParameterValue)->ParameterData.IntegerData = NDIS_VERSION;
*Status = NDIS_STATUS_SUCCESS;
- NDIS_DbgPrint(MAX_TRACE,("ParameterType = %0x%x, ParameterValue =
0x%x\n",
+ NDIS_DbgPrint(MAX_TRACE,("ParameterType = 0x%x, ParameterValue =
0x%x\n",
(*ParameterValue)->ParameterType,
(*ParameterValue)->ParameterData.IntegerData));
return;
}
diff --git a/drivers/wdm/audio/drivers/CMIDriver/minwave.cpp
b/drivers/wdm/audio/drivers/CMIDriver/minwave.cpp
index 331dcdbf052..1070757fdca 100644
--- a/drivers/wdm/audio/drivers/CMIDriver/minwave.cpp
+++ b/drivers/wdm/audio/drivers/CMIDriver/minwave.cpp
@@ -83,7 +83,7 @@ STDMETHODIMP CMiniportWaveCMI::NonDelegatingQueryInterface(REFIID
Interface, PVO
{
PAGED_CODE();
ASSERT(Object);
- DBGPRINT(("CMiniportWaveCMI[%p]::NonDelegatingQueryInterface"));
+ DBGPRINT(("CMiniportWaveCMI[%p]::NonDelegatingQueryInterface", this));
if (IsEqualGUIDAligned(Interface,IID_IUnknown)) {
#ifdef WAVERT
diff --git a/ntoskrnl/mm/i386/page.c b/ntoskrnl/mm/i386/page.c
index cf2e012389b..a9ba2eb1179 100644
--- a/ntoskrnl/mm/i386/page.c
+++ b/ntoskrnl/mm/i386/page.c
@@ -261,7 +261,7 @@ MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address,
{
if ((Address >= MmSystemRangeStart) || Add2Ptr(Address, PAGE_SIZE) >=
MmSystemRangeStart)
{
- DPRINT1("Process %p given for kernel-mode mapping at %p -- %lu pages
starting at %Ix\n", Process, Address);
+ DPRINT1("Process %p given for kernel-mode mapping at %p\n",
Process, Address);
KeBugCheck(MEMORY_MANAGEMENT);
}
@@ -625,7 +625,8 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
{
if ((Address >= MmSystemRangeStart) || Add2Ptr(Address, PAGE_SIZE) >=
MmSystemRangeStart)
{
- DPRINT1("Process %p given for kernel-mode mapping at %p -- %lu pages
starting at %Ix\n", Process, Address);
+ DPRINT1("Process %p given for kernel-mode mapping at %p -- 1 page
starting at %Ix\n",
+ Process, Address, Page);
KeBugCheck(MEMORY_MANAGEMENT);
}
diff --git a/ntoskrnl/se/token.c b/ntoskrnl/se/token.c
index 67beb8a8bfc..fb1b0a52159 100644
--- a/ntoskrnl/se/token.c
+++ b/ntoskrnl/se/token.c
@@ -6352,7 +6352,7 @@ NtOpenThreadTokenEx(
KernelMode, &NewToken);
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtOpenThreadTokenEx(): Failed to duplicate the token
(Status 0x%lx)\n");
+ DPRINT1("NtOpenThreadTokenEx(): Failed to duplicate the token
(Status 0x%lx)\n", Status);
}
ObReferenceObject(NewToken);
@@ -6393,7 +6393,7 @@ NtOpenThreadTokenEx(
Status = PsImpersonateClient(Thread, NewToken, FALSE, EffectiveOnly,
ImpersonationLevel);
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtOpenThreadTokenEx(): Failed to impersonate the client (Status
0x%lx)\n");
+ DPRINT1("NtOpenThreadTokenEx(): Failed to impersonate the client (Status
0x%lx)\n", Status);
}
}
diff --git a/ntoskrnl/wmi/smbios.c b/ntoskrnl/wmi/smbios.c
index 389678d4c01..b9aafae5647 100644
--- a/ntoskrnl/wmi/smbios.c
+++ b/ntoskrnl/wmi/smbios.c
@@ -182,7 +182,8 @@ WmipGetRawSMBiosTableData(
'BTMS');
if (BiosTables == NULL)
{
- DPRINT1("Failed to allocate %lu bytes for the SMBIOS table\n");
+ DPRINT1("Failed to allocate %lu bytes for the SMBIOS table\n",
+ HeaderSize + TableSize);
return STATUS_INSUFFICIENT_RESOURCES;
}
diff --git a/win32ss/user/ntuser/defwnd.c b/win32ss/user/ntuser/defwnd.c
index 660fd4c1494..ea6adc73844 100644
--- a/win32ss/user/ntuser/defwnd.c
+++ b/win32ss/user/ntuser/defwnd.c
@@ -414,7 +414,7 @@ UserPaintCaption(PWND pWnd, INT Flags)
* RealUserDrawCaption in order to draw the classic caption when themes
* are disabled but the themes service is enabled
*/
- TRACE("UDCB Flags %08x\n");
+ TRACE("UDCB Flags %08x\n", Flags);
co_IntSendMessage(UserHMGetHandle(pWnd), WM_NCUAHDRAWCAPTION, Flags, 0);
}
else