mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 03:06:56 -04:00
[misc] fix Coverity warnings
* Also re-instate the _coverity.cmd script and try to fix AppVeyor Coverity uploads
This commit is contained in:
parent
1e85b4dbf5
commit
c8078b0119
7 changed files with 45 additions and 17 deletions
|
@ -972,6 +972,8 @@ static BOOL WriteSBR(HANDLE hPhysicalDrive)
|
|||
(DWORD)(SelectedDrive.SectorsPerTrack * SelectedDrive.SectorSize) : 1 * MB;
|
||||
if (br_size + size > max_size) {
|
||||
uprintf(" SBR size is too large - You may need to uncheck 'Add fixes for old BIOSes'.");
|
||||
if (sub_type == BT_MAX)
|
||||
safe_free(buf);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1468,9 +1470,12 @@ static void update_progress(const uint64_t processed_bytes)
|
|||
static int sector_write(int fd, const void* _buf, unsigned int count)
|
||||
{
|
||||
const uint8_t* buf = (const uint8_t*)_buf;
|
||||
const unsigned int sec_size = (unsigned int)SelectedDrive.SectorSize;
|
||||
unsigned int sec_size = (unsigned int)SelectedDrive.SectorSize;
|
||||
int written, fill_size = 0;
|
||||
|
||||
if (sec_size == 0)
|
||||
sec_size = 512;
|
||||
|
||||
// If we are on a sector boundary and count is multiple of the
|
||||
// sector size, just issue a regular write
|
||||
if ((sec_buf_pos == 0) && (count % sec_size == 0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue