[CDFS][FASTFAT][NPFS]
authorRafal Harabien <rafalh@reactos.org>
Tue, 5 Jul 2011 13:55:39 +0000 (13:55 +0000)
committerRafal Harabien <rafalh@reactos.org>
Tue, 5 Jul 2011 13:55:39 +0000 (13:55 +0000)
- Fix MSVC warnings

svn path=/trunk/; revision=52546

reactos/drivers/filesystems/cdfs/cdfs.h
reactos/drivers/filesystems/cdfs/create.c
reactos/drivers/filesystems/cdfs/dirctl.c
reactos/drivers/filesystems/cdfs/finfo.c
reactos/drivers/filesystems/cdfs/fsctl.c
reactos/drivers/filesystems/fastfat/finfo.c
reactos/drivers/filesystems/npfs/dirctl.c
reactos/drivers/filesystems/npfs/rw.c

index 905a34e..47d7d31 100644 (file)
@@ -143,7 +143,7 @@ typedef struct _CDINFO
   ULONG RootStart;
   ULONG RootSize;
   WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR)];
-  ULONG VolumeLabelLength;
+  USHORT VolumeLabelLength;
   ULONG SerialNumber;
 } CDINFO, *PCDINFO;
 
index 2f08862..d7a6440 100644 (file)
@@ -40,7 +40,7 @@ CdfsMakeAbsoluteFilename(PFILE_OBJECT FileObject,
                          PUNICODE_STRING RelativeFileName,
                          PUNICODE_STRING AbsoluteFileName)
 {
-    ULONG Length;
+    USHORT Length;
     PFCB Fcb;
     NTSTATUS Status;
 
index 0160c92..8cf71a2 100644 (file)
@@ -533,7 +533,7 @@ CdfsGetBothDirectoryInformation(PFCB Fcb,
 
     /* Copy short name */
     ASSERT(Fcb->ShortNameU.Length / sizeof(WCHAR) <= 12);
-    Info->ShortNameLength = Fcb->ShortNameU.Length;
+    Info->ShortNameLength = (CCHAR)Fcb->ShortNameU.Length;
     RtlCopyMemory(Info->ShortName, Fcb->ShortNameU.Buffer, Fcb->ShortNameU.Length);
 
     return(STATUS_SUCCESS);
index 25529f3..07554c2 100644 (file)
@@ -153,7 +153,7 @@ CdfsGetNameInformation(PFILE_OBJECT FileObject,
     ASSERT(Fcb != NULL);
 
     /* If buffer can't hold at least the file name length, bail out */
-    if (*BufferLength < FIELD_OFFSET(FILE_NAME_INFORMATION, FileName[0]))
+    if (*BufferLength < (ULONG)FIELD_OFFSET(FILE_NAME_INFORMATION, FileName[0]))
         return STATUS_BUFFER_OVERFLOW;
 
     /* Calculate file name length in bytes */
index 8563791..c15e84f 100644 (file)
@@ -46,7 +46,7 @@ CdfsGetPVDData(PUCHAR Buffer,
                PCDINFO CdInfo)
 {
     PPVD Pvd;
-    ULONG i;
+    USHORT i;
     PUCHAR pc;
     PWCHAR pw;
 
index cdadc87..61be39a 100644 (file)
@@ -379,7 +379,7 @@ VfatGetNameInformation(PFILE_OBJECT FileObject,
   ASSERT(FCB != NULL);
 
   /* If buffer can't hold at least the file name length, bail out */
-  if (*BufferLength < FIELD_OFFSET(FILE_NAME_INFORMATION, FileName[0]))
+  if (*BufferLength < (ULONG)FIELD_OFFSET(FILE_NAME_INFORMATION, FileName[0]))
     return STATUS_BUFFER_OVERFLOW;
 
   /* Save file name length, and as much file len, as buffer length allows */
index ef7b131..2b0eec0 100644 (file)
@@ -21,7 +21,7 @@ NpfsQueryDirectory(PNPFS_CCB Ccb,
                    PULONG Size)
 {
     PIO_STACK_LOCATION Stack;
-    LONG BufferLength = 0;
+    ULONG BufferLength = 0;
     PUNICODE_STRING SearchPattern = NULL;
     FILE_INFORMATION_CLASS FileInformationClass;
     ULONG FileIndex = 0;
index ea3449a..48c1bbc 100644 (file)
@@ -21,7 +21,7 @@ VOID HexDump(PUCHAR Buffer, ULONG Length)
     CHAR Line[65];
     UCHAR ch;
     const char Hex[] = "0123456789ABCDEF";
-    int i, j;
+    ULONG i, j;
 
     DbgPrint("---------------\n");