From 18ad797d5da11a8ce886c8d0cce9b1e043c4c898 Mon Sep 17 00:00:00 2001 From: Frank Zago Date: Mon, 28 Jul 2014 11:56:46 -0500 Subject: [PATCH] LU-5418 libcfs: only define noop_*_fn when readline is used This fixes a compilation break introduced by change 7629b7. When readline devel is not found on the system, the code using readline is not used, including noop_int_fn() and noop_void_fn(). This generates a couple warning about these function being unused, which breaks the build. Change-Id: I75b292cd6ad3b04fdd03adcf1886011e23620e8b Signed-off-by: frank zago Reviewed-on: http://review.whamcloud.com/11252 Tested-by: Jenkins Reviewed-by: Bob Glossman Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Reviewed-by: Nathaniel Clark Reviewed-by: Patrick Farrell Tested-by: Maloo Reviewed-by: Oleg Drokin --- libcfs/libcfs/util/parser.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcfs/libcfs/util/parser.c b/libcfs/libcfs/util/parser.c index 3ac8d18..35f765f 100644 --- a/libcfs/libcfs/util/parser.c +++ b/libcfs/libcfs/util/parser.c @@ -283,8 +283,10 @@ int execute_line(char * line) return rc; } +#ifdef HAVE_LIBREADLINE static void noop_int_fn(int unused) { } static void noop_void_fn(void) { } +#endif /* just in case you're ever in an airplane and discover you * forgot to install readline-dev. :) */ -- 1.8.3.1