[misc] fix coverity and VS analysis warnings

This commit is contained in:
Pete Batard 2017-03-08 21:22:24 +01:00
parent c021b7bfd8
commit 21ce17302d
3 changed files with 11 additions and 10 deletions

View file

@ -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;
}