Skip to content

Commit 1b113e0

Browse files
YueHaibingtorvalds
authored andcommitted
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>
1 parent 6a8d76c commit 1b113e0

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/binfmt_flat.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,15 +431,13 @@ static int load_flat_file(struct linux_binprm *bprm,
431431
unsigned long len, memp, memp_size, extra, rlim;
432432
__be32 __user *reloc;
433433
u32 __user *rp;
434-
struct inode *inode;
435434
int i, rev, relocs;
436435
loff_t fpos;
437436
unsigned long start_code, end_code;
438437
ssize_t result;
439438
int ret;
440439

441440
hdr = ((struct flat_hdr *) bprm->buf); /* exec-header */
442-
inode = file_inode(bprm->file);
443441

444442
text_len = ntohl(hdr->data_start);
445443
data_len = ntohl(hdr->data_end) - ntohl(hdr->data_start);

0 commit comments

Comments
 (0)