git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0e936a2)
Fix compiler warning about format on Windows
2020年1月14日 22:59:18 +0000 (23:59 +0100)
2020年1月14日 22:59:18 +0000 (23:59 +0100)
On 64-bit Windows, pid_t is long long int, so a %d format isn't
enough.


diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c
index b46411433395843e6266d1730399d0e4c373c543..a5e85d32f31e4916ab8415d3b620e8d167dd9873 100644 (file)
--- a/src/backend/replication/walreceiver.c
+++ b/src/backend/replication/walreceiver.c
@@ -366,7 +366,8 @@ WalReceiverMain(void)
if (wal_receiver_create_temp_slot)
{
snprintf(slotname, sizeof(slotname),
- "pg_walreceiver_%d", walrcv_get_backend_pid(wrconn));
+ "pg_walreceiver_%lld",
+ (long long int) walrcv_get_backend_pid(wrconn));
walrcv_create_slot(wrconn, slotname, true, 0, NULL);
changed = true;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /