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 <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-07-14 23:16:28 +02:00 committed by Karel Zak
parent 18377246af
commit 3b1d28792d
1 changed files with 3 additions and 1 deletions

View File

@ -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])
{