[misc] fix multiple VS Code Analysis warnings

This commit is contained in:
Pete Batard 2017-03-10 19:07:48 +01:00
parent 97b4e623cd
commit edcfd43ed5
13 changed files with 48 additions and 23 deletions

View file

@ -2,7 +2,7 @@
* Rufus: The Reliable USB Formatting Utility
* Formatting function calls
* Copyright © 2007-2009 Tom Thornhill/Ridgecrop
* Copyright © 2011-2016 Pete Batard <pete@akeo.ie>
* Copyright © 2011-2017 Pete Batard <pete@akeo.ie>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -865,6 +865,9 @@ static BOOL WriteMBR(HANDLE hPhysicalDrive)
AnalyzeMBR(hPhysicalDrive, "Drive");
if (SelectedDrive.SectorSize < 512)
goto out;
// FormatEx rewrites the MBR and removes the LBA attribute of FAT16
// and FAT32 partitions - we need to correct this in the MBR
buffer = (unsigned char*)_mm_malloc(SelectedDrive.SectorSize, 16);