Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix the _rest_ of the Windows compile warnings. (ahem)

git-svn-id: svn://svn.tartarus.org/sgt/putty@9201 cda61777-01e9-0310-a592-d414129be87e
  • Loading branch information...
commit 806c9d94341c912a45e563d87ad36d63966a4308 1 parent 08b5c9a
simon authored
Showing with 11 additions and 11 deletions.
  1. +9 −9 ldiscucs.c
  2. +1 −1  logging.c
  3. +1 −1  windows/winnet.c
View
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 {
View
2  logging.c
@@ -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 */
View
2  windows/winnet.c
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.