mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-28 21:54:15 -04:00
[misc] fix PVS-Studio static analyzer warnings
* Surround macro params to ensure expected results * Fix copy-paste errors * Fix a potential buffer overflow in SetSectionHeaders() * Add const modifier where relevant * Use GetWindowLongPtr() everywhere * Use proper sprintf format for unsigned int * Use %s for printf-like funcs (https://www.viva64.com/en/w/v618/print/) * Closes #1464
This commit is contained in:
parent
e0bc2e5ffd
commit
121257c584
10 changed files with 27 additions and 27 deletions
|
@ -463,7 +463,7 @@ static unsigned int test_rw(HANDLE hDrive, blk64_t last_block, size_t block_size
|
|||
if (max_bb && bb_count >= max_bb) {
|
||||
if (s_flag || v_flag) {
|
||||
uprintf(abort_msg);
|
||||
fprintf(log_fd, abort_msg);
|
||||
fprintf(log_fd, "%s", abort_msg);
|
||||
fflush(log_fd);
|
||||
}
|
||||
cancel_ops = -1;
|
||||
|
@ -511,7 +511,7 @@ static unsigned int test_rw(HANDLE hDrive, blk64_t last_block, size_t block_size
|
|||
if (max_bb && bb_count >= max_bb) {
|
||||
if (s_flag || v_flag) {
|
||||
uprintf(abort_msg);
|
||||
fprintf(log_fd, abort_msg);
|
||||
fprintf(log_fd, "%s", abort_msg);
|
||||
fflush(log_fd);
|
||||
}
|
||||
cancel_ops = -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue