1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-14 09:37:34 -05: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:
Simon Tatham
2017-02-05 11:19:12 +00:00
parent c7f466309c
commit ca8876f004
3 changed files with 4 additions and 3 deletions

View File

@ -934,7 +934,7 @@ int x11_send(struct X11Connection *xconn, char *data, int len)
* Write a new connection header containing our replacement
* auth data.
*/
socketdatalen = 0; /* placate compiler warning */
socketdata = sk_getxdmdata(xconn->s, &socketdatalen);
if (socketdata && socketdatalen==6) {
sprintf(new_peer_addr, "%d.%d.%d.%d", socketdata[0],