summaryrefslogtreecommitdiffstats
path: root/lib/pager.c
diff options
context:
space:
mode:
authorKarel Zak2012-04-23 11:57:50 +0200
committerKarel Zak2012-04-23 11:57:50 +0200
commit505abd8434f41f5ed4d01ddceeaf78f37e90c368 (patch)
treef69123c11646eac6e0d2a88033619106c01b95fd /lib/pager.c
parentlib: add pager functionality (diff)
downloadkernel-qcow2-util-linux-505abd8434f41f5ed4d01ddceeaf78f37e90c368.tar.gz
kernel-qcow2-util-linux-505abd8434f41f5ed4d01ddceeaf78f37e90c368.tar.xz
kernel-qcow2-util-linux-505abd8434f41f5ed4d01ddceeaf78f37e90c368.zip
lib/pager: fix compiler warnings
pager.c: In function ‘start_command’: pager.c:82:7: warning: unused variable ‘err’ [-Wunused-variable] pager.c:49:25: warning: unused variable ‘fderr’ [-Wunused-variable] pager.c:49:15: warning: unused variable ‘fdout’ [-Wunused-variable] pager.c:48:25: warning: unused variable ‘need_err’ [-Wunused-variable] pager.c:48:15: warning: unused variable ‘need_out’ [-Wunused-variable] Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib/pager.c')
-rw-r--r--lib/pager.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/pager.c b/lib/pager.c
index 1bc4134cf..f02d55d4f 100644
--- a/lib/pager.c
+++ b/lib/pager.c
@@ -45,8 +45,8 @@ static inline void dup_devnull(int to)
static int start_command(struct child_process *cmd)
{
- int need_in, need_out, need_err;
- int fdin[2], fdout[2], fderr[2];
+ int need_in;
+ int fdin[2];
/*
* In case of errors we must keep the promise to close FDs
@@ -79,12 +79,10 @@ static int start_command(struct child_process *cmd)
}
if (cmd->pid < 0) {
- int err = errno;
if (need_in)
close_pair(fdin);
else if (cmd->in)
close(cmd->in);
-
return -1;
}