mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-02 07:39:54 -04:00
[misc] fix warnings
* MSVC x64 warnings in file.c * Clang and MinGW warnings in badblocks * also removed the requirement for * also added test ID to badblocks call
This commit is contained in:
parent
e419cf9015
commit
04bf6c6b3d
8 changed files with 78 additions and 110 deletions
|
@ -28,7 +28,7 @@ int write_sectors(HANDLE hDrive, size_t SectorSize,
|
|||
const void *pBuf)
|
||||
{
|
||||
LARGE_INTEGER ptr;
|
||||
DWORD Size = 0;
|
||||
DWORD Size = (DWORD)(nSectors*SectorSize);
|
||||
|
||||
ptr.QuadPart = StartSector*SectorSize;
|
||||
if(!SetFilePointerEx(hDrive, ptr, NULL, FILE_BEGIN))
|
||||
|
@ -37,7 +37,7 @@ int write_sectors(HANDLE hDrive, size_t SectorSize,
|
|||
return -1;
|
||||
}
|
||||
|
||||
if((!WriteFile(hDrive, pBuf, (DWORD)nSectors*SectorSize, &Size, NULL)) || (Size != nSectors*SectorSize))
|
||||
if((!WriteFile(hDrive, pBuf, Size, &Size, NULL)) || (Size != nSectors*SectorSize))
|
||||
{
|
||||
uprintf("write_sectors: Write error - %s\n", WindowsErrorString());
|
||||
uprintf(" StartSector:%0X, nSectors:%0X, SectorSize:%0X\n", StartSector, nSectors, SectorSize);
|
||||
|
@ -53,7 +53,7 @@ int read_sectors(HANDLE hDrive, size_t SectorSize,
|
|||
void *pBuf)
|
||||
{
|
||||
LARGE_INTEGER ptr;
|
||||
DWORD Size = 0;
|
||||
DWORD Size = (DWORD)(nSectors*SectorSize);
|
||||
|
||||
ptr.QuadPart = StartSector*SectorSize;
|
||||
if(!SetFilePointerEx(hDrive, ptr, NULL, FILE_BEGIN))
|
||||
|
@ -62,7 +62,7 @@ int read_sectors(HANDLE hDrive, size_t SectorSize,
|
|||
return -1;
|
||||
}
|
||||
|
||||
if((!ReadFile(hDrive, pBuf, (DWORD)nSectors*SectorSize, &Size, NULL)) || (Size != nSectors*SectorSize))
|
||||
if((!ReadFile(hDrive, pBuf, Size, &Size, NULL)) || (Size != nSectors*SectorSize))
|
||||
{
|
||||
uprintf("read_sectors: Read error - %s\n", WindowsErrorString());
|
||||
uprintf(" StartSector:%0X, nSectors:%0X, SectorSize:%0X\n", StartSector, nSectors, SectorSize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue