[NTFS] - Add some fixes and improvements to attribute.c from CR-123:
[reactos.git] / drivers / base / beep / beep.c
index 45addc6..e5e8e42 100644 (file)
@@ -38,6 +38,10 @@ BeepDPC(IN PKDPC Dpc,
 {
     PDEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension;
 
+    UNREFERENCED_PARAMETER(Dpc);
+    UNREFERENCED_PARAMETER(SystemArgument1);
+    UNREFERENCED_PARAMETER(SystemArgument2);
+
     /* Stop the beep */
     HalMakeBeep(0);
 
@@ -126,7 +130,7 @@ BeepCancel(IN PDEVICE_OBJECT DeviceObject,
     }
     else
     {
-        /* Otherwise, remove the packet from the queue and relelase the lock */
+        /* Otherwise, remove the packet from the queue and release the lock */
         KeRemoveEntryDeviceQueue(&DeviceObject->DeviceQueue,
                                  &Irp->Tail.Overlay.DeviceQueueEntry);
         IoReleaseCancelSpinLock(Irp->CancelIrql);
@@ -230,7 +234,7 @@ BeepDeviceControl(IN PDEVICE_OBJECT DeviceObject,
         }
         else if ((BeepParam->Frequency != 0) && !(BeepParam->Duration))
         {
-            /* No duration, return imemdiately */
+            /* No duration, return immediately */
             Status = STATUS_SUCCESS;
         }
         else
@@ -335,7 +339,7 @@ BeepStartIo(IN PDEVICE_OBJECT DeviceObject,
         {
             /* Beep successful, queue a DPC to stop it */
             Status = STATUS_SUCCESS;
-            DueTime.QuadPart = BeepParam->Duration * -10000;
+            DueTime.QuadPart = BeepParam->Duration * -10000LL;
             InterlockedIncrement(&DeviceExtension->TimerActive);
             KeSetTimer(&DeviceExtension->Timer, DueTime, &DeviceObject->Dpc);
         }
@@ -368,6 +372,8 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject,
     UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\Beep");
     NTSTATUS Status;
 
+    UNREFERENCED_PARAMETER(RegistryPath);
+
     /* Create the device */
     Status = IoCreateDevice(DriverObject,
                             sizeof(DEVICE_EXTENSION),