From a959db8acd058a311478d3692ac4ca35b747079c Mon Sep 17 00:00:00 2001
From: Andrew Dunstan <andrew@dunslane.net>
Date: Mon, 28 Sep 2015 18:29:20 -0400
Subject: [PATCH] Fix compiler warning about unused function in non-readline
 case.

Backpatch to all live branches to keep the code in sync.
---
 src/bin/psql/input.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c
index 4ca4f4b0965..832e81216ef 100644
--- a/src/bin/psql/input.c
+++ b/src/bin/psql/input.c
@@ -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
+
 
 
 /*
-- 
GitLab