From: Sami Kerola Date: Sat, 14 Jul 2012 21:16:28 +0000 (+0200) Subject: lib/pager: minor compiler warning fixes X-Git-Tag: v2.22-rc1~144^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b1d28792d84649a204940936a7bef8a4d7b9ddc;p=thirdparty%2Futil-linux.git lib/pager: minor compiler warning fixes Add missing function prototype, and declare structure before use of it. lib/pager.c:162:6: warning: no previous prototype for function 'setup_pager' [-Wmissing-prototypes] lib/pager.c:20:29: warning: tentative definition of variable with internal linkage has incomplete non-array type 'struct child_process' [-Wtentative-definition-incomplete-type] Signed-off-by: Sami Kerola --- diff --git a/lib/pager.c b/lib/pager.c index 4c50de4bad..1fce5bf20e 100644 --- a/lib/pager.c +++ b/lib/pager.c @@ -17,7 +17,8 @@ #include "xalloc.h" #include "nls.h" -static struct child_process pager_process; +void setup_pager(void); + static const char *pager_argv[] = { "sh", "-c", NULL, NULL }; struct child_process { @@ -29,6 +30,7 @@ struct child_process { unsigned no_stdin:1; void (*preexec_cb)(void); }; +static struct child_process pager_process; static inline void close_pair(int fd[2]) {