aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-07-21 22:27:11 +0900
committerMichael Paquier <michael@paquier.xyz>2019-07-21 22:27:11 +0900
commit90317ab7e64bd2d855c73a6ba579de6d04a7b25c (patch)
tree1a034ad3c4f853d16f187f28d1e376afa9abb90a
parent3373c7155350cf6fcd51dd090f29e1332901e329 (diff)
downloadpostgresql-90317ab7e64bd2d855c73a6ba579de6d04a7b25c.tar.gz
postgresql-90317ab7e64bd2d855c73a6ba579de6d04a7b25c.zip
Fix compilation warning of pg_basebackup with MinGW
Several buildfarm members have been complaining about that with gcc, like jacana. Weirdly enough, Visual Studio's compilers do not find this issue. Author: Michael Paquier Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/20190719050830.GK1859@paquier.xyz
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 15f43f9432b..77a7c148bae 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -1445,7 +1445,9 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum)
if (file == NULL)
{
+#ifndef WIN32
int filemode;
+#endif
/*
* No current file, so this must be the header for a new file
@@ -1459,8 +1461,10 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum)
current_len_left = read_tar_number(&copybuf[124], 12);
+#ifndef WIN32
/* Set permissions on the file */
filemode = read_tar_number(&copybuf[100], 8);
+#endif
/*
* All files are padded up to 512 bytes