mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-20 18:05:21 -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
|
@ -177,7 +177,7 @@ const char* error_message(errcode_t error_code)
|
|||
static_sprintf(error_string, "Unknown ext2fs error %ld (EXT2_ET_BASE + %ld)", error_code, error_code - EXT2_ET_BASE);
|
||||
} else {
|
||||
SetLastError((FormatStatus == 0) ? (ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | (error_code & 0xFFFF)) : FormatStatus);
|
||||
static_sprintf(error_string, WindowsErrorString());
|
||||
static_sprintf(error_string, "%s", WindowsErrorString());
|
||||
}
|
||||
return error_string;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue