mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
sys,dll,tst: ensure that project compiles for x86
This commit is contained in:
parent
1bdfc8a579
commit
e0dde7349e
@ -311,7 +311,7 @@ typedef struct
|
|||||||
UINT64 Hint;
|
UINT64 Hint;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
UINT64 Information;
|
UINT32 Information;
|
||||||
UINT32 Status;
|
UINT32 Status;
|
||||||
} IoStatus;
|
} IoStatus;
|
||||||
union
|
union
|
||||||
|
@ -304,7 +304,7 @@ static NTSTATUS FspFileSystemOpCreate_FileOpenTargetDirectory(FSP_FILE_SYSTEM *F
|
|||||||
UINT32 GrantedAccess;
|
UINT32 GrantedAccess;
|
||||||
PVOID FileNode;
|
PVOID FileNode;
|
||||||
FSP_FSCTL_FILE_INFO FileInfo;
|
FSP_FSCTL_FILE_INFO FileInfo;
|
||||||
UINT_PTR Information;
|
UINT32 Information;
|
||||||
|
|
||||||
Result = FspAccessCheck(FileSystem, Request, TRUE, TRUE,
|
Result = FspAccessCheck(FileSystem, Request, TRUE, TRUE,
|
||||||
Request->Req.Create.DesiredAccess, &GrantedAccess);
|
Request->Req.Create.DesiredAccess, &GrantedAccess);
|
||||||
|
@ -693,7 +693,7 @@ NTSTATUS FspVolumeTransact(
|
|||||||
if (0 == ProcessIrp)
|
if (0 == ProcessIrp)
|
||||||
{
|
{
|
||||||
/* either IRP was canceled or a bogus Hint was provided */
|
/* either IRP was canceled or a bogus Hint was provided */
|
||||||
DEBUGLOG("BOGUS(Kind=%d, Hint=%p)", Response->Kind, (PVOID)Response->Hint);
|
DEBUGLOG("BOGUS(Kind=%d, Hint=%p)", Response->Kind, (PVOID)(UINT_PTR)Response->Hint);
|
||||||
Response = NextResponse;
|
Response = NextResponse;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -396,7 +396,7 @@ static NTSTATUS Create(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
FileNode->FileInfo.AllocationSize = AllocationSize;
|
FileNode->FileInfo.AllocationSize = AllocationSize;
|
||||||
if (0 != FileNode->FileInfo.AllocationSize)
|
if (0 != FileNode->FileInfo.AllocationSize)
|
||||||
{
|
{
|
||||||
FileNode->FileData = malloc(FileNode->FileInfo.AllocationSize);
|
FileNode->FileData = malloc((size_t)FileNode->FileInfo.AllocationSize);
|
||||||
if (0 == FileNode->FileData)
|
if (0 == FileNode->FileData)
|
||||||
{
|
{
|
||||||
MemfsFileNodeDelete(FileNode);
|
MemfsFileNodeDelete(FileNode);
|
||||||
@ -507,7 +507,7 @@ static NTSTATUS Read(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
if (EndOffset > FileNode->FileInfo.FileSize)
|
if (EndOffset > FileNode->FileInfo.FileSize)
|
||||||
EndOffset = FileNode->FileInfo.FileSize;
|
EndOffset = FileNode->FileInfo.FileSize;
|
||||||
|
|
||||||
memcpy(Buffer, (PUINT8)FileNode->FileData + Offset, EndOffset - Offset);
|
memcpy(Buffer, (PUINT8)FileNode->FileData + Offset, (size_t)(EndOffset - Offset));
|
||||||
|
|
||||||
*PBytesTransferred = (ULONG)(EndOffset - Offset);
|
*PBytesTransferred = (ULONG)(EndOffset - Offset);
|
||||||
|
|
||||||
@ -555,7 +555,7 @@ static NTSTATUS Write(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
SetFileSize(FileSystem, Request, FileNode, EndOffset, FileInfo);
|
SetFileSize(FileSystem, Request, FileNode, EndOffset, FileInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy((PUINT8)FileNode->FileData + Offset, Buffer, EndOffset - Offset);
|
memcpy((PUINT8)FileNode->FileData + Offset, Buffer, (size_t)(EndOffset - Offset));
|
||||||
|
|
||||||
*PBytesTransferred = (ULONG)(EndOffset - Offset);
|
*PBytesTransferred = (ULONG)(EndOffset - Offset);
|
||||||
*FileInfo = FileNode->FileInfo;
|
*FileInfo = FileNode->FileInfo;
|
||||||
@ -619,7 +619,7 @@ static NTSTATUS SetAllocationSize(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
if (AllocationSize > Memfs->MaxFileSize)
|
if (AllocationSize > Memfs->MaxFileSize)
|
||||||
return STATUS_DISK_FULL;
|
return STATUS_DISK_FULL;
|
||||||
|
|
||||||
FileData = realloc(FileNode->FileData, AllocationSize);
|
FileData = realloc(FileNode->FileData, (size_t)AllocationSize);
|
||||||
if (0 == FileData)
|
if (0 == FileData)
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
|
||||||
@ -656,7 +656,7 @@ static NTSTATUS SetFileSize(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
|
|
||||||
if (FileNode->FileInfo.FileSize < FileSize)
|
if (FileNode->FileInfo.FileSize < FileSize)
|
||||||
memset((PUINT8)FileNode->FileData + FileNode->FileInfo.FileSize, 0,
|
memset((PUINT8)FileNode->FileData + FileNode->FileInfo.FileSize, 0,
|
||||||
FileSize - FileNode->FileInfo.FileSize);
|
(size_t)(FileSize - FileNode->FileInfo.FileSize));
|
||||||
FileNode->FileInfo.FileSize = FileSize;
|
FileNode->FileInfo.FileSize = FileSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user