mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-20 18:05:21 -04:00
[misc] fix PVS-Studio warnings
This commit is contained in:
parent
eeca1f279c
commit
c28f9bc491
26 changed files with 98 additions and 81 deletions
13
src/ui.c
13
src/ui.c
|
@ -575,8 +575,9 @@ void SetSectionHeaders(HWND hDlg)
|
|||
SendDlgItemMessageA(hDlg, section_control_ids[i], WM_SETFONT, (WPARAM)hf, TRUE);
|
||||
hCtrl = GetDlgItem(hDlg, section_control_ids[i]);
|
||||
memset(wtmp, 0, sizeof(wtmp));
|
||||
GetWindowTextW(hCtrl, wtmp, ARRAYSIZE(wtmp) - 3);
|
||||
GetWindowTextW(hCtrl, wtmp, ARRAYSIZE(wtmp) - 4);
|
||||
wlen = wcslen(wtmp);
|
||||
assert(wlen < ARRAYSIZE(wtmp - 2));
|
||||
wtmp[wlen++] = L' ';
|
||||
wtmp[wlen++] = L' ';
|
||||
SetWindowTextW(hCtrl, wtmp);
|
||||
|
@ -788,8 +789,7 @@ void ToggleImageOptions(void)
|
|||
if (image_option_txt[0] == 0)
|
||||
GetWindowTextU(GetDlgItem(hMainDialog, IDS_IMAGE_OPTION_TXT), image_option_txt, sizeof(image_option_txt));
|
||||
|
||||
if ( ((has_wintogo) && !(image_options & IMOP_WINTOGO)) ||
|
||||
((!has_wintogo) && (image_options & IMOP_WINTOGO)) ) {
|
||||
if ((has_wintogo) != (image_options & IMOP_WINTOGO)) {
|
||||
image_options ^= IMOP_WINTOGO;
|
||||
if (image_options & IMOP_WINTOGO) {
|
||||
// Set the Windows To Go selection in the dropdown
|
||||
|
@ -797,8 +797,7 @@ void ToggleImageOptions(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (((has_persistence) && !(image_options & IMOP_PERSISTENCE)) ||
|
||||
((!has_persistence) && (image_options & IMOP_PERSISTENCE))) {
|
||||
if ((has_persistence) != (image_options & IMOP_PERSISTENCE)) {
|
||||
image_options ^= IMOP_PERSISTENCE;
|
||||
if (image_options & IMOP_PERSISTENCE) {
|
||||
SetWindowTextU(GetDlgItem(hMainDialog, IDS_IMAGE_OPTION_TXT), lmprintf(MSG_123));
|
||||
|
@ -1069,7 +1068,7 @@ void CreateAdditionalControls(HWND hDlg)
|
|||
hAdvancedDeviceToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, TOOLBAR_STYLE,
|
||||
0, 0, 0, 0, hMainDialog, (HMENU)IDC_ADVANCED_DEVICE_TOOLBAR, hMainInstance, NULL);
|
||||
SendMessage(hAdvancedDeviceToolbar, CCM_SETVERSION, (WPARAM)6, 0);
|
||||
memset(tbToolbarButtons, 0, sizeof(TBBUTTON));
|
||||
memset(tbToolbarButtons, 0, sizeof(tbToolbarButtons));
|
||||
tbToolbarButtons[0].idCommand = IDC_ADVANCED_DRIVE_PROPERTIES;
|
||||
tbToolbarButtons[0].fsStyle = BTNS_SHOWTEXT | BTNS_AUTOSIZE;
|
||||
tbToolbarButtons[0].fsState = TBSTATE_ENABLED;
|
||||
|
@ -1091,7 +1090,7 @@ void CreateAdditionalControls(HWND hDlg)
|
|||
hAdvancedFormatToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, TOOLBAR_STYLE,
|
||||
0, 0, 0, 0, hMainDialog, (HMENU)IDC_ADVANCED_FORMAT_TOOLBAR, hMainInstance, NULL);
|
||||
SendMessage(hAdvancedFormatToolbar, CCM_SETVERSION, (WPARAM)6, 0);
|
||||
memset(tbToolbarButtons, 0, sizeof(TBBUTTON));
|
||||
memset(tbToolbarButtons, 0, sizeof(tbToolbarButtons));
|
||||
tbToolbarButtons[0].idCommand = IDC_ADVANCED_FORMAT_OPTIONS;
|
||||
tbToolbarButtons[0].fsStyle = BTNS_SHOWTEXT | BTNS_AUTOSIZE;
|
||||
tbToolbarButtons[0].fsState = TBSTATE_ENABLED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue