Fix compiler warning about unused function in non-readline case.
authorAndrew Dunstan
Mon, 28 Sep 2015 22:29:20 +0000 (18:29 -0400)
committerAndrew Dunstan
Mon, 28 Sep 2015 22:34:31 +0000 (18:34 -0400)
Backpatch to all live branches to keep the code in sync.

src/bin/psql/input.c

index 68fb8cb13edf543f4d6d60f56db6c6a04544ee94..f08ed83d68ef99a17dd71f912bf67f457c6df5e6 100644 (file)
@@ -382,10 +382,10 @@ initializeInput(int flags)
  *
  * max_lines: if >= 0, limit history file to that many entries.
  */
+#ifdef USE_READLINE
 static bool
 saveHistory(char *fname, int max_lines)
 {
-#ifdef USE_READLINE
    int         errnum;
 
    /*
@@ -450,10 +450,10 @@ saveHistory(char *fname, int max_lines)
        psql_error("could not save history to file \"%s\": %s\n",
                   fname, strerror(errnum));
    }
-#endif
-
    return false;
 }
+#endif
+
 
 
 /*