From ed61127be483d8939e13a151773549f1517d6e67 Mon Sep 17 00:00:00 2001 From: Tom Lane <tgl@sss.pgh.pa.us> Date: Fri, 23 Mar 2012 20:18:04 -0400 Subject: [PATCH] Cast some printf arguments to avoid possibly-nonportable behavior. Per compiler warnings on buildfarm member black_firefly. --- src/backend/replication/basebackup.c | 2 +- src/bin/pg_basebackup/pg_basebackup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index 81203c9f5ac..72e79ce0452 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -867,7 +867,7 @@ _tarWriteHeader(const char *filename, const char *linktarget, } /* Mode 8 */ - sprintf(&h[100], "%07o ", statbuf->st_mode); + sprintf(&h[100], "%07o ", (int) statbuf->st_mode); /* User ID 8 */ sprintf(&h[108], "%07o ", statbuf->st_uid); diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index bf88726f326..4cb430b7e89 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -1103,7 +1103,7 @@ BaseBackup(void) if (r != bgchild) { fprintf(stderr, _("%s: child %i died, expected %i\n"), - progname, r, bgchild); + progname, r, (int) bgchild); disconnect_and_exit(1); } if (!WIFEXITED(status)) -- GitLab