mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Fix a few more clang-generated warnings.
These are benign, I think. clang warns about casting non-pointer-sized integers to pointers, but the Windows API actually does sometimes involve values that are either pointers or _small_ integers, so in the two cases involved I just cast through ULONG_PTR to silence the warning. And clang insists that the integer whose address I give to sk_getxdmdata is still uninitialised afterwards, which is just a lie.
This commit is contained in:
parent
c7f466309c
commit
ca8876f004
@ -76,7 +76,7 @@ HWND doctl(struct ctlpos *cp, RECT r,
|
|||||||
if (cp->hwnd) {
|
if (cp->hwnd) {
|
||||||
ctl = CreateWindowEx(exstyle, wclass, wtext, wstyle,
|
ctl = CreateWindowEx(exstyle, wclass, wtext, wstyle,
|
||||||
r.left, r.top, r.right, r.bottom,
|
r.left, r.top, r.right, r.bottom,
|
||||||
cp->hwnd, (HMENU) wid, hinst, NULL);
|
cp->hwnd, (HMENU)(ULONG_PTR)wid, hinst, NULL);
|
||||||
SendMessage(ctl, WM_SETFONT, cp->font, MAKELPARAM(TRUE, 0));
|
SendMessage(ctl, WM_SETFONT, cp->font, MAKELPARAM(TRUE, 0));
|
||||||
|
|
||||||
if (!strcmp(wclass, "LISTBOX")) {
|
if (!strcmp(wclass, "LISTBOX")) {
|
||||||
|
@ -1543,7 +1543,8 @@ static void init_fonts(int pick_width, int pick_height)
|
|||||||
if (cset == OEM_CHARSET)
|
if (cset == OEM_CHARSET)
|
||||||
ucsdata.font_codepage = GetOEMCP();
|
ucsdata.font_codepage = GetOEMCP();
|
||||||
else
|
else
|
||||||
if (TranslateCharsetInfo ((DWORD *) cset, &info, TCI_SRCCHARSET))
|
if (TranslateCharsetInfo ((DWORD *)(ULONG_PTR)cset,
|
||||||
|
&info, TCI_SRCCHARSET))
|
||||||
ucsdata.font_codepage = info.ciACP;
|
ucsdata.font_codepage = info.ciACP;
|
||||||
else
|
else
|
||||||
ucsdata.font_codepage = -1;
|
ucsdata.font_codepage = -1;
|
||||||
|
2
x11fwd.c
2
x11fwd.c
@ -934,7 +934,7 @@ int x11_send(struct X11Connection *xconn, char *data, int len)
|
|||||||
* Write a new connection header containing our replacement
|
* Write a new connection header containing our replacement
|
||||||
* auth data.
|
* auth data.
|
||||||
*/
|
*/
|
||||||
|
socketdatalen = 0; /* placate compiler warning */
|
||||||
socketdata = sk_getxdmdata(xconn->s, &socketdatalen);
|
socketdata = sk_getxdmdata(xconn->s, &socketdatalen);
|
||||||
if (socketdata && socketdatalen==6) {
|
if (socketdata && socketdatalen==6) {
|
||||||
sprintf(new_peer_addr, "%d.%d.%d.%d", socketdata[0],
|
sprintf(new_peer_addr, "%d.%d.%d.%d", socketdata[0],
|
||||||
|
Loading…
Reference in New Issue
Block a user