554 lines
20 KiB
Diff
554 lines
20 KiB
Diff
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/mkfiles.pl putty/mkfiles.pl
|
|
--- putty-master/mkfiles.pl 2015-08-02 17:59:19.333189500 +0200
|
|
+++ putty/mkfiles.pl 2015-08-02 17:46:44.682078000 +0200
|
|
@@ -453,11 +453,11 @@
|
|
"# You may also need to tell windres where to find include files:\n".
|
|
"# RCINC = --include-dir c:\\cygwin\\include\\\n".
|
|
"\n".
|
|
- &splitline("CFLAGS = -mno-cygwin -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
|
|
+ &splitline("CFLAGS = -Wall -Werror -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
|
|
" -D_NO_OLDNAMES -DNO_MULTIMON -DNO_HTMLHELP -DNO_SECUREZEROMEMORY " .
|
|
(join " ", map {"-I$dirpfx$_"} @srcdirs)) .
|
|
"\n".
|
|
- "LDFLAGS = -mno-cygwin -s\n".
|
|
+ "LDFLAGS = -s\n".
|
|
&splitline("RCFLAGS = \$(RCINC) --define WIN32=1 --define _WIN32=1 ".
|
|
"--define WINVER=0x0400 ".(join " ", map {"-I$dirpfx$_"} @srcdirs))."\n".
|
|
"\n".L
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/wincons.c putty/windows/wincons.c
|
|
--- putty-master/windows/wincons.c 2015-08-02 17:59:19.347186300 +0200
|
|
+++ putty/windows/wincons.c 2015-08-02 17:46:44.688076200 +0200
|
|
@@ -307,7 +307,7 @@
|
|
int console_get_userpass_input(prompts_t *p,
|
|
const unsigned char *in, int inlen)
|
|
{
|
|
- HANDLE hin, hout;
|
|
+ HANDLE hin = NULL, hout = NULL;
|
|
size_t curr_prompt;
|
|
|
|
/*
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winctrls.c putty/windows/winctrls.c
|
|
--- putty-master/windows/winctrls.c 2015-08-02 17:59:19.351185400 +0200
|
|
+++ putty/windows/winctrls.c 2015-08-02 17:46:44.694075200 +0200
|
|
@@ -76,7 +76,7 @@
|
|
if (cp->hwnd) {
|
|
ctl = CreateWindowEx(exstyle, wclass, wtext, wstyle,
|
|
r.left, r.top, r.right, r.bottom,
|
|
- cp->hwnd, (HMENU) wid, hinst, NULL);
|
|
+ cp->hwnd, (HMENU)(intptr_t)wid, hinst, NULL);
|
|
SendMessage(ctl, WM_SETFONT, cp->font, MAKELPARAM(TRUE, 0));
|
|
|
|
if (!strcmp(wclass, "LISTBOX")) {
|
|
@@ -267,10 +267,9 @@
|
|
nbuttons = 0;
|
|
while (1) {
|
|
char *btext = va_arg(ap, char *);
|
|
- int bid;
|
|
if (!btext)
|
|
break;
|
|
- bid = va_arg(ap, int);
|
|
+ va_arg(ap, int);
|
|
nbuttons++;
|
|
}
|
|
va_end(ap);
|
|
@@ -299,10 +298,9 @@
|
|
nbuttons = 0;
|
|
while (1) {
|
|
char *btext = va_arg(ap, char *);
|
|
- int bid;
|
|
if (!btext)
|
|
break;
|
|
- bid = va_arg(ap, int);
|
|
+ va_arg(ap, int);
|
|
}
|
|
va_end(ap);
|
|
buttons = snewn(nbuttons, struct radio);
|
|
@@ -330,10 +328,9 @@
|
|
nbuttons = 0;
|
|
while (1) {
|
|
char *btext = va_arg(ap, char *);
|
|
- int bid;
|
|
if (!btext)
|
|
break;
|
|
- bid = va_arg(ap, int);
|
|
+ va_arg(ap, int);
|
|
}
|
|
va_end(ap);
|
|
buttons = snewn(nbuttons, struct radio);
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/windlg.c putty/windows/windlg.c
|
|
--- putty-master/windows/windlg.c 2015-08-02 17:59:19.354191000 +0200
|
|
+++ putty/windows/windlg.c 2015-08-02 17:46:44.702076500 +0200
|
|
@@ -209,7 +209,7 @@
|
|
case IDA_LICENCE:
|
|
EnableWindow(hwnd, 0);
|
|
DialogBox(hinst, MAKEINTRESOURCE(IDD_LICENCEBOX),
|
|
- hwnd, LicenceProc);
|
|
+ hwnd, (DLGPROC)LicenceProc);
|
|
EnableWindow(hwnd, 1);
|
|
SetActiveWindow(hwnd);
|
|
return 0;
|
|
@@ -640,7 +640,7 @@
|
|
void modal_about_box(HWND hwnd)
|
|
{
|
|
EnableWindow(hwnd, 0);
|
|
- DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, AboutProc);
|
|
+ DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, (DLGPROC)AboutProc);
|
|
EnableWindow(hwnd, 1);
|
|
SetActiveWindow(hwnd);
|
|
}
|
|
@@ -660,7 +660,7 @@
|
|
{
|
|
HWND hwnd;
|
|
hwnd = CreateDialog(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX),
|
|
- NULL, NullDlgProc);
|
|
+ NULL, (DLGPROC)NullDlgProc);
|
|
ShowWindow(hwnd, SW_HIDE);
|
|
SetActiveWindow(hwnd);
|
|
DestroyWindow(hwnd);
|
|
@@ -687,7 +687,7 @@
|
|
|
|
ret =
|
|
SaneDialogBox(hinst, MAKEINTRESOURCE(IDD_MAINBOX), NULL,
|
|
- GenericMainDlgProc);
|
|
+ (DLGPROC)GenericMainDlgProc);
|
|
|
|
ctrl_free_box(ctrlbox);
|
|
winctrl_cleanup(&ctrls_panel);
|
|
@@ -720,7 +720,7 @@
|
|
dp.shortcuts['g'] = TRUE; /* the treeview: `Cate&gory' */
|
|
|
|
ret = SaneDialogBox(hinst, MAKEINTRESOURCE(IDD_MAINBOX), NULL,
|
|
- GenericMainDlgProc);
|
|
+ (DLGPROC)GenericMainDlgProc);
|
|
|
|
ctrl_free_box(ctrlbox);
|
|
winctrl_cleanup(&ctrls_base);
|
|
@@ -767,7 +767,7 @@
|
|
{
|
|
if (!logbox) {
|
|
logbox = CreateDialog(hinst, MAKEINTRESOURCE(IDD_LOGBOX),
|
|
- hwnd, LogProc);
|
|
+ hwnd, (DLGPROC)LogProc);
|
|
ShowWindow(logbox, SW_SHOWNORMAL);
|
|
}
|
|
SetActiveWindow(logbox);
|
|
@@ -775,7 +775,7 @@
|
|
|
|
void showabout(HWND hwnd)
|
|
{
|
|
- DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, AboutProc);
|
|
+ DialogBox(hinst, MAKEINTRESOURCE(IDD_ABOUTBOX), hwnd, (DLGPROC)AboutProc);
|
|
}
|
|
|
|
int verify_ssh_host_key(void *frontend, char *host, int port,
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/window.c putty/windows/window.c
|
|
--- putty-master/windows/window.c 2015-08-02 17:59:19.359192900 +0200
|
|
+++ putty/windows/window.c 2015-08-02 17:46:44.709075700 +0200
|
|
@@ -811,7 +811,7 @@
|
|
AppendMenu(m, MF_SEPARATOR, 0, 0);
|
|
AppendMenu(m, MF_ENABLED, IDM_NEWSESS, "Ne&w Session...");
|
|
AppendMenu(m, MF_ENABLED, IDM_DUPSESS, "&Duplicate Session");
|
|
- AppendMenu(m, MF_POPUP | MF_ENABLED, (UINT) savedsess_menu,
|
|
+ AppendMenu(m, MF_POPUP | MF_ENABLED, (UINT_PTR)savedsess_menu,
|
|
"Sa&ved Sessions");
|
|
AppendMenu(m, MF_ENABLED, IDM_RECONF, "Chan&ge Settings...");
|
|
AppendMenu(m, MF_SEPARATOR, 0, 0);
|
|
@@ -1038,7 +1038,7 @@
|
|
saved_menu = new_menu; /* XXX lame stacking */
|
|
new_menu = CreatePopupMenu();
|
|
AppendMenu(saved_menu, MF_POPUP | MF_ENABLED,
|
|
- (UINT) new_menu, specials[i].name);
|
|
+ (UINT_PTR)new_menu, specials[i].name);
|
|
break;
|
|
case TS_EXITMENU:
|
|
nesting--;
|
|
@@ -1063,13 +1063,13 @@
|
|
for (j = 0; j < lenof(popup_menus); j++) {
|
|
if (specials_menu) {
|
|
/* XXX does this free up all submenus? */
|
|
- DeleteMenu(popup_menus[j].menu, (UINT)specials_menu, MF_BYCOMMAND);
|
|
+ DeleteMenu(popup_menus[j].menu, (uintptr_t)specials_menu, MF_BYCOMMAND);
|
|
DeleteMenu(popup_menus[j].menu, IDM_SPECIALSEP, MF_BYCOMMAND);
|
|
}
|
|
if (new_menu) {
|
|
InsertMenu(popup_menus[j].menu, IDM_SHOWLOG,
|
|
MF_BYCOMMAND | MF_POPUP | MF_ENABLED,
|
|
- (UINT) new_menu, "S&pecial Command");
|
|
+ (UINT_PTR)new_menu, "S&pecial Command");
|
|
InsertMenu(popup_menus[j].menu, IDM_SHOWLOG,
|
|
MF_BYCOMMAND | MF_SEPARATOR, IDM_SPECIALSEP, 0);
|
|
}
|
|
@@ -1099,6 +1099,7 @@
|
|
break;
|
|
default:
|
|
assert(0);
|
|
+ return;
|
|
}
|
|
{
|
|
HCURSOR cursor = LoadCursor(NULL, curstype);
|
|
@@ -1516,7 +1517,7 @@
|
|
if (cset == OEM_CHARSET)
|
|
ucsdata.font_codepage = GetOEMCP();
|
|
else
|
|
- if (TranslateCharsetInfo ((DWORD *) cset, &info, TCI_SRCCHARSET))
|
|
+ if (TranslateCharsetInfo ((DWORD *)(uintptr_t) cset, &info, TCI_SRCCHARSET))
|
|
ucsdata.font_codepage = info.ciACP;
|
|
else
|
|
ucsdata.font_codepage = -1;
|
|
@@ -3117,7 +3118,7 @@
|
|
*/
|
|
term_seen_key_event(term);
|
|
if (ldisc)
|
|
- ldisc_send(ldisc, buf, len, 1);
|
|
+ ldisc_send(ldisc, (char *) buf, len, 1);
|
|
show_mouseptr(0);
|
|
}
|
|
}
|
|
@@ -3191,7 +3192,7 @@
|
|
buf[0] = wParam >> 8;
|
|
term_seen_key_event(term);
|
|
if (ldisc)
|
|
- lpage_send(ldisc, kbd_codepage, buf, 2, 1);
|
|
+ lpage_send(ldisc, kbd_codepage, (char *) buf, 2, 1);
|
|
} else {
|
|
char c = (unsigned char) wParam;
|
|
term_seen_key_event(term);
|
|
@@ -4590,7 +4591,7 @@
|
|
break;
|
|
}
|
|
if (xkey) {
|
|
- p += format_arrow_key(p, term, xkey, shift_state);
|
|
+ p += format_arrow_key((char *) p, term, xkey, shift_state);
|
|
return p - output;
|
|
}
|
|
}
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/wingss.c putty/windows/wingss.c
|
|
--- putty-master/windows/wingss.c 2015-08-02 17:59:19.361188200 +0200
|
|
+++ putty/windows/wingss.c 2015-08-02 17:46:44.717077800 +0200
|
|
@@ -91,7 +91,7 @@
|
|
if (ret == ERROR_SUCCESS && type == REG_SZ) {
|
|
buffer = snewn(size + 20, char);
|
|
ret = RegQueryValueEx(regkey, "InstallDir", NULL,
|
|
- &type, buffer, &size);
|
|
+ &type, (LPBYTE)buffer, &size);
|
|
if (ret == ERROR_SUCCESS && type == REG_SZ) {
|
|
strcat(buffer, "\\bin\\gssapi32.dll");
|
|
module = LoadLibrary(buffer);
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winjump.c putty/windows/winjump.c
|
|
--- putty-master/windows/winjump.c 2015-08-02 17:59:19.368190100 +0200
|
|
+++ putty/windows/winjump.c 2015-08-02 17:46:44.737079900 +0200
|
|
@@ -441,7 +441,7 @@
|
|
sessionname, "'", NULL);
|
|
} else {
|
|
assert(appname);
|
|
- desc_string = dupprintf("Run %.*s", strcspn(appname, "."), appname);
|
|
+ desc_string = dupprintf("Run %.*s", (int)strcspn(appname, "."), appname);
|
|
}
|
|
ret->lpVtbl->SetDescription(ret, desc_string);
|
|
sfree(desc_string);
|
|
@@ -457,7 +457,7 @@
|
|
pv.pszVal = dupstr(sessionname);
|
|
} else {
|
|
assert(appname);
|
|
- pv.pszVal = dupprintf("Run %.*s", strcspn(appname, "."), appname);
|
|
+ pv.pszVal = dupprintf("Run %.*s", (int)strcspn(appname, "."), appname);
|
|
}
|
|
pPS->lpVtbl->SetValue(pPS, &PKEY_Title, &pv);
|
|
sfree(pv.pszVal);
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winnet.c putty/windows/winnet.c
|
|
--- putty-master/windows/winnet.c 2015-08-02 17:59:19.381189500 +0200
|
|
+++ putty/windows/winnet.c 2015-08-02 17:55:27.839358100 +0200
|
|
@@ -138,7 +138,7 @@
|
|
static int cmpfortree(void *av, void *bv)
|
|
{
|
|
Actual_Socket a = (Actual_Socket) av, b = (Actual_Socket) bv;
|
|
- unsigned long as = (unsigned long) a->s, bs = (unsigned long) b->s;
|
|
+ uintptr_t as = (uintptr_t) a->s, bs = (uintptr_t) b->s;
|
|
if (as < bs)
|
|
return -1;
|
|
if (as > bs)
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winpgen.c putty/windows/winpgen.c
|
|
--- putty-master/windows/winpgen.c 2015-08-02 17:59:19.389193100 +0200
|
|
+++ putty/windows/winpgen.c 2015-08-02 17:46:44.758079800 +0200
|
|
@@ -302,7 +302,7 @@
|
|
return 0;
|
|
case 101:
|
|
EnableWindow(hwnd, 0);
|
|
- DialogBox(hinst, MAKEINTRESOURCE(214), hwnd, LicenceProc);
|
|
+ DialogBox(hinst, MAKEINTRESOURCE(214), hwnd, (DLGPROC)LicenceProc);
|
|
EnableWindow(hwnd, 1);
|
|
SetActiveWindow(hwnd);
|
|
return 0;
|
|
@@ -624,7 +624,7 @@
|
|
pps.comment = comment;
|
|
dlgret = DialogBoxParam(hinst,
|
|
MAKEINTRESOURCE(210),
|
|
- NULL, PassphraseProc,
|
|
+ NULL, (DLGPROC)PassphraseProc,
|
|
(LPARAM) &pps);
|
|
if (!dlgret) {
|
|
ret = -2;
|
|
@@ -1002,7 +1002,7 @@
|
|
break;
|
|
case IDC_ABOUT:
|
|
EnableWindow(hwnd, 0);
|
|
- DialogBox(hinst, MAKEINTRESOURCE(213), hwnd, AboutProc);
|
|
+ DialogBox(hinst, MAKEINTRESOURCE(213), hwnd, (DLGPROC)AboutProc);
|
|
EnableWindow(hwnd, 1);
|
|
SetActiveWindow(hwnd);
|
|
return 0;
|
|
@@ -1468,7 +1468,7 @@
|
|
}
|
|
|
|
random_ref();
|
|
- ret = DialogBox(hinst, MAKEINTRESOURCE(201), NULL, MainDlgProc) != IDOK;
|
|
+ ret = DialogBox(hinst, MAKEINTRESOURCE(201), NULL, (DLGPROC)MainDlgProc) != IDOK;
|
|
|
|
cleanup_exit(ret);
|
|
return ret; /* just in case optimiser complains */
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winpgnt.c putty/windows/winpgnt.c
|
|
--- putty-master/windows/winpgnt.c 2015-08-02 17:59:19.394192000 +0200
|
|
+++ putty/windows/winpgnt.c 2015-08-02 17:51:52.048702400 +0200
|
|
@@ -160,7 +160,7 @@
|
|
return 0;
|
|
case 101:
|
|
EnableWindow(hwnd, 0);
|
|
- DialogBox(hinst, MAKEINTRESOURCE(214), hwnd, LicenceProc);
|
|
+ DialogBox(hinst, MAKEINTRESOURCE(214), hwnd, (DLGPROC)LicenceProc);
|
|
EnableWindow(hwnd, 1);
|
|
SetActiveWindow(hwnd);
|
|
return 0;
|
|
@@ -383,7 +383,7 @@
|
|
pps.passphrase = &passphrase;
|
|
pps.comment = err;
|
|
dlgret = DialogBoxParam(hinst, MAKEINTRESOURCE(210),
|
|
- NULL, PassphraseProc, (LPARAM) &pps);
|
|
+ NULL, (DLGPROC)PassphraseProc, (LPARAM) &pps);
|
|
passphrase_box = NULL;
|
|
|
|
if (!dlgret)
|
|
@@ -791,7 +789,7 @@
|
|
case WM_SYSCOMMAND:
|
|
switch (wParam & ~0xF) { /* low 4 bits reserved to Windows */
|
|
case IDM_PUTTY:
|
|
- if((INT_PTR)ShellExecute(hwnd, NULL, putty_path, _T(""), _T(""),
|
|
+ if((uintptr_t)ShellExecute(hwnd, NULL, putty_path, _T(""), _T(""),
|
|
SW_SHOW) <= 32) {
|
|
MessageBox(NULL, "Unable to execute PuTTY!",
|
|
"Error", MB_OK | MB_ICONERROR);
|
|
@@ -805,7 +803,7 @@
|
|
case IDM_VIEWKEYS:
|
|
if (!keylist) {
|
|
keylist = CreateDialog(hinst, MAKEINTRESOURCE(211),
|
|
- NULL, KeyListProc);
|
|
+ NULL, (DLGPROC)KeyListProc);
|
|
ShowWindow(keylist, SW_SHOWNORMAL);
|
|
}
|
|
/*
|
|
@@ -830,7 +828,7 @@
|
|
case IDM_ABOUT:
|
|
if (!aboutbox) {
|
|
aboutbox = CreateDialog(hinst, MAKEINTRESOURCE(213),
|
|
- NULL, AboutProc);
|
|
+ NULL, (DLGPROC)AboutProc);
|
|
ShowWindow(aboutbox, SW_SHOWNORMAL);
|
|
/*
|
|
* Sometimes the window comes up minimised / hidden
|
|
@@ -858,7 +856,7 @@
|
|
GetMenuItemInfo(session_menu, wParam, FALSE, &mii);
|
|
strcpy(param, "@");
|
|
strcat(param, mii.dwTypeData);
|
|
- if((INT_PTR)ShellExecute(hwnd, NULL, putty_path, param,
|
|
+ if((uintptr_t)ShellExecute(hwnd, NULL, putty_path, param,
|
|
_T(""), SW_SHOW) <= 32) {
|
|
MessageBox(NULL, "Unable to execute PuTTY!", "Error",
|
|
MB_OK | MB_ICONERROR);
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winprint.c putty/windows/winprint.c
|
|
--- putty-master/windows/winprint.c 2015-08-02 17:59:19.401192000 +0200
|
|
+++ putty/windows/winprint.c 2015-08-02 17:46:44.771081500 +0200
|
|
@@ -30,7 +30,7 @@
|
|
* we'll need for the output. Discard the return value since it
|
|
* will almost certainly be a failure due to lack of space.
|
|
*/
|
|
- EnumPrinters(param, NULL, level, (*buffer)+offset, 512,
|
|
+ EnumPrinters(param, NULL, level, (LPBYTE)((*buffer)+offset), 512,
|
|
&needed, &nprinters);
|
|
|
|
if (needed < 512)
|
|
@@ -38,7 +38,7 @@
|
|
|
|
*buffer = sresize(*buffer, offset+needed, char);
|
|
|
|
- if (EnumPrinters(param, NULL, level, (*buffer)+offset,
|
|
+ if (EnumPrinters(param, NULL, level, (LPBYTE)((*buffer)+offset),
|
|
needed, &needed, &nprinters) == 0)
|
|
return FALSE;
|
|
|
|
@@ -139,7 +139,7 @@
|
|
docinfo.pOutputFile = NULL;
|
|
docinfo.pDatatype = "RAW";
|
|
|
|
- if (!StartDocPrinter(ret->hprinter, 1, (LPSTR)&docinfo))
|
|
+ if (!StartDocPrinter(ret->hprinter, 1, (LPBYTE)&docinfo))
|
|
goto error;
|
|
jobstarted = 1;
|
|
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winsecur.c putty/windows/winsecur.c
|
|
--- putty-master/windows/winsecur.c 2015-08-02 17:59:19.414197200 +0200
|
|
+++ putty/windows/winsecur.c 2015-08-02 17:46:44.779083600 +0200
|
|
@@ -94,8 +94,8 @@
|
|
|
|
int getsids(char *error)
|
|
{
|
|
- SID_IDENTIFIER_AUTHORITY world_auth = SECURITY_WORLD_SID_AUTHORITY;
|
|
- SID_IDENTIFIER_AUTHORITY nt_auth = SECURITY_NT_AUTHORITY;
|
|
+ SID_IDENTIFIER_AUTHORITY world_auth = {SECURITY_WORLD_SID_AUTHORITY};
|
|
+ SID_IDENTIFIER_AUTHORITY nt_auth = {SECURITY_NT_AUTHORITY};
|
|
int ret;
|
|
|
|
error=NULL;
|
|
@@ -231,7 +231,7 @@
|
|
int ret=FALSE;
|
|
PACL acl = NULL;
|
|
|
|
- static const nastyace=WRITE_DAC | WRITE_OWNER |
|
|
+ static const int nastyace=WRITE_DAC | WRITE_OWNER |
|
|
PROCESS_CREATE_PROCESS | PROCESS_CREATE_THREAD |
|
|
PROCESS_DUP_HANDLE | PROCESS_QUERY_INFORMATION |
|
|
PROCESS_SET_QUOTA | PROCESS_SET_INFORMATION |
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winser.c putty/windows/winser.c
|
|
--- putty-master/windows/winser.c 2015-08-02 17:59:19.417193400 +0200
|
|
+++ putty/windows/winser.c 2015-08-02 17:46:44.788083900 +0200
|
|
@@ -122,7 +122,7 @@
|
|
* Configurable parameters.
|
|
*/
|
|
dcb.BaudRate = conf_get_int(conf, CONF_serspeed);
|
|
- msg = dupprintf("Configuring baud rate %d", dcb.BaudRate);
|
|
+ msg = dupprintf("Configuring baud rate %lu", dcb.BaudRate);
|
|
logevent(serial->frontend, msg);
|
|
sfree(msg);
|
|
|
|
@@ -297,6 +297,7 @@
|
|
/*
|
|
* FIXME: what should we do if err returns something?
|
|
*/
|
|
+ (void)err;
|
|
}
|
|
|
|
/*
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winsftp.c putty/windows/winsftp.c
|
|
--- putty-master/windows/winsftp.c 2015-08-02 17:59:19.419190600 +0200
|
|
+++ putty/windows/winsftp.c 2015-08-02 17:46:44.802085400 +0200
|
|
@@ -221,7 +221,7 @@
|
|
return -1;
|
|
}
|
|
|
|
- SetFilePointer(f->h, offset.lo, &(offset.hi), movemethod);
|
|
+ SetFilePointer(f->h, offset.lo, (PLONG)&(offset.hi), movemethod);
|
|
|
|
if (GetLastError() != NO_ERROR)
|
|
return -1;
|
|
@@ -234,7 +234,7 @@
|
|
uint64 ret;
|
|
|
|
ret.hi = 0L;
|
|
- ret.lo = SetFilePointer(f->h, 0L, &(ret.hi), FILE_CURRENT);
|
|
+ ret.lo = SetFilePointer(f->h, 0L, (PLONG)&(ret.hi), FILE_CURRENT);
|
|
|
|
return ret;
|
|
}
|
|
diff -aur -x.git '-x*.o' '-x*.exe' '-x*.mft' -xterminal.c putty-master/windows/winstore.c putty/windows/winstore.c
|
|
--- putty-master/windows/winstore.c 2015-08-02 17:59:19.422196200 +0200
|
|
+++ putty/windows/winstore.c 2015-08-02 17:46:44.814084200 +0200
|
|
@@ -110,7 +110,7 @@
|
|
void write_setting_s(void *handle, const char *key, const char *value)
|
|
{
|
|
if (handle)
|
|
- RegSetValueEx((HKEY) handle, key, 0, REG_SZ, value,
|
|
+ RegSetValueEx((HKEY) handle, key, 0, REG_SZ, (LPBYTE)value,
|
|
1 + strlen(value));
|
|
}
|
|
|
|
@@ -168,7 +168,7 @@
|
|
allocsize = size+1; /* allow for an extra NUL if needed */
|
|
ret = snewn(allocsize, char);
|
|
if (RegQueryValueEx((HKEY) handle, key, 0,
|
|
- &type, ret, &size) != ERROR_SUCCESS ||
|
|
+ &type, (LPBYTE)ret, &size) != ERROR_SUCCESS ||
|
|
type != REG_SZ) {
|
|
sfree(ret);
|
|
return NULL;
|
|
@@ -372,7 +372,7 @@
|
|
|
|
readlen = len;
|
|
otherstr = snewn(len, char);
|
|
- ret = RegQueryValueEx(rkey, regname, NULL, &type, otherstr, &readlen);
|
|
+ ret = RegQueryValueEx(rkey, regname, NULL, &type, (LPBYTE)otherstr, &readlen);
|
|
|
|
if (ret != ERROR_SUCCESS && ret != ERROR_MORE_DATA &&
|
|
!strcmp(keytype, "rsa")) {
|
|
@@ -385,7 +385,7 @@
|
|
char *oldstyle = snewn(len + 10, char); /* safety margin */
|
|
readlen = len;
|
|
ret = RegQueryValueEx(rkey, justhost, NULL, &type,
|
|
- oldstyle, &readlen);
|
|
+ (LPBYTE)oldstyle, &readlen);
|
|
|
|
if (ret == ERROR_SUCCESS && type == REG_SZ) {
|
|
/*
|
|
@@ -431,7 +431,7 @@
|
|
* wrong, and hyper-cautiously do nothing.
|
|
*/
|
|
if (!strcmp(otherstr, key))
|
|
- RegSetValueEx(rkey, regname, 0, REG_SZ, otherstr,
|
|
+ RegSetValueEx(rkey, regname, 0, REG_SZ, (LPBYTE)otherstr,
|
|
strlen(otherstr) + 1);
|
|
}
|
|
|
|
@@ -476,7 +476,7 @@
|
|
|
|
if (RegCreateKey(HKEY_CURRENT_USER, PUTTY_REG_POS "\\SshHostKeys",
|
|
&rkey) == ERROR_SUCCESS) {
|
|
- RegSetValueEx(rkey, regname, 0, REG_SZ, key, strlen(key) + 1);
|
|
+ RegSetValueEx(rkey, regname, 0, REG_SZ, (LPBYTE)key, strlen(key) + 1);
|
|
RegCloseKey(rkey);
|
|
} /* else key does not exist in registry */
|
|
|
|
@@ -536,7 +536,7 @@
|
|
if (RegOpenKey(HKEY_CURRENT_USER, PUTTY_REG_POS, &rkey) ==
|
|
ERROR_SUCCESS) {
|
|
int ret = RegQueryValueEx(rkey, "RandSeedFile",
|
|
- 0, &type, seedpath, &size);
|
|
+ 0, &type, (LPBYTE)seedpath, (LPDWORD)&size);
|
|
if (ret != ERROR_SUCCESS || type != REG_SZ)
|
|
seedpath[0] = '\0';
|
|
RegCloseKey(rkey);
|
|
@@ -672,7 +672,7 @@
|
|
value_length = 200;
|
|
old_value = snewn(value_length, char);
|
|
ret = RegQueryValueEx(pjumplist_key, reg_jumplist_value, NULL, &type,
|
|
- old_value, &value_length);
|
|
+ (LPBYTE)old_value, (LPDWORD)&value_length);
|
|
/* When the passed buffer is too small, ERROR_MORE_DATA is
|
|
* returned and the required size is returned in the length
|
|
* argument. */
|
|
@@ -680,7 +680,7 @@
|
|
sfree(old_value);
|
|
old_value = snewn(value_length, char);
|
|
ret = RegQueryValueEx(pjumplist_key, reg_jumplist_value, NULL, &type,
|
|
- old_value, &value_length);
|
|
+ (LPBYTE)old_value, (LPDWORD)&value_length);
|
|
}
|
|
|
|
if (ret == ERROR_FILE_NOT_FOUND) {
|
|
@@ -754,7 +754,7 @@
|
|
|
|
/* Save the new list to the registry. */
|
|
ret = RegSetValueEx(pjumplist_key, reg_jumplist_value, 0, REG_MULTI_SZ,
|
|
- new_value, piterator_new - new_value);
|
|
+ (LPBYTE)new_value, piterator_new - new_value);
|
|
|
|
sfree(old_value);
|
|
old_value = new_value;
|
|
|