Author: sserapion Date: Sat Jul 26 01:08:04 2008 New Revision: 34803
URL: http://svn.reactos.org/svn/reactos?rev=34803&view=rev Log: Fix more warnings. Convert pciidex to use spec file. NOTE: drivers need to be carefully reviewed for 64bit safety. There is a lot of stuff that can kill us that won't show up in any compiler, knowing ros we probably have at least some issues. Everything but network/ compiles error free.
Added: branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.spec (with props) Removed: branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.def Modified: branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/keyboard.c branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/setup.c branches/ros-amd64-bringup/reactos/drivers/serial/serenum/detect.c branches/ros-amd64-bringup/reactos/drivers/storage/class/class2/class2.c branches/ros-amd64-bringup/reactos/drivers/storage/ide/atapi/atapi.c branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.rbuild branches/ros-amd64-bringup/reactos/drivers/storage/port/diskdump/diskdump.c
Modified: branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/keyboard.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/driver... ============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/keyboard.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/keyboard.c [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -218,7 +218,7 @@ /* Register GUID_DEVICE_SYS_BUTTON interface and report capability */ if (DeviceExtension->NewCaps != DeviceExtension->ReportedCaps) { - WaitingIrp = InterlockedExchangePointer(&DeviceExtension->PowerIrp, NULL); + WaitingIrp = InterlockedExchangePointer((PVOID)&DeviceExtension->PowerIrp, NULL); if (WaitingIrp) { /* Cancel the current power irp, as capability changed */ @@ -273,7 +273,7 @@ }
/* Directly complete the IOCTL_GET_SYS_BUTTON_EVENT Irp (if any) */ - WaitingIrp = InterlockedExchangePointer(&DeviceExtension->PowerIrp, NULL); + WaitingIrp = InterlockedExchangePointer((PVOID)&DeviceExtension->PowerIrp, NULL); if (WaitingIrp) { PULONG pEvent = (PULONG)WaitingIrp->AssociatedIrp.SystemBuffer; @@ -447,7 +447,7 @@ else { WaitingIrp = InterlockedCompareExchangePointer( - &DeviceExtension->PowerIrp, + (PVOID)&DeviceExtension->PowerIrp, Irp, NULL); /* Check if an Irp is already pending */ @@ -465,7 +465,7 @@ PowerKey = InterlockedExchange((PLONG)&DeviceExtension->LastPowerKey, 0); if (PowerKey != 0) { - (VOID)InterlockedCompareExchangePointer(&DeviceExtension->PowerIrp, NULL, Irp); + (VOID)InterlockedCompareExchangePointer((PVOID)&DeviceExtension->PowerIrp, NULL, Irp); *(PULONG)Irp->AssociatedIrp.SystemBuffer = PowerKey; Status = STATUS_SUCCESS; Irp->IoStatus.Status = Status;
Modified: branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/setup.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/driver... ============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/setup.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/input/i8042prt/setup.c [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -99,7 +99,7 @@ AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].Flags = CM_RESOURCE_INTERRUPT_LATCHED; AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Level = KEYBOARD_IRQ; AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Vector = 0; - AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Affinity = (KAFFINITY)-1; + AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Affinity = (LONG_PTR)(KAFFINITY)-1;
/* Create default resource list translated */ AllocatedResourcesTranslated = ExAllocatePoolWithTag(PagedPool, ResourceListSize, I8042PRT_TAG); @@ -115,7 +115,7 @@ AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Level, AllocatedResources->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Vector, (PKIRQL)&AllocatedResourcesTranslated->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Level, - &AllocatedResourcesTranslated->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Affinity); + (PVOID)&AllocatedResourcesTranslated->List[0].PartialResourceList.PartialDescriptors[2].u.Interrupt.Affinity);
/* Send IRP_MN_START_DEVICE */ TopDeviceObject = IoGetAttachedDeviceReference(Pdo);
Modified: branches/ros-amd64-bringup/reactos/drivers/serial/serenum/detect.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/driver... ============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/serial/serenum/detect.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/serial/serenum/detect.c [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -532,7 +532,7 @@
/* Fill the read buffer */ TRACE_(SERENUM, "Fill the read buffer\n"); - Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), &Count); + Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), (PVOID)&Count); if (!NT_SUCCESS(Status)) goto ByeBye;
RtlInitUnicodeString(&DeviceId, L"Serenum\Mouse");
Modified: branches/ros-amd64-bringup/reactos/drivers/storage/class/class2/class2.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/driver... ============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/storage/class/class2/class2.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/storage/class/class2/class2.c [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -1504,7 +1504,7 @@ srb, irpStack->MajorFunction, irpStack->MajorFunction == IRP_MJ_DEVICE_CONTROL ? irpStack->Parameters.DeviceIoControl.IoControlCode : 0, - MAXIMUM_RETRIES - ((ULONG)irpStack->Parameters.Others.Argument4), + MAXIMUM_RETRIES - ((ULONG_PTR)irpStack->Parameters.Others.Argument4), &status);
// @@ -1519,7 +1519,7 @@ retry = TRUE; }
- if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG)irpStack->Parameters.Others.Argument4-1))) { + if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG_PTR)irpStack->Parameters.Others.Argument4-1))) {
// // Retry request. @@ -1656,7 +1656,7 @@ srb, irpStack->MajorFunction, irpStack->MajorFunction == IRP_MJ_DEVICE_CONTROL ? irpStack->Parameters.DeviceIoControl.IoControlCode : 0, - MAXIMUM_RETRIES - ((ULONG)irpStack->Parameters.Others.Argument4), + MAXIMUM_RETRIES - ((ULONG_PTR)irpStack->Parameters.Others.Argument4), &status);
// @@ -1671,7 +1671,7 @@ retry = TRUE; }
- if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG)irpStack->Parameters.Others.Argument4-1))) { + if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG_PTR)irpStack->Parameters.Others.Argument4-1))) {
// // Retry request. If the class driver has supplied a StartIo,
Modified: branches/ros-amd64-bringup/reactos/drivers/storage/ide/atapi/atapi.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/driver... ============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/storage/ide/atapi/atapi.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/storage/ide/atapi/atapi.c [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -927,7 +927,7 @@ { PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension; PIDE_REGISTERS_1 baseIoAddress1 = deviceExtension->BaseIoAddress1[Srb->TargetId >> 1]; - PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[Srb->TargetId >> 1]; + //PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[Srb->TargetId >> 1]; ULONG i; UCHAR errorByte; UCHAR srbStatus; @@ -1435,7 +1435,7 @@ // is clear and then just wait for an arbitrary amount of time! // if (deviceExtension->DeviceFlags[i] & DFLAGS_ATAPI_DEVICE) { - PIDE_REGISTERS_1 baseIoAddress1 = deviceExtension->BaseIoAddress1[i >> 1]; + //PIDE_REGISTERS_1 baseIoAddress1 = deviceExtension->BaseIoAddress1[i >> 1]; PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[i >> 1]; ULONG waitCount;
@@ -2139,7 +2139,7 @@ PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension; PULONG adapterCount = (PULONG)Context; PUCHAR ioSpace; - ULONG i,j; + ULONG i; ULONG irq; ULONG portBase; ULONG retryCount; @@ -2600,12 +2600,12 @@
--*/ { - PHW_DEVICE_EXTENSION deviceExtension = DeviceExtension; - ULONG rangeNumber = 0; + //PHW_DEVICE_EXTENSION deviceExtension = DeviceExtension; + //ULONG rangeNumber = 0; ULONG pciBuffer; ULONG slotNumber; ULONG functionNumber; - ULONG status; + //ULONG status; PCI_SLOT_NUMBER slotData; PPCI_COMMON_CONFIG pciData; UCHAR vendorString[5]; @@ -2668,8 +2668,8 @@
vendorStrPtr = vendorString; deviceStrPtr = deviceString; - AtapiHexToString(pciData->VendorID, &vendorStrPtr); - AtapiHexToString(pciData->DeviceID, &deviceStrPtr); + AtapiHexToString(pciData->VendorID, (PVOID)&vendorStrPtr); + AtapiHexToString(pciData->DeviceID, (PVOID)&deviceStrPtr);
DebugPrint((2, "FindBrokenController: Bus %x Slot %x Function %x Vendor %s Product %s\n", @@ -2747,7 +2747,7 @@
{ PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension; - ULONG nativeModeAdapterTableIndex = (ULONG)Context; + ULONG nativeModeAdapterTableIndex = (ULONG_PTR)Context; ULONG channel; PUCHAR ioSpace; BOOLEAN atapiOnly, @@ -2803,8 +2803,8 @@
vendorStrPtr = vendorString; deviceStrPtr = deviceString; - AtapiHexToString(pciData.VendorID, &vendorStrPtr); - AtapiHexToString(pciData.DeviceID, &deviceStrPtr); + AtapiHexToString(pciData.VendorID, (PVOID)&vendorStrPtr); + AtapiHexToString(pciData.DeviceID, (PVOID)&deviceStrPtr);
// // Compare strings. @@ -3515,7 +3515,7 @@ ULONG status; ULONG i; UCHAR statusByte,interruptReason; - BOOLEAN commandComplete = FALSE; + //BOOLEAN commandComplete = FALSE; BOOLEAN atapiDev = FALSE;
if (srb) { @@ -4771,7 +4771,7 @@ { PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension; PIDE_REGISTERS_1 baseIoAddress1 = deviceExtension->BaseIoAddress1[Srb->TargetId >> 1]; - PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[Srb->TargetId >> 1]; + //PIDE_REGISTERS_2 baseIoAddress2 = deviceExtension->BaseIoAddress2[Srb->TargetId >> 1]; ULONG startingSector; ULONG sectors; ULONG endSector; @@ -5759,7 +5759,7 @@
{ PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension; - ULONG status; + //ULONG status; PSENSE_DATA senseBuffer = (PSENSE_DATA)Srb->DataBuffer;
@@ -6258,7 +6258,7 @@ newStatus = ScsiPortInitialize(DriverObject, Argument2, &hwInitializationData, - (PVOID) i); + (PVOID)(ULONG_PTR)i); if (newStatus < statusToReturn) statusToReturn = newStatus; }
Removed: branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.def URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/driver... ============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.def [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.def (removed) @@ -1,8 +1,0 @@ -LIBRARY pciidex.sys - -EXPORTS -PciIdeXGetBusData@16 -PciIdeXInitialize@16 -PciIdeXSetBusData@20 - -;EOF
Modified: branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.rbuild URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/driver... ============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.rbuild [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -1,8 +1,9 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd"> <module name="pciidex" type="kernelmodedriver" installbase="system32/drivers" installname="pciidex.sys"> - <importlibrary definition="pciidex.def" /> + <importlibrary definition="pciidex.spec.def" /> <library>ntoskrnl</library> + <file>pciidex.spec</file> <file>fdo.c</file> <file>miniport.c</file> <file>misc.c</file>
Added: branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.spec URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/driver... ============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.spec (added) +++ branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.spec [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -1,0 +1,5 @@ + +@ stdcall PciIdeXGetBusData(ptr ptr long long) +@ stdcall PciIdeXInitialize(ptr ptr ptr long) +@ stdcall PciIdeXSetBusData(ptr ptr ptr long long) +
Propchange: branches/ros-amd64-bringup/reactos/drivers/storage/ide/pciidex/pciidex.spec ------------------------------------------------------------------------------ svn:eol-style = native
Modified: branches/ros-amd64-bringup/reactos/drivers/storage/port/diskdump/diskdump.c URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/driver... ============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/storage/port/diskdump/diskdump.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/storage/port/diskdump/diskdump.c [iso-8859-1] Sat Jul 26 01:08:04 2008 @@ -366,9 +366,9 @@ } else // hint-name { - Name = (PCHAR)((ULONG)DriverBase + - *FunctionNameList + 2); - Hint = *(PUSHORT)((ULONG)DriverBase + *FunctionNameList); + Name = (PCHAR)((ULONG_PTR)DriverBase + + (ULONG_PTR)*FunctionNameList + 2); + Hint = *(PUSHORT)((ULONG_PTR)DriverBase + (ULONG_PTR)*FunctionNameList); } #if 0 DPRINT(" Hint:%04x Name:%s\n", Hint, pName);