Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b113e04 authored by YueHaibing's avatar YueHaibing Committed by Linus Torvalds
Browse files

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: default avatarYueHaibing <yuehaibing@huawei.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6a8d76cb
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);