https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a135ef5864a205c8f75fa3...
commit a135ef5864a205c8f75fa367cf3d0f0964a380ba Author: Trevor Thompson tmt256@email.vccs.edu AuthorDate: Wed Jul 13 14:49:46 2016 +0000
[NTFS] Various minor changes to fix GCC build.
svn path=/branches/GSoC_2016/NTFS/; revision=71922 --- drivers/filesystems/ntfs/mft.c | 4 ++-- drivers/filesystems/ntfs/volinfo.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/filesystems/ntfs/mft.c b/drivers/filesystems/ntfs/mft.c index c7096cc5d8..6263263dc8 100644 --- a/drivers/filesystems/ntfs/mft.c +++ b/drivers/filesystems/ntfs/mft.c @@ -202,7 +202,7 @@ InternalSetResidentAttributeLength(PNTFS_ATTR_CONTEXT AttrContext, }
// advance Destination to the final "attribute" and write the end type - (ULONG_PTR)Destination += Destination->Length; + Destination = (PNTFS_ATTR_RECORD)((ULONG_PTR)Destination + Destination->Length); Destination->Type = AttributeEnd;
// write the final marker (which shares the same offset and type as the Length field) @@ -245,7 +245,7 @@ SetAttributeDataLength(PFILE_OBJECT FileObject, ULONG NextAssignedCluster; ULONG AssignedClusters;
- NTSTATUS Status = GetLastClusterInDataRun(Fcb->Vcb, &AttrContext->Record, &LastClusterInDataRun.QuadPart); + NTSTATUS Status = GetLastClusterInDataRun(Fcb->Vcb, &AttrContext->Record, (PULONGLONG)&LastClusterInDataRun.QuadPart);
DPRINT1("GetLastClusterInDataRun returned: %I64u\n", LastClusterInDataRun.QuadPart); DPRINT1("Highest VCN of record: %I64u\n", AttrContext->Record.NonResident.HighestVCN); diff --git a/drivers/filesystems/ntfs/volinfo.c b/drivers/filesystems/ntfs/volinfo.c index d1505a5fb2..338ea84750 100644 --- a/drivers/filesystems/ntfs/volinfo.c +++ b/drivers/filesystems/ntfs/volinfo.c @@ -114,9 +114,11 @@ NtfsAllocateClusters(PDEVICE_EXTENSION DeviceExt, PFILE_RECORD_HEADER BitmapRecord; PNTFS_ATTR_CONTEXT DataContext; ULONGLONG BitmapDataSize; - PCHAR BitmapData; + PUCHAR BitmapData; ULONGLONG FreeClusters = 0; RTL_BITMAP Bitmap; + ULONG AssignedRun; + ULONG LengthWritten;
DPRINT1("NtfsAllocateClusters(%p, %lu, %lu, %p, %p)\n", DeviceExt, FirstDesiredCluster, DesiredClusters, FirstAssignedCluster, AssignedClusters);
@@ -174,8 +176,7 @@ NtfsAllocateClusters(PDEVICE_EXTENSION DeviceExt, // TODO: Observe MFT reservation zone
// Can we get one contiguous run? - ULONG AssignedRun = RtlFindClearBitsAndSet(&Bitmap, DesiredClusters, FirstDesiredCluster); - ULONG LengthWritten; + AssignedRun = RtlFindClearBitsAndSet(&Bitmap, DesiredClusters, FirstDesiredCluster);
if (AssignedRun != 0xFFFFFFFF) {