]> granicus.if.org Git - postgresql/commitdiff
Suppress unused-variables warning when OPEN_SYNC_FLAG isn't defined.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 22 Jan 2011 17:25:48 +0000 (12:25 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 22 Jan 2011 17:26:44 +0000 (12:26 -0500)
Per buildfarm.

contrib/pg_test_fsync/pg_test_fsync.c

index 7fbcfcf45f06ccc399a41bb3a793614482e75b2f..e13307f41431332dc7179a1956733482a770543b 100644 (file)
@@ -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