From 2d6bbdc6ed4050e75e30509348901712f5f57a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Thu, 23 May 2024 15:03:26 +0200 Subject: [PATCH] [PARTMGR] Fix x64 build warning warning C4267: 'function': conversion from 'size_t' to 'ULONG', possible loss of data' The OutputBufferLength member that was temporarily stored in outBufferLength is already a ULONG, and IssueSyncIoControlRequest() takes the length as a ULONG. So there is no need to use 'size_t' here. --- drivers/storage/partmgr/partmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/storage/partmgr/partmgr.c b/drivers/storage/partmgr/partmgr.c index c606a46ead0..4eee95e11fd 100644 --- a/drivers/storage/partmgr/partmgr.c +++ b/drivers/storage/partmgr/partmgr.c @@ -367,7 +367,7 @@ FdoIoctlDiskGetDriveGeometryEx( // as disk.sys doesn't really know about the partition table on a disk PDISK_GEOMETRY_EX_INTERNAL geometryEx = Irp->AssociatedIrp.SystemBuffer; - size_t outBufferLength = ioStack->Parameters.DeviceIoControl.OutputBufferLength; + ULONG outBufferLength = ioStack->Parameters.DeviceIoControl.OutputBufferLength; NTSTATUS status; status = IssueSyncIoControlRequest(IOCTL_DISK_GET_DRIVE_GEOMETRY_EX,