[misc] fix warnings reported by Cppcheck

* Closes #1520
This commit is contained in:
Pete Batard 2020-05-08 01:25:35 +01:00
parent 79a6f8942e
commit bcca9144b7
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
5 changed files with 8 additions and 14 deletions

View file

@ -427,13 +427,12 @@ static unsigned int test_rw(HANDLE hDrive, blk64_t last_block, size_t block_size
}
buffer = allocate_buffer(2 * blocks_at_once * block_size);
read_buffer = buffer + blocks_at_once * block_size;
if (!buffer) {
uprintf("%sError while allocating buffers\n", bb_prefix);
cancel_ops = -1;
return 0;
}
read_buffer = buffer + blocks_at_once * block_size;
uprintf("%sChecking from block %lu to %lu (1 block = %s)\n", bb_prefix,
(unsigned long) first_block, (unsigned long) last_block - 1,