mirror of
https://github.com/postgres/postgres.git
synced 2025-10-18 04:29:09 +03:00
Silence a few compiler warnings from gcc on MinGW.
Most of these cast DWORD to int or unsigned int for printf type handling. This is safe even on 64 bit architectures because a DWORD is always 32 bits. In one case a variable is initialised to keep the compiler happy.
This commit is contained in:
@@ -94,7 +94,7 @@ WaitLatchOrSocket(volatile Latch *latch, SOCKET sock, bool forRead,
|
||||
DWORD rc;
|
||||
HANDLE events[3];
|
||||
HANDLE latchevent;
|
||||
HANDLE sockevent;
|
||||
HANDLE sockevent = WSA_INVALID_EVENT; /* silence compiler */
|
||||
int numevents;
|
||||
int result = 0;
|
||||
|
||||
@@ -161,7 +161,7 @@ WaitLatchOrSocket(volatile Latch *latch, SOCKET sock, bool forRead,
|
||||
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 */
|
||||
|
Reference in New Issue
Block a user