1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[mingw] fix array subscript out of bound warning of MinGW32

This commit is contained in:
Pete Batard 2011-11-24 20:26:20 +00:00
parent 85f065864e
commit 5216eac9f2

View file

@ -503,11 +503,8 @@ BOOL CreatePartition(HANDLE hDrive)
DriveLayoutEx->PartitionEntry[0].RewritePartition = TRUE; DriveLayoutEx->PartitionEntry[0].RewritePartition = TRUE;
DriveLayoutEx->PartitionEntry[0].Mbr.PartitionType = 0x83; // TODO DriveLayoutEx->PartitionEntry[0].Mbr.PartitionType = 0x83; // TODO
DriveLayoutEx->PartitionEntry[0].Mbr.HiddenSectors = nbHidden; // TODO DriveLayoutEx->PartitionEntry[0].Mbr.HiddenSectors = nbHidden; // TODO
// For the remaining partitions, PartitionStyle & PartitionType have already
// For the remaining partitions, PartitionType has already been zeroed (= set to unused) // been zeroed => set to MBR/unused
DriveLayoutEx->PartitionEntry[1].PartitionStyle = PARTITION_STYLE_MBR;
DriveLayoutEx->PartitionEntry[2].PartitionStyle = PARTITION_STYLE_MBR;
DriveLayoutEx->PartitionEntry[3].PartitionStyle = PARTITION_STYLE_MBR;
r = DeviceIoControl(hDrive, IOCTL_DISK_SET_DRIVE_LAYOUT_EX, r = DeviceIoControl(hDrive, IOCTL_DISK_SET_DRIVE_LAYOUT_EX,
layout, sizeof(layout), NULL, 0, &size, NULL ); layout, sizeof(layout), NULL, 0, &size, NULL );