mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[misc] fix coverity and VS analysis warnings
This commit is contained in:
parent
c021b7bfd8
commit
21ce17302d
3 changed files with 11 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Rufus: The Reliable USB Formatting Utility
|
||||
* Device detection and enumeration
|
||||
* Copyright © 2014-2016 Pete Batard <pete@akeo.ie>
|
||||
* Copyright © 2014-2017 Pete Batard <pete@akeo.ie>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -153,7 +153,7 @@ static __inline BOOL IsRemovable(const char* buffer)
|
|||
|
||||
static __inline void ToUpper(char* str)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < safe_strlen(str); i++)
|
||||
str[i] = toupper(str[i]);
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ BOOL GetOpticalMedia(IMG_SAVE* img_save)
|
|||
ReadFile(hDrive, buffer, 2048, &size, NULL) && (size == 2048)) {
|
||||
memcpy(label, &buffer[0x28], sizeof(label) - 1);
|
||||
label[sizeof(label) - 1] = 0;
|
||||
for (k = strlen(label) - 1; (k >= 0) && (label[k] == 0x20); k--)
|
||||
for (k = (int)strlen(label) - 1; (k >= 0) && (label[k] == 0x20); k--)
|
||||
label[k] = 0;
|
||||
img_save->Label = label;
|
||||
}
|
||||
|
|
|
@ -2895,8 +2895,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||
int i, opt, option_index = 0, argc = 0, si = 0, lcid = GetUserDefaultUILanguage();
|
||||
int wait_for_mutex = 0;
|
||||
FILE* fd;
|
||||
BOOL attached_console = FALSE, external_loc_file = FALSE, lgp_set = FALSE, automount, disable_hogger = FALSE;
|
||||
BOOL previous_enable_HDDs = FALSE;
|
||||
BOOL attached_console = FALSE, external_loc_file = FALSE, lgp_set = FALSE, automount = TRUE;
|
||||
BOOL disable_hogger = FALSE, previous_enable_HDDs = FALSE;
|
||||
BYTE *loc_data;
|
||||
DWORD loc_size, size;
|
||||
char tmp_path[MAX_PATH] = "", loc_file[MAX_PATH] = "", ini_path[MAX_PATH] = "", ini_flags[] = "rb";
|
||||
|
@ -2973,6 +2973,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||
break;
|
||||
case 'i':
|
||||
if (_access(optarg, 0) != -1) {
|
||||
safe_free(image_path);
|
||||
image_path = safe_strdup(optarg);
|
||||
iso_provided = TRUE;
|
||||
}
|
||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_ACCEPTFILES
|
||||
CAPTION "Rufus 2.13.1066"
|
||||
CAPTION "Rufus 2.13.1067"
|
||||
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||
|
@ -334,8 +334,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,13,1066,0
|
||||
PRODUCTVERSION 2,13,1066,0
|
||||
FILEVERSION 2,13,1067,0
|
||||
PRODUCTVERSION 2,13,1067,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -352,13 +352,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "2.13.1066"
|
||||
VALUE "FileVersion", "2.13.1067"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "2.13.1066"
|
||||
VALUE "ProductVersion", "2.13.1067"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
Loading…
Reference in a new issue