summaryrefslogtreecommitdiff
path: root/src/backend/port/win32_latch.c
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2011-04-23 18:10:23 -0400
committerAndrew Dunstan <andrew@dunslane.net>2011-04-23 18:10:23 -0400
commitd98711dfef6ade6a26aa0f4c0a775087ed13e060 (patch)
treee119cafaf670df01add6f6840e97e71a51a94ab1 /src/backend/port/win32_latch.c
parent970d8a39736fd67e3ebf406ed8129eed0767d15d (diff)
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.
Diffstat (limited to 'src/backend/port/win32_latch.c')
-rw-r--r--src/backend/port/win32_latch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/port/win32_latch.c b/src/backend/port/win32_latch.c
index b158300d572..3509302aaae 100644
--- a/src/backend/port/win32_latch.c
+++ b/src/backend/port/win32_latch.c
@@ -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 */