aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-01-22 12:25:48 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2011-01-22 12:26:44 -0500
commit3ae28ce8c437811bba47c09d1212c2d3c41cb7ff (patch)
treebf62a578e9db537571c4b92fdcb54216e6249834
parentf5a0fd2f3bbe233802cbbddfe8bdf086c69c1ac3 (diff)
downloadpostgresql-3ae28ce8c437811bba47c09d1212c2d3c41cb7ff.tar.gz
postgresql-3ae28ce8c437811bba47c09d1212c2d3c41cb7ff.zip
Suppress unused-variables warning when OPEN_SYNC_FLAG isn't defined.
Per buildfarm.
-rw-r--r--contrib/pg_test_fsync/pg_test_fsync.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/pg_test_fsync/pg_test_fsync.c b/contrib/pg_test_fsync/pg_test_fsync.c
index 7fbcfcf45f0..e13307f4143 100644
--- a/contrib/pg_test_fsync/pg_test_fsync.c
+++ b/contrib/pg_test_fsync/pg_test_fsync.c
@@ -391,16 +391,15 @@ test_open_syncs(void)
test_open_sync("16 1k open_sync writes", 1);
}
-
+/*
+ * Test open_sync with different size files
+ */
static void
test_open_sync(const char *msg, int writes_size)
{
+#ifdef OPEN_SYNC_FLAG
int tmpfile, ops, writes;
-/*
- * Test open_sync with different size files
- */
-#ifdef OPEN_SYNC_FLAG
if ((tmpfile = open(filename, O_RDWR | OPEN_SYNC_FLAG | PG_O_DIRECT, 0)) == -1)
printf(NA_FORMAT, "o_direct", "n/a**\n");
else