summaryrefslogtreecommitdiff
path: root/fs/binfmt_flat.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-07-16 16:27:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-16 19:23:22 -0700
commit1b113e04e20298b08c82c709a4501c0d6e1e4374 (patch)
treef65e2e58a05ea997ec56259e32aad523a9adb006 /fs/binfmt_flat.c
parent6a8d76cbd647d414248d314300106d1ce04daa4b (diff)
fs/binfmt_flat.c: remove set but not used variable 'inode'
Fixes gcc '-Wunused-but-set-variable' warning: fs/binfmt_flat.c: In function load_flat_file: fs/binfmt_flat.c:419:16: warning: variable inode set but not used [-Wunused-but-set-variable] It's never used and can be removed. Link: http://lkml.kernel.org/r/20190525125341.9844-1-yuehaibing@huawei.com Signed-off-by: YueHaibing <yuehaibing@huawei.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/binfmt_flat.c')
-rw-r--r--fs/binfmt_flat.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index 8c6b50f34466..831a2b25ba79 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -431,7 +431,6 @@ static int load_flat_file(struct linux_binprm *bprm,
unsigned long len, memp, memp_size, extra, rlim;
__be32 __user *reloc;
u32 __user *rp;
- struct inode *inode;
int i, rev, relocs;
loff_t fpos;
unsigned long start_code, end_code;
@@ -439,7 +438,6 @@ static int load_flat_file(struct linux_binprm *bprm,
int ret;
hdr = ((struct flat_hdr *) bprm->buf); /* exec-header */
- inode = file_inode(bprm->file);
text_len = ntohl(hdr->data_start);
data_len = ntohl(hdr->data_end) - ntohl(hdr->data_start);