From 85f065864e3fcac6bcf17dc5a7dea98205fd78e4 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 24 Nov 2011 20:23:01 +0000 Subject: [PATCH] [msvc] fix 64 bit warnings --- rufus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rufus.c b/rufus.c index 9541de96..84484e55 100644 --- a/rufus.c +++ b/rufus.c @@ -450,7 +450,7 @@ BOOL WriteSectors(HANDLE hDrive, size_t SectorSize, size_t StartSector, size_t n return FALSE; } - if ((!WriteFile(hDrive, Buf, BufSize, &Size, NULL)) || (Size != BufSize)) { + if ((!WriteFile(hDrive, Buf, (DWORD)BufSize, &Size, NULL)) || (Size != BufSize)) { uprintf("WriteSectors: Write error - %s\n", WindowsErrorString()); return FALSE; } @@ -474,7 +474,7 @@ BOOL ReadSectors(HANDLE hDrive, size_t SectorSize, size_t StartSector, size_t nS return FALSE; } - if ((!ReadFile(hDrive, Buf, BufSize, &size, NULL)) || (size != BufSize)) { + if ((!ReadFile(hDrive, Buf, (DWORD)BufSize, &size, NULL)) || (size != BufSize)) { uprintf("ReadSectors: Write error - %s\n", WindowsErrorString()); return FALSE; } @@ -725,7 +725,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA safe_sprintf(str, sizeof(str), "WARNING: ALL DATA ON DEVICE %s\r\nWILL BE ERASED!\r\n" "Do you want to continue with this operation?", tmp); if (MessageBoxA(hMainDialog, str, "Rufus", MB_OKCANCEL|MB_ICONWARNING) == IDOK) { - FormatDrive(ComboBox_GetItemData(hDeviceList, nDeviceIndex)); + FormatDrive((DWORD)ComboBox_GetItemData(hDeviceList, nDeviceIndex)); } } break;