diff options
author | Matt Wu <matt@ext2fsd.com> | 2017-02-21 11:19:48 +0300 |
---|---|---|
committer | Matt Wu <matt@ext2fsd.com> | 2017-02-21 11:19:48 +0300 |
commit | 1b51d6c20c7857d514df66fa1894d14ab95a0e68 (patch) | |
tree | 6ed48e0d5dcf244446dd18ed8215932d432cf20d /Ext3Fsd | |
parent | b745c4300d8ecb53e9e7ac4c67a8a3ddca371ff2 (diff) |
FIXME: compiling warnings (mostly typecast)
Diffstat (limited to 'Ext3Fsd')
-rw-r--r-- | Ext3Fsd/create.c | 3 | ||||
-rw-r--r-- | Ext3Fsd/ea.c | 15 | ||||
-rw-r--r-- | Ext3Fsd/ext4/ext4_xattr.c | 6 |
3 files changed, 13 insertions, 11 deletions
diff --git a/Ext3Fsd/create.c b/Ext3Fsd/create.c index 67ecd19..0ebde76 100644 --- a/Ext3Fsd/create.c +++ b/Ext3Fsd/create.c @@ -729,7 +729,8 @@ Ext2OverwriteEa( // // Check Ea Buffer validity. // - Status = IoCheckEaBufferValidity(EaBuffer, EaBufferLength, &Iosb->Information); + Status = IoCheckEaBufferValidity((PFILE_FULL_EA_INFORMATION)EaBuffer, + EaBufferLength, (PULONG)&Iosb->Information); if (!NT_SUCCESS(Status)) __leave; diff --git a/Ext3Fsd/ea.c b/Ext3Fsd/ea.c index e498b92..ccc671d 100644 --- a/Ext3Fsd/ea.c +++ b/Ext3Fsd/ea.c @@ -64,8 +64,8 @@ static int Ext2IterateAllEa(struct ext4_xattr_ref *xattr_ref, struct ext4_xattr_ } pEaIterator->FullEa->NextEntryOffset = 0; pEaIterator->FullEa->Flags = 0; - pEaIterator->FullEa->EaNameLength = item->name_len; - pEaIterator->FullEa->EaValueLength = item->data_size; + pEaIterator->FullEa->EaNameLength = (UCHAR)item->name_len; + pEaIterator->FullEa->EaValueLength = (USHORT)item->data_size; RtlCopyMemory(&pEaIterator->FullEa->EaName[0], item->name, item->name_len); @@ -75,8 +75,8 @@ static int Ext2IterateAllEa(struct ext4_xattr_ref *xattr_ref, struct ext4_xattr_ // Link FullEa and LastFullEa together if (pEaIterator->LastFullEa) { - pEaIterator->LastFullEa->NextEntryOffset = - (PCHAR)pEaIterator->FullEa - (PCHAR)pEaIterator->LastFullEa; + pEaIterator->LastFullEa->NextEntryOffset = (ULONG) + ((PCHAR)pEaIterator->FullEa - (PCHAR)pEaIterator->LastFullEa); } pEaIterator->LastFullEa = pEaIterator->FullEa; @@ -237,7 +237,7 @@ Ext2QueryEa ( FullEa->NextEntryOffset = 0; FullEa->Flags = 0; FullEa->EaNameLength = GetEa->EaNameLength; - FullEa->EaValueLength = ItemSize; + FullEa->EaValueLength = (USHORT)ItemSize; RtlCopyMemory(&FullEa->EaName[0], &GetEa->EaName[0], GetEa->EaNameLength); @@ -258,11 +258,12 @@ Ext2QueryEa ( ItemSize, &ItemSize )))); - FullEa->EaValueLength = ItemSize; + FullEa->EaValueLength = (USHORT)ItemSize; // Link FullEa and LastFullEa together if (LastFullEa) - LastFullEa->NextEntryOffset = (PCHAR)FullEa - (PCHAR)LastFullEa; + LastFullEa->NextEntryOffset = (ULONG)((PCHAR)FullEa - + (PCHAR)LastFullEa); LastFullEa = FullEa; FullEa = (PFILE_FULL_EA_INFORMATION) diff --git a/Ext3Fsd/ext4/ext4_xattr.c b/Ext3Fsd/ext4/ext4_xattr.c index 0cf333a..e1a26e9 100644 --- a/Ext3Fsd/ext4/ext4_xattr.c +++ b/Ext3Fsd/ext4/ext4_xattr.c @@ -28,7 +28,7 @@ static ext4_fsblk_t ext4_new_meta_blocks(void *icb, struct inode *inode, status = Ext2NewBlock((PEXT2_IRP_CONTEXT)icb, inode->i_sb->s_priv, - 0, goal, + 0, (ULONG)goal, &block, &blockcnt); if (count) @@ -45,7 +45,7 @@ static ext4_fsblk_t ext4_new_meta_blocks(void *icb, struct inode *inode, static void ext4_free_blocks(void *icb, struct inode *inode, ext4_fsblk_t block, int count, int flags) { - Ext2FreeBlock((PEXT2_IRP_CONTEXT)icb, inode->i_sb->s_priv, block, count); + Ext2FreeBlock((PEXT2_IRP_CONTEXT)icb, inode->i_sb->s_priv, (ULONG)block, count); inode->i_blocks -= count * (inode->i_sb->s_blocksize >> 9); return; } @@ -861,7 +861,7 @@ static int ext4_xattr_write_to_disk(struct ext4_xattr_ref *xattr_ref) BOOL block_modified = FALSE; void *ibody_data = NULL; void *block_data = NULL; - __s32 inode_size_rem, block_size_rem; + size_t inode_size_rem, block_size_rem; struct ext4_xattr_ibody_header *ibody_header = NULL; struct ext4_xattr_header *block_header = NULL; struct ext4_xattr_entry *entry = NULL; |