Skip to content

Commit

Permalink
[PARTMGR] Fix x64 build warning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
HBelusca committed Jun 12, 2024
1 parent ba6e9a0 commit 2d6bbdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/storage/partmgr/partmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2d6bbdc

Please sign in to comment.