Author: cwittich
Date: Tue Sep 4 03:56:04 2007
New Revision: 28830
URL:
http://svn.reactos.org/svn/reactos?rev=28830&view=rev
Log:
fix some issues found by prefast
Modified:
trunk/reactos/drivers/storage/floppy/csqrtns.c
trunk/reactos/drivers/storage/floppy/floppy.c
trunk/reactos/drivers/storage/floppy/hardware.c
trunk/reactos/drivers/storage/floppy/readwrite.c
Modified: trunk/reactos/drivers/storage/floppy/csqrtns.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/floppy/csq…
==============================================================================
--- trunk/reactos/drivers/storage/floppy/csqrtns.c (original)
+++ trunk/reactos/drivers/storage/floppy/csqrtns.c Tue Sep 4 03:56:04 2007
@@ -70,7 +70,7 @@
*/
{
UNREFERENCED_PARAMETER(UnusedCsq);
- DPRINT("CSQ: Removing IRP 0x%x\n", Irp);
+ DPRINT("CSQ: Removing IRP 0x%p\n", Irp);
RemoveEntryList(&Irp->Tail.Overlay.ListEntry);
}
@@ -148,7 +148,7 @@
*/
{
UNREFERENCED_PARAMETER(UnusedCsq);
- DPRINT("CSQ: Canceling irp 0x%x\n", Irp);
+ DPRINT("CSQ: Canceling irp 0x%p\n", Irp);
Irp->IoStatus.Status = STATUS_CANCELLED;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
@@ -173,7 +173,7 @@
*/
{
UNREFERENCED_PARAMETER(UnusedCsq);
- DPRINT("CSQ: Inserting IRP 0x%x\n", Irp);
+ DPRINT("CSQ: Inserting IRP 0x%p\n", Irp);
InsertTailList(&IrpQueue, &Irp->Tail.Overlay.ListEntry);
KeReleaseSemaphore(&QueueSemaphore, 0, 1, FALSE);
}
Modified: trunk/reactos/drivers/storage/floppy/floppy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/floppy/flo…
==============================================================================
--- trunk/reactos/drivers/storage/floppy/floppy.c (original)
+++ trunk/reactos/drivers/storage/floppy/floppy.c Tue Sep 4 03:56:04 2007
@@ -674,7 +674,7 @@
PAGED_CODE();
ASSERT(ControllerInfo);
- DPRINT("floppy: InitController called with Controller 0x%x\n",
ControllerInfo);
+ DPRINT("floppy: InitController called with Controller 0x%p\n",
ControllerInfo);
KeClearEvent(&ControllerInfo->SynchEvent);
@@ -785,7 +785,7 @@
*/
for(i = 0; i < ControllerInfo->NumberOfDrives; i++)
{
- DPRINT("floppy: InitController: recalibrating drive 0x%x on controller
0x%x\n", i, ControllerInfo);
+ DPRINT("floppy: InitController: recalibrating drive 0x%x on controller
0x%p\n", i, ControllerInfo);
Recalibrate(&ControllerInfo->DriveInfo[i]);
}
@@ -849,7 +849,7 @@
/* Must set up the DPC before we connect the interrupt */
KeInitializeDpc(&gControllerInfo[i].Dpc, DpcForIsr, &gControllerInfo[i]);
- DPRINT("floppy: Connecting interrupt %d to controller%d (object 0x%x)\n",
gControllerInfo[i].MappedVector,
+ DPRINT("floppy: Connecting interrupt %d to controller%d (object 0x%p)\n",
gControllerInfo[i].MappedVector,
i, &gControllerInfo[i]);
/* NOTE: We cannot share our interrupt, even on level-triggered buses. See Isr()
for details. */
@@ -916,8 +916,10 @@
* 14: 3,2
* 15: 3,3
*/
+
DriveNumber = (UCHAR)(i*4 + j); /* loss of precision is OK; there are only 16 of
'em */
+ RtlZeroMemory(&DeviceNameBuf, MAX_DEVICE_NAME * sizeof(WCHAR));
swprintf(DeviceNameBuf, L"\\Device\\Floppy%d", DriveNumber);
RtlInitUnicodeString(&DeviceName, DeviceNameBuf);
@@ -930,7 +932,7 @@
continue; /* continue on to next drive */
}
- DPRINT("floppy: AddControllers: New device: %S (0x%x)\n", DeviceNameBuf,
gControllerInfo[i].DriveInfo[j].DeviceObject);
+ DPRINT("floppy: AddControllers: New device: %S (0x%p)\n", DeviceNameBuf,
gControllerInfo[i].DriveInfo[j].DeviceObject);
/* 3b.5: Create an ARC path in case we're booting from this drive */
swprintf(gControllerInfo[i].DriveInfo[j].ArcPathBuffer,
Modified: trunk/reactos/drivers/storage/floppy/hardware.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/floppy/har…
==============================================================================
--- trunk/reactos/drivers/storage/floppy/hardware.c (original)
+++ trunk/reactos/drivers/storage/floppy/hardware.c Tue Sep 4 03:56:04 2007
@@ -1057,7 +1057,7 @@
* - Wake up with a hardware reset
*/
{
- DPRINT("floppy: HwPowerOff called on controller 0x%x\n", ControllerInfo);
+ DPRINT("floppy: HwPowerOff called on controller 0x%p\n", ControllerInfo);
WRITE_PORT_UCHAR(ControllerInfo->BaseAddress + DATA_RATE_SELECT_REGISTER,
DRSR_POWER_DOWN);
Modified: trunk/reactos/drivers/storage/floppy/readwrite.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/floppy/rea…
==============================================================================
--- trunk/reactos/drivers/storage/floppy/readwrite.c (original)
+++ trunk/reactos/drivers/storage/floppy/readwrite.c Tue Sep 4 03:56:04 2007
@@ -291,7 +291,7 @@
PAGED_CODE();
- DPRINT("floppy: RWSeekToCylinder called drive 0x%x cylinder %d\n", DriveInfo,
Cylinder);
+ DPRINT("floppy: RWSeekToCylinder called drive 0x%p cylinder %d\n", DriveInfo,
Cylinder);
/* Clear any spurious interrupts */
KeClearEvent(&DriveInfo->ControllerInfo->SynchEvent);