systemTicks = GetTickCount();
snprintf(dumpPath, _MAX_PATH,
- "crashdumps\\postgres-pid%0i-%0i.mdmp", selfPid, systemTicks);
+ "crashdumps\\postgres-pid%0i-%0i.mdmp",
+ (int) selfPid, (int) systemTicks);
dumpPath[_MAX_PATH - 1] = '\0';
dumpFile = CreateFile(dumpPath, GENERIC_WRITE, FILE_SHARE_WRITE,
NULL);
if (dumpFile == INVALID_HANDLE_VALUE)
{
- write_stderr("could not open crash dump file %s for writing: error code %d\n",
- dumpPath, GetLastError());
+ write_stderr("could not open crash dump file %s for writing: error code %u\n",
+ dumpPath, (unsigned int) GetLastError());
return EXCEPTION_CONTINUE_SEARCH;
}
write_stderr("wrote crash dump to %s\n", dumpPath);
else
write_stderr("could not write crash dump to %s: error code %08x\n",
- dumpPath, GetLastError());
+ dumpPath, (unsigned int) GetLastError());
CloseHandle(dumpFile);
}
DWORD rc;
HANDLE events[3];
HANDLE latchevent;
- HANDLE sockevent;
+ HANDLE sockevent = WSA_INVALID_EVENT; /* silence compiler */
int numevents;
int result = 0;
break;
}
else if (rc != WAIT_OBJECT_0)
- elog(ERROR, "unexpected return code from WaitForMultipleObjects(): %d", rc);
+ elog(ERROR, "unexpected return code from WaitForMultipleObjects(): %d", (int) rc);
}
/* Clean up the handle we created for the socket */