Commit 90317ab7 authored by Michael Paquier's avatar Michael Paquier

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
parent 3373c715
...@@ -1445,7 +1445,9 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) ...@@ -1445,7 +1445,9 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum)
if (file == NULL) if (file == NULL)
{ {
#ifndef WIN32
int filemode; int filemode;
#endif
/* /*
* No current file, so this must be the header for a new file * No current file, so this must be the header for a new file
...@@ -1459,8 +1461,10 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) ...@@ -1459,8 +1461,10 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum)
current_len_left = read_tar_number(&copybuf[124], 12); current_len_left = read_tar_number(&copybuf[124], 12);
#ifndef WIN32
/* Set permissions on the file */ /* Set permissions on the file */
filemode = read_tar_number(&copybuf[100], 8); filemode = read_tar_number(&copybuf[100], 8);
#endif
/* /*
* All files are padded up to 512 bytes * All files are padded up to 512 bytes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment