mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 09:27:59 +00:00
Fix the _rest_ of the Windows compile warnings. (ahem)
[originally from svn r9201]
This commit is contained in:
parent
1fda4423e0
commit
f1aadeed67
18
ldiscucs.c
18
ldiscucs.c
@ -71,17 +71,17 @@ void luni_send(void *handle, wchar_t * widebuf, int len, int interactive)
|
||||
if (ch < 0x80) {
|
||||
*p++ = (char) (ch);
|
||||
} else if (ch < 0x800) {
|
||||
*p++ = (0xC0 | (ch >> 6));
|
||||
*p++ = (0x80 | (ch & 0x3F));
|
||||
*p++ = (char) (0xC0 | (ch >> 6));
|
||||
*p++ = (char) (0x80 | (ch & 0x3F));
|
||||
} else if (ch < 0x10000) {
|
||||
*p++ = (0xE0 | (ch >> 12));
|
||||
*p++ = (0x80 | ((ch >> 6) & 0x3F));
|
||||
*p++ = (0x80 | (ch & 0x3F));
|
||||
*p++ = (char) (0xE0 | (ch >> 12));
|
||||
*p++ = (char) (0x80 | ((ch >> 6) & 0x3F));
|
||||
*p++ = (char) (0x80 | (ch & 0x3F));
|
||||
} else {
|
||||
*p++ = (0xF0 | (ch >> 18));
|
||||
*p++ = (0x80 | ((ch >> 12) & 0x3F));
|
||||
*p++ = (0x80 | ((ch >> 6) & 0x3F));
|
||||
*p++ = (0x80 | (ch & 0x3F));
|
||||
*p++ = (char) (0xF0 | (ch >> 18));
|
||||
*p++ = (char) (0x80 | ((ch >> 12) & 0x3F));
|
||||
*p++ = (char) (0x80 | ((ch >> 6) & 0x3F));
|
||||
*p++ = (char) (0x80 | (ch & 0x3F));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -43,7 +43,7 @@ static void logwrite(struct LogContext *ctx, void *data, int len)
|
||||
bufchain_add(&ctx->queue, data, len);
|
||||
} else if (ctx->state == L_OPEN) {
|
||||
assert(ctx->lgfp);
|
||||
if (fwrite(data, 1, len, ctx->lgfp) < len) {
|
||||
if (fwrite(data, 1, len, ctx->lgfp) < (size_t)len) {
|
||||
logfclose(ctx);
|
||||
ctx->state = L_ERROR;
|
||||
/* Log state is L_ERROR so this won't cause a loop */
|
||||
|
@ -1691,7 +1691,7 @@ char *get_hostname(void)
|
||||
hostname = NULL;
|
||||
break;
|
||||
}
|
||||
} while (strlen(hostname) >= len-1);
|
||||
} while (strlen(hostname) >= (size_t)(len-1));
|
||||
return hostname;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user