static int cmpforsearch(void *av, void *bv)
{
Actual_Socket b = (Actual_Socket) bv;
- unsigned long as = (unsigned long) av, bs = (unsigned long) b->s;
+ uintptr_t as = (uintptr_t) av, bs = (uintptr_t) b->s;
if (as < bs)
return -1;
if (as > bs)
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
es->text + bufused, bufsize - bufused, NULL)) {
sprintf(es->text + bufused,
- "Windows error code %d (and FormatMessage returned %d)",
- error, GetLastError());
+ "Windows error code %d (and FormatMessage returned %u)",
+ error, (unsigned int)GetLastError());
} else {
int len = strlen(es->text);
if (len > 0 && es->text[len-1] == '\n')
ret = p_recv(s->s, buf, sizeof(buf), MSG_OOB);
noise_ultralight(ret);
if (ret <= 0) {
- char *str = (ret == 0 ? "Internal networking trouble" :
+ const char *str = (ret == 0 ? "Internal networking trouble" :
winsock_error_string(p_WSAGetLastError()));
/* We're inside the Windows frontend here, so we know
* that the frontend handle is unnecessary. */