diff --git a/reactos/drivers/network/ndis/ndis/miniport.c b/reactos/drivers/network/ndis/ndis/miniport.c index 05c750d8ebe..2a9934c355e 100644 --- a/reactos/drivers/network/ndis/ndis/miniport.c +++ b/reactos/drivers/network/ndis/ndis/miniport.c @@ -2109,6 +2109,7 @@ NdisIDeviceIoControl( PLOGICAL_ADAPTER Adapter = (PLOGICAL_ADAPTER)DeviceObject->DeviceExtension; PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp); NDIS_STATUS Status = STATUS_NOT_SUPPORTED; + ULONG Written; Irp->IoStatus.Information = 0; @@ -2121,7 +2122,8 @@ NdisIDeviceIoControl( *(PNDIS_OID)Irp->AssociatedIrp.SystemBuffer, Stack->Parameters.DeviceIoControl.OutputBufferLength, MmGetSystemAddressForMdl(Irp->MdlAddress), - &Irp->IoStatus.Information); + &Written); + Irp->IoStatus.Information = Written; break; default: diff --git a/reactos/drivers/network/ndis/ndis/misc.c b/reactos/drivers/network/ndis/ndis/misc.c index f8b05a80849..dca3726dcba 100644 --- a/reactos/drivers/network/ndis/ndis/misc.c +++ b/reactos/drivers/network/ndis/ndis/misc.c @@ -426,7 +426,7 @@ NdisInterlockedPopEntrySList( * NDIS 5.0 */ { - return ExInterlockedPopEntrySList ( ListHead, Lock ); + return (PSINGLE_LIST_ENTRY)ExInterlockedPopEntrySList ( ListHead, Lock ); } @@ -447,7 +447,7 @@ NdisInterlockedPushEntrySList( * NDIS 5.0 */ { - return ExInterlockedPushEntrySList ( ListHead, ListEntry, Lock ); + return (PSINGLE_LIST_ENTRY)ExInterlockedPushEntrySList ( ListHead, (PSLIST_ENTRY)ListEntry, Lock ); } diff --git a/reactos/drivers/network/tcpip/datalink/lan.c b/reactos/drivers/network/tcpip/datalink/lan.c index fd0b818ac1b..890330e202d 100644 --- a/reactos/drivers/network/tcpip/datalink/lan.c +++ b/reactos/drivers/network/tcpip/datalink/lan.c @@ -684,7 +684,7 @@ VOID LANTransmit( if (Adapter->MTU < Size) { /* This is NOT a pointer. MSDN explicitly says so. */ NDIS_PER_PACKET_INFO_FROM_PACKET(NdisPacket, - TcpLargeSendPacketInfo) = (PVOID)((ULONG)Adapter->MTU); + TcpLargeSendPacketInfo) = (PVOID)((ULONG_PTR)Adapter->MTU); } TcpipAcquireSpinLock( &Adapter->Lock, &OldIrql ); diff --git a/reactos/drivers/video/displays/framebuf_new/framebuf_new.rbuild b/reactos/drivers/video/displays/framebuf_new/framebuf_new.rbuild index 991954e44e2..de7c4a1d3be 100644 --- a/reactos/drivers/video/displays/framebuf_new/framebuf_new.rbuild +++ b/reactos/drivers/video/displays/framebuf_new/framebuf_new.rbuild @@ -10,10 +10,12 @@ pointer.c screen.c framebuf_new.rc - - -mrtd - -fno-builtin - -Wno-unused-variable - + + + -mrtd + -fno-builtin + -Wno-unused-variable + + driver.h diff --git a/reactos/drivers/video/font/bmfd/font.c b/reactos/drivers/video/font/bmfd/font.c index 4760fac40a9..3afdc4fb360 100644 --- a/reactos/drivers/video/font/bmfd/font.c +++ b/reactos/drivers/video/font/bmfd/font.c @@ -389,7 +389,7 @@ BmfdQueryFontTree( { PBMFD_FILE pfile = (PBMFD_FILE)iFile; PBMFD_FACE pface; - ULONG i, j, cjOffset, cjSize, cGlyphs, cRuns; + ULONG i, j, cjSize, cGlyphs, cRuns; CHAR ch, chFirst, ach[256]; WCHAR wc, awc[256]; PFD_GLYPHSET pGlyphSet; @@ -475,14 +475,13 @@ BmfdQueryFontTree( pwcrun[0].wcLow = awc[0]; pwcrun[0].cGlyphs = 1; pwcrun[0].phg = phglyphs; - phglyphs[0] = (HGLYPH)pface->pCharTable; + phglyphs[0] = 0; /* Walk through all supported chars */ for (i = 1, j = 0; i < cGlyphs; i++) { - /* Use pointer to glyph entry as hglyph */ - cjOffset = (ach[i] - chFirst) * pface->cjEntrySize; - phglyphs[i] = (HGLYPH)(pface->pCharTable + cjOffset); + /* Use offset to glyph entry as hglyph */ + phglyphs[i] = (ach[i] - chFirst) * pface->cjEntrySize; /* Check whether we can append the wchar to a run */ if (awc[i] == awc[i - 1] + 1) diff --git a/reactos/drivers/video/font/bmfd/glyph.c b/reactos/drivers/video/font/bmfd/glyph.c index fc88b45b710..a2ce39f157f 100644 --- a/reactos/drivers/video/font/bmfd/glyph.c +++ b/reactos/drivers/video/font/bmfd/glyph.c @@ -80,7 +80,7 @@ BmfdQueryGlyphAndBitmap( ULONG cjSize) { PBMFD_FACE pface = pfont->pface; - PGLYPHENTRY pge = (PGLYPHENTRY)hg; + PGLYPHENTRY pge = (PGLYPHENTRY)(pface->pCharTable + hg); ULONG xSrc, ySrc, cxSrc, cySrc; ULONG xDst, yDst, cxDst, cyDst; ULONG xScale, yScale; diff --git a/reactos/drivers/video/videoprt/agp.c b/reactos/drivers/video/videoprt/agp.c index ff390af0932..768e6d92f0a 100644 --- a/reactos/drivers/video/videoprt/agp.c +++ b/reactos/drivers/video/videoprt/agp.c @@ -275,7 +275,7 @@ IntAgpCommitVirtual( else /* ProcessHandle != NULL */ { /* Release some virtual memory */ - ULONG Size = Pages * PAGE_SIZE; + SIZE_T Size = Pages * PAGE_SIZE; ULONG OffsetInBytes = Offset * PAGE_SIZE; BaseAddress = (PVOID)((ULONG_PTR)VirtualMapping->MappedAddress + OffsetInBytes); @@ -349,7 +349,7 @@ IntAgpFreeVirtual( else /* ProcessHandle != NULL */ { /* Unmap the section view */ - ULONG Size = Pages * PAGE_SIZE; + SIZE_T Size = Pages * PAGE_SIZE; ULONG OffsetInBytes = Offset * PAGE_SIZE; BaseAddress = (PVOID)((ULONG_PTR)VirtualMapping->MappedAddress + OffsetInBytes); @@ -400,7 +400,7 @@ IntAgpReleaseVirtual( else /* ProcessHandle != NULL */ { /* Release the allocated virtual memory */ - ULONG Size = VirtualMapping->AgpMapping->NumberOfPages * PAGE_SIZE; + SIZE_T Size = VirtualMapping->AgpMapping->NumberOfPages * PAGE_SIZE; Status = ZwFreeVirtualMemory(VirtualMapping->ProcessHandle, &VirtualMapping->MappedAddress, &Size, MEM_RELEASE); @@ -452,7 +452,7 @@ IntAgpReserveVirtual( else /* ProcessHandle != NULL */ { /* Reserve memory for usermode */ - ULONG Size = AgpMapping->NumberOfPages * PAGE_SIZE; + SIZE_T Size = AgpMapping->NumberOfPages * PAGE_SIZE; MappedAddress = NULL; Status = ZwAllocateVirtualMemory(ProcessHandle, &MappedAddress, 0, &Size, MEM_RESERVE, PAGE_NOACCESS); diff --git a/reactos/drivers/video/videoprt/int10.c b/reactos/drivers/video/videoprt/int10.c index 7930c87ca72..5f5458aa89f 100644 --- a/reactos/drivers/video/videoprt/int10.c +++ b/reactos/drivers/video/videoprt/int10.c @@ -24,6 +24,7 @@ /* PRIVATE FUNCTIONS **********************************************************/ +#if defined(_M_IX86) VP_STATUS NTAPI IntInt10AllocateBuffer( IN PVOID Context, @@ -190,6 +191,7 @@ IntInt10CallBios( if (NT_SUCCESS(Status)) return NO_ERROR; return ERROR_INVALID_PARAMETER; } +#endif /* PUBLIC FUNCTIONS ***********************************************************/ @@ -202,6 +204,7 @@ VideoPortInt10( IN PVOID HwDeviceExtension, IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments) { +#if defined(_M_IX86) CONTEXT BiosContext; NTSTATUS Status; PKPROCESS CallingProcess = (PKPROCESS)PsGetCurrentProcess(); @@ -243,4 +246,9 @@ VideoPortInt10( IntDetachFromCSRSS(&CallingProcess, &ApcState); if (NT_SUCCESS(Status)) return NO_ERROR; return ERROR_INVALID_PARAMETER; +#else + /* Not implemented for anything else than X86*/ + DPRINT1("Int10 not available on non-x86!\n"); + return ERROR_INVALID_FUNCTION; +#endif } diff --git a/reactos/drivers/video/videoprt/interrupt.c b/reactos/drivers/video/videoprt/interrupt.c index 54a5b9566cb..b15ebdf974c 100644 --- a/reactos/drivers/video/videoprt/interrupt.c +++ b/reactos/drivers/video/videoprt/interrupt.c @@ -110,6 +110,7 @@ VP_STATUS NTAPI VideoPortEnableInterrupt(IN PVOID HwDeviceExtension) { +#ifndef _M_AMD64 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension; BOOLEAN InterruptValid; @@ -133,6 +134,11 @@ VideoPortEnableInterrupt(IN PVOID HwDeviceExtension) /* Return to caller */ return NO_ERROR; +#else + /* FIXME: Function still present? If so what to use instead of HalEnableSystemInterrupt? */ + UNIMPLEMENTED; + return ERROR_INVALID_ACCESS; +#endif } /* @@ -142,6 +148,7 @@ VP_STATUS NTAPI VideoPortDisableInterrupt(IN PVOID HwDeviceExtension) { +#ifndef _M_AMD64 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension; /* Get the device extension */ @@ -158,4 +165,9 @@ VideoPortDisableInterrupt(IN PVOID HwDeviceExtension) HalDisableSystemInterrupt(DeviceExtension->InterruptVector, 0); return NO_ERROR; +#else + /* FIXME: Function still present? If so what to use instead of HalDisableSystemInterrupt? */ + UNIMPLEMENTED; + return ERROR_INVALID_ACCESS; +#endif } diff --git a/reactos/drivers/video/videoprt/resource.c b/reactos/drivers/video/videoprt/resource.c index 2ed6417c2ef..b17edb75500 100644 --- a/reactos/drivers/video/videoprt/resource.c +++ b/reactos/drivers/video/videoprt/resource.c @@ -163,7 +163,7 @@ IntVideoPortMapMemory( if (Status) *Status = NO_ERROR; - return (PVOID)TranslatedAddress.u.LowPart; + return (PVOID)(ULONG_PTR)TranslatedAddress.u.LowPart; } /* user space */ @@ -271,7 +271,7 @@ IntVideoPortUnmapMemory( Status = ZwUnmapViewOfSection(NtCurrentProcess(), MappedAddress); if (!NT_SUCCESS(Status)) { - WARN_(VIDEOPRT, "Warning: Mapping for address 0x%x not found!\n", (ULONG)MappedAddress); + WARN_(VIDEOPRT, "Warning: Mapping for address 0x%p not found!\n", MappedAddress); } } diff --git a/reactos/drivers/video/videoprt/services.c b/reactos/drivers/video/videoprt/services.c index fbf69a8aff2..5b9f3cf5036 100644 --- a/reactos/drivers/video/videoprt/services.c +++ b/reactos/drivers/video/videoprt/services.c @@ -43,6 +43,7 @@ VideoPortQueryServices( switch (ServicesType) { +#if defined(_M_IX86) case VideoPortServicesInt10: if (Interface->Version >= VIDEO_PORT_INT10_INTERFACE_VERSION_1 || Interface->Size >= sizeof(VIDEO_PORT_INT10_INTERFACE)) @@ -60,7 +61,7 @@ VideoPortQueryServices( return NO_ERROR; } break; - +#endif case VideoPortServicesAGP: if ((Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_2 && Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE_2)) || diff --git a/reactos/drivers/video/videoprt/videoprt.c b/reactos/drivers/video/videoprt/videoprt.c index 19a64f7b53c..33c6fedc7f8 100644 --- a/reactos/drivers/video/videoprt/videoprt.c +++ b/reactos/drivers/video/videoprt/videoprt.c @@ -330,7 +330,7 @@ IntVideoPortFindAdapter( { WCHAR DeviceVideoBuffer[20]; PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension; - ULONG Size; + SIZE_T Size; NTSTATUS Status; VIDEO_PORT_CONFIG_INFO ConfigInfo; SYSTEM_BASIC_INFORMATION SystemBasicInfo; diff --git a/reactos/drivers/wdm/audio/legacy/wdmaud/interface.h b/reactos/drivers/wdm/audio/legacy/wdmaud/interface.h index 211045cf0c9..aa5e7b25f28 100644 --- a/reactos/drivers/wdm/audio/legacy/wdmaud/interface.h +++ b/reactos/drivers/wdm/audio/legacy/wdmaud/interface.h @@ -26,7 +26,7 @@ typedef struct { KSSTREAM_HEADER Header; SOUND_DEVICE_TYPE DeviceType; - ULONG DeviceIndex; + ULONG_PTR DeviceIndex; HANDLE hDevice; ULONG DeviceCount;