X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwinpgnt.c;h=7bdf6378f956f760b4a4a3d48207c6812536030f;hb=9f9d72ec58642e91b4f93ee4405a8086ee2fb2f0;hp=fcc2a910d461dc66372a68eb46fc74cb9ac22040;hpb=1ce39113f54c7887c75ef1915eaf486b88111199;p=PuTTY.git diff --git a/windows/winpgnt.c b/windows/winpgnt.c index fcc2a910..7bdf6378 100644 --- a/windows/winpgnt.c +++ b/windows/winpgnt.c @@ -368,7 +368,7 @@ static void win_add_keyfile(Filename *filename) * comment to use in the passphrase prompt. */ while (1) { - int dlgret; + INT_PTR dlgret; struct PassphraseProcStruct pps; pps.passphrase = &passphrase; @@ -377,11 +377,11 @@ static void win_add_keyfile(Filename *filename) NULL, PassphraseProc, (LPARAM) &pps); passphrase_box = NULL; - sfree(err); - if (!dlgret) goto done; /* operation cancelled */ + sfree(err); + assert(passphrase != NULL); ret = pageant_add_keyfile(filename, passphrase, &err); @@ -789,7 +789,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, case WM_SYSCOMMAND: switch (wParam & ~0xF) { /* low 4 bits reserved to Windows */ case IDM_PUTTY: - if((int)ShellExecute(hwnd, NULL, putty_path, _T(""), _T(""), + if((INT_PTR)ShellExecute(hwnd, NULL, putty_path, _T(""), _T(""), SW_SHOW) <= 32) { MessageBox(NULL, "Unable to execute PuTTY!", "Error", MB_OK | MB_ICONERROR); @@ -856,7 +856,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, GetMenuItemInfo(session_menu, wParam, FALSE, &mii); strcpy(param, "@"); strcat(param, mii.dwTypeData); - if((int)ShellExecute(hwnd, NULL, putty_path, param, + if((INT_PTR)ShellExecute(hwnd, NULL, putty_path, param, _T(""), SW_SHOW) <= 32) { MessageBox(NULL, "Unable to execute PuTTY!", "Error", MB_OK | MB_ICONERROR);