modified drivers/filesystems/fastfat/blockdev.c

modified   drivers/filesystems/fastfat/dirwr.c
modified   drivers/filesystems/fastfat/ea.c
modified   drivers/filesystems/fastfat/finfo.c
   Silence "argument unused" warnings
   Corrected several accesses to potentially uninitialized variables

modified   drivers/filesystems/fastfat/vfat.h
   Visual C++ is no longer a guarantee of compilation with the DDK

Patch by Samuel Serapión <samdwise51@gmail.com>

svn path=/trunk/; revision=41457
This commit is contained in:
KJK::Hyperion 2009-06-19 00:21:21 +00:00
parent 82276953f4
commit 204b2befbb
5 changed files with 22 additions and 9 deletions

View file

@ -23,6 +23,8 @@ VfatReadWritePartialCompletion (IN PDEVICE_OBJECT DeviceObject,
PVFAT_IRP_CONTEXT IrpContext;
PMDL Mdl;
UNREFERENCED_PARAMETER(DeviceObject);
DPRINT("VfatReadWritePartialCompletion() called\n");
IrpContext = (PVFAT_IRP_CONTEXT)Context;

View file

@ -77,7 +77,7 @@ vfatFindDirSpace(
{
LARGE_INTEGER FileOffset;
ULONG i, count, size, nbFree = 0;
PDIR_ENTRY pFatEntry;
PDIR_ENTRY pFatEntry = NULL;
PVOID Context = NULL;
NTSTATUS Status;
ULONG SizeDirEntry;
@ -616,7 +616,7 @@ FATDelEntry(
ULONG CurrentCluster = 0, NextCluster, i;
PVOID Context = NULL;
LARGE_INTEGER Offset;
PFAT_DIR_ENTRY pDirEntry;
PFAT_DIR_ENTRY pDirEntry = NULL;
ASSERT(pFcb);
ASSERT(pFcb->parentFcb);

View file

@ -36,5 +36,9 @@ VfatSetExtendedAttributes(PFILE_OBJECT FileObject,
PVOID Ea,
ULONG EaLength)
{
UNREFERENCED_PARAMETER(FileObject);
UNREFERENCED_PARAMETER(Ea);
UNREFERENCED_PARAMETER(EaLength);
return(STATUS_EAS_NOT_SUPPORTED);
}

View file

@ -120,6 +120,10 @@ VfatGetPositionInformation(PFILE_OBJECT FileObject,
PFILE_POSITION_INFORMATION PositionInfo,
PULONG BufferLength)
{
UNREFERENCED_PARAMETER(FileObject);
UNREFERENCED_PARAMETER(FCB);
UNREFERENCED_PARAMETER(DeviceObject);
DPRINT ("VfatGetPositionInformation()\n");
if (*BufferLength < sizeof(FILE_POSITION_INFORMATION))
@ -203,6 +207,9 @@ VfatGetBasicInformation(PFILE_OBJECT FileObject,
PULONG BufferLength)
{
PDEVICE_EXTENSION DeviceExt;
UNREFERENCED_PARAMETER(FileObject);
DPRINT("VfatGetBasicInformation()\n");
DeviceExt = (PDEVICE_EXTENSION)DeviceObject->DeviceExtension;
@ -339,6 +346,10 @@ VfatGetNameInformation(PFILE_OBJECT FileObject,
*/
{
ULONG BytesToCopy;
UNREFERENCED_PARAMETER(FileObject);
UNREFERENCED_PARAMETER(DeviceObject);
ASSERT(NameInfo != NULL);
ASSERT(FCB != NULL);
@ -470,6 +481,9 @@ VfatGetEaInformation(PFILE_OBJECT FileObject,
{
PDEVICE_EXTENSION DeviceExt = DeviceObject->DeviceExtension;
UNREFERENCED_PARAMETER(FileObject);
UNREFERENCED_PARAMETER(Fcb);
/* FIXME - use SEH to access the buffer! */
Info->EaSize = 0;
*BufferLength -= sizeof(*Info);

View file

@ -2,16 +2,9 @@
#include <ntdddisk.h>
#include <debug.h>
#ifdef __GNUC__
#include <ccros.h>
#define USE_ROS_CC_AND_FS
#else
#define KEBUGCHECK KeBugCheck
#define KEBUGCHECKEX KeBugCheckEx
#define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
#define ROUND_UP(N, S) ROUND_DOWN((N) + (S) - 1, (S))
#endif
#define ROUND_DOWN(n, align) \
(((ULONG)n) & ~((align) - 1l))