mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-18 03:28:07 -05:00

wcrtomb returns a size_t, so it's silly to immediately assign it into an int variable. Apparently running gcc with LTO enabled points this out as an error. This was benign as far as I can see: the obvious risk of integer overflow could only happen if the OS wanted to convert a single wide character into more than 2^31 bytes, and the test of the return value against (size_t)-1 for an error check seems to work anyway in practice, although I suspect that's only because of implementation- defined behaviour in gcc at the point where the size_t is narrowed to a signed int.