aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_basebackup/pg_basebackup.c
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2011-12-10 18:15:15 -0500
committerAndrew Dunstan <andrew@dunslane.net>2011-12-10 18:15:15 -0500
commit0f44335122fd01b54417bc955d6a98b967ca832c (patch)
tree5665ffb15965209fb218416f79ed265eff975823 /src/bin/pg_basebackup/pg_basebackup.c
parent8e461ca5a9714f3487534b2b0dddb8eb2dda94af (diff)
downloadpostgresql-0f44335122fd01b54417bc955d6a98b967ca832c.tar.gz
postgresql-0f44335122fd01b54417bc955d6a98b967ca832c.zip
Miscellaneous cleanup to silence compiler warnings seen on Mingw.
Remove some dead code, conditionally declare some items or call some code, and fix one or two declarations.
Diffstat (limited to 'src/bin/pg_basebackup/pg_basebackup.c')
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 9100d75fb6f..81b49795b6d 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -63,7 +63,11 @@ static pid_t bgchild = -1;
/* End position for xlog streaming, empty string if unknown yet */
static XLogRecPtr xlogendptr;
+#ifndef WIN32
static int has_xlogendptr = 0;
+#else
+static volatile LONG has_xlogendptr = 0;
+#endif
/* Function headers */
static void usage(void);
@@ -1070,10 +1074,11 @@ BaseBackup(void)
if (bgchild > 0)
{
- int status;
-
#ifndef WIN32
+ int status;
int r;
+#else
+ DWORD status;
#endif
if (verbose)
@@ -1147,7 +1152,7 @@ BaseBackup(void)
if (status != 0)
{
fprintf(stderr, _("%s: child thread exited with error %u\n"),
- progname, status);
+ progname, (unsigned int) status);
disconnect_and_exit(1);
}
/* Exited normally, we're happy */