Skip to content

Commit

Permalink
fs/binfmt_flat.c: remove set but not used variable 'inode'
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: YueHaibing <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
YueHaibing authored and torvalds committed Jul 17, 2019
1 parent 6a8d76c commit 1b113e0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/binfmt_flat.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,15 +431,13 @@ 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;
ssize_t result;
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);
Expand Down

0 comments on commit 1b113e0

Please sign in to comment.