1From 9d8b56b3b5d59691f16a8b8ae5fb763bc6be3d15 Mon Sep 17 00:00:00 2001 2From: Andreas Dilger <adilger@dilger.ca> 3Date: Thu, 4 Aug 2022 11:18:32 -0600 4Subject: Quiet unused variable warnings 5 6Quiet various compiler warnings about unreferenced or unset variables. 7 8Signed-off-by: Andreas Dilger <adilger@dilger.ca> 9Signed-off-by: Theodore Ts'o <tytso@mit.edu> 10--- 11 e2fsck/journal.c | 15 +++++++-------- 12 lib/ext2fs/swapfs.c | 2 +- 13 2 files changed, 8 insertions(+), 9 deletions(-) 14 15diff --git a/e2fsck/journal.c b/e2fsck/journal.c 16index 12487e3d..571de83e 100644 17--- a/e2fsck/journal.c 18+++ b/e2fsck/journal.c 19@@ -620,7 +620,6 @@ static inline int tl_to_darg(struct dentry_info_args *darg, 20 struct ext4_fc_tl *tl, __u8 *val) 21 { 22 struct ext4_fc_dentry_info fcd; 23- int tag = le16_to_cpu(tl->fc_tag); 24 25 memcpy(&fcd, val, sizeof(fcd)); 26 27@@ -636,10 +635,10 @@ static inline int tl_to_darg(struct dentry_info_args *darg, 28 darg->dname_len); 29 darg->dname[darg->dname_len] = 0; 30 jbd_debug(1, "%s: %s, ino %lu, parent %lu\n", 31- tag == EXT4_FC_TAG_CREAT ? "create" : 32- (tag == EXT4_FC_TAG_LINK ? "link" : 33- (tag == EXT4_FC_TAG_UNLINK ? "unlink" : "error")), 34- darg->dname, darg->ino, darg->parent_ino); 35+ le16_to_cpu(tl->fc_tag) == EXT4_FC_TAG_CREAT ? "create" : 36+ (le16_to_cpu(tl->fc_tag) == EXT4_FC_TAG_LINK ? "link" : 37+ (le16_to_cpu(tl->fc_tag) == EXT4_FC_TAG_UNLINK ? "unlink" : 38+ "error")), darg->dname, darg->ino, darg->parent_ino); 39 return 0; 40 } 41 42@@ -652,11 +651,11 @@ static int ext4_fc_handle_unlink(e2fsck_t ctx, struct ext4_fc_tl *tl, __u8 *val) 43 if (ret) 44 return ret; 45 ext4_fc_flush_extents(ctx, darg.ino); 46- ret = errcode_to_errno( 47- ext2fs_unlink(ctx->fs, darg.parent_ino, 48- darg.dname, darg.ino, 0)); 49+ ret = errcode_to_errno(ext2fs_unlink(ctx->fs, darg.parent_ino, 50+ darg.dname, darg.ino, 0)); 51 /* It's okay if the above call fails */ 52 free(darg.dname); 53+ 54 return ret; 55 } 56 57diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c 58index 1006b2d2..cd160b31 100644 59--- a/lib/ext2fs/swapfs.c 60+++ b/lib/ext2fs/swapfs.c 61@@ -244,7 +244,7 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t, 62 int bufsize) 63 { 64 unsigned i, extra_isize, attr_magic; 65- int has_extents, has_inline_data, islnk, fast_symlink; 66+ int has_extents = 0, has_inline_data = 0, islnk = 0, fast_symlink = 0; 67 unsigned int inode_size; 68 __u32 *eaf, *eat; 69 70-- 71cgit 72 73