mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 13:32:48 -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:
@ -1543,7 +1543,8 @@ static void init_fonts(int pick_width, int pick_height)
|
||||
if (cset == OEM_CHARSET)
|
||||
ucsdata.font_codepage = GetOEMCP();
|
||||
else
|
||||
if (TranslateCharsetInfo ((DWORD *) cset, &info, TCI_SRCCHARSET))
|
||||
if (TranslateCharsetInfo ((DWORD *)(ULONG_PTR)cset,
|
||||
&info, TCI_SRCCHARSET))
|
||||
ucsdata.font_codepage = info.ciACP;
|
||||
else
|
||||
ucsdata.font_codepage = -1;
|
||||
|
Reference in New Issue
Block a user