Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9486844

Browse filesBrowse files
committed
Use correct format placeholder for WSAGetLastError()
Some code thought this was unsigned, but it's signed int.
1 parent 6bbcff0 commit 9486844
Copy full SHA for 9486844

File tree

Expand file treeCollapse file tree

4 files changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+6
-6
lines changed

‎src/backend/libpq/pqcomm.c

Copy file name to clipboardExpand all lines: src/backend/libpq/pqcomm.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ pq_setkeepaliveswin32(Port *port, int idle, int interval)
15941594
!= 0)
15951595
{
15961596
ereport(LOG,
1597-
(errmsg("WSAIoctl(%s) failed: %ui",
1597+
(errmsg("WSAIoctl(%s) failed: %d",
15981598
"SIO_KEEPALIVE_VALS", WSAGetLastError())));
15991599
return STATUS_ERROR;
16001600
}

‎src/backend/port/win32/socket.c

Copy file name to clipboardExpand all lines: src/backend/port/win32/socket.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ pgwin32_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, c
635635
{
636636
ZeroMemory(&resEvents, sizeof(resEvents));
637637
if (WSAEnumNetworkEvents(sockets[i], events[i], &resEvents) != 0)
638-
elog(ERROR, "failed to enumerate network events: error code %u",
638+
elog(ERROR, "failed to enumerate network events: error code %d",
639639
WSAGetLastError());
640640
/* Read activity? */
641641
if (readfds && FD_ISSET(sockets[i], readfds))

‎src/backend/storage/ipc/latch.c

Copy file name to clipboardExpand all lines: src/backend/storage/ipc/latch.c
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,11 +1280,11 @@ WaitEventAdjustWin32(WaitEventSet *set, WaitEvent *event)
12801280
{
12811281
*handle = WSACreateEvent();
12821282
if (*handle == WSA_INVALID_EVENT)
1283-
elog(ERROR, "failed to create event for socket: error code %u",
1283+
elog(ERROR, "failed to create event for socket: error code %d",
12841284
WSAGetLastError());
12851285
}
12861286
if (WSAEventSelect(event->fd, *handle, flags) != 0)
1287-
elog(ERROR, "failed to set up event for socket: error code %u",
1287+
elog(ERROR, "failed to set up event for socket: error code %d",
12881288
WSAGetLastError());
12891289

12901290
Assert(event->fd != PGINVALID_SOCKET);
@@ -1971,7 +1971,7 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
19711971

19721972
ZeroMemory(&resEvents, sizeof(resEvents));
19731973
if (WSAEnumNetworkEvents(cur_event->fd, handle, &resEvents) != 0)
1974-
elog(ERROR, "failed to enumerate network events: error code %u",
1974+
elog(ERROR, "failed to enumerate network events: error code %d",
19751975
WSAGetLastError());
19761976
if ((cur_event->events & WL_SOCKET_READABLE) &&
19771977
(resEvents.lNetworkEvents & FD_READ))

‎src/interfaces/libpq/fe-connect.c

Copy file name to clipboardExpand all lines: src/interfaces/libpq/fe-connect.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ setKeepalivesWin32(PGconn *conn)
19851985
!= 0)
19861986
{
19871987
appendPQExpBuffer(&conn->errorMessage,
1988-
libpq_gettext("WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"),
1988+
libpq_gettext("WSAIoctl(SIO_KEEPALIVE_VALS) failed: %d\n"),
19891989
WSAGetLastError());
19901990
return 0;
19911991
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.