* [PATCH 0/6] e2fsprogs: fix compiler warnings introduced since v1.45.4
@ 2021-06-16 4:53 Eric Biggers
2021-06-16 4:53 ` [PATCH 1/6] libext2fs: improve jbd_debug() implementation Eric Biggers
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: Eric Biggers @ 2021-06-16 4:53 UTC (permalink / raw)
To: linux-ext4
Fix various compiler warnings that were introduced since e2fsprogs
v1.45.4, including the following types of warnings:
-Wunused-variable (enabled by -Wall)
-Wunused-label (enabled by -Wall)
-Wunused-parameter
Note, there were also -Wpointer-arith (arithmetic on a void pointer is a
GNU extension) warnings introduced, but I don't find those to be very
useful. But I can send out a patch for those too if people want it.
Also fix a -Wincompatible-pointer-types warning in the Windows build.
Eric Biggers (6):
libext2fs: improve jbd_debug() implementation
e2fsck: sync fc_do_one_pass() changes from kernel
mke2fs: use ext2fs_get_device_size2() on all platforms
Fix -Wunused-parameter warnings
Fix -Wunused-variable warnings
libext2fs: fix a -Wunused-label warning
debugfs/journal.c | 7 ++-----
e2fsck/extents.c | 2 +-
e2fsck/jfs_user.h | 3 ++-
e2fsck/journal.c | 18 +++++-------------
e2fsck/pass1b.c | 3 ++-
e2fsck/pass2.c | 3 ++-
e2fsck/recovery.c | 5 ++---
e2fsck/rehash.c | 2 +-
lib/e2p/errcode.c | 1 -
lib/e2p/fgetflags.c | 2 +-
lib/e2p/fsetflags.c | 1 -
lib/ext2fs/kernel-jbd.h | 26 +++++---------------------
lib/ext2fs/mkjournal.c | 1 -
lib/ext2fs/unix_io.c | 1 -
lib/support/mkquota.c | 3 ++-
misc/mke2fs.c | 8 ++------
16 files changed, 27 insertions(+), 59 deletions(-)
base-commit: 32fda1e5a338ff676ae7f7e3e2bc256e7a7e2855
--
2.32.0.272.g935e593368-goog
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/6] libext2fs: improve jbd_debug() implementation
2021-06-16 4:53 [PATCH 0/6] e2fsprogs: fix compiler warnings introduced since v1.45.4 Eric Biggers
@ 2021-06-16 4:53 ` Eric Biggers
2021-07-07 2:38 ` Theodore Ts'o
2021-06-16 4:53 ` [PATCH 2/6] e2fsck: sync fc_do_one_pass() changes from kernel Eric Biggers
` (4 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Eric Biggers @ 2021-06-16 4:53 UTC (permalink / raw)
To: linux-ext4
From: Eric Biggers <ebiggers@google.com>
Make jbd_debug() do format string checking (but still get compiled away
to nothing) when --enable-jbd-debug isn't specified, similar to
commit d556435156b7 ("jbd2: avoid -Wempty-body warnings") on the kernel
side. This should prevent --enable-jbd-debug from getting broken due to
bad jbd_debug() statements. It also eliminates a -Wunused-variable
warning where a variable was only used in a jbd_debug() statement.
Also remove an alternative definition of jbd_debug() that was
conditional on CONFIG_JBD_DEBUG && !CONFIG_JBD_DEBUG, so was dead code.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
debugfs/journal.c | 4 ----
e2fsck/journal.c | 4 ----
lib/ext2fs/kernel-jbd.h | 26 +++++---------------------
3 files changed, 5 insertions(+), 29 deletions(-)
diff --git a/debugfs/journal.c b/debugfs/journal.c
index e8872f05..686d0eb0 100644
--- a/debugfs/journal.c
+++ b/debugfs/journal.c
@@ -26,9 +26,7 @@
#include "uuid/uuid.h"
#include "journal.h"
-#ifdef CONFIG_JBD_DEBUG /* Enabled by configure --enable-jfs-debug */
static int bh_count = 0;
-#endif
#if EXT2_FLAT_INCLUDES
#include "blkid.h"
@@ -135,10 +133,8 @@ struct buffer_head *getblk(kdev_t kdev, unsigned long long blocknr,
if (retval)
return NULL;
-#ifdef CONFIG_JBD_DEBUG
if (journal_enable_debug >= 3)
bh_count++;
-#endif
jfs_debug(4, "getblk for block %llu (%d bytes)(total %d)\n",
blocknr, blocksize, bh_count);
diff --git a/e2fsck/journal.c b/e2fsck/journal.c
index a425bbd1..a0a4d968 100644
--- a/e2fsck/journal.c
+++ b/e2fsck/journal.c
@@ -27,9 +27,7 @@
#include "problem.h"
#include "uuid/uuid.h"
-#ifdef CONFIG_JBD_DEBUG /* Enabled by configure --enable-jfs-debug */
static int bh_count = 0;
-#endif
/*
* Define USE_INODE_IO to use the inode_io.c / fileio.c codepaths.
@@ -129,10 +127,8 @@ struct buffer_head *getblk(kdev_t kdev, unsigned long long blocknr,
if (!bh)
return NULL;
-#ifdef CONFIG_JBD_DEBUG
if (journal_enable_debug >= 3)
bh_count++;
-#endif
jfs_debug(4, "getblk for block %llu (%d bytes)(total %d)\n",
blocknr, blocksize, bh_count);
diff --git a/lib/ext2fs/kernel-jbd.h b/lib/ext2fs/kernel-jbd.h
index 2978ccb6..c94de237 100644
--- a/lib/ext2fs/kernel-jbd.h
+++ b/lib/ext2fs/kernel-jbd.h
@@ -26,7 +26,6 @@
#define journal_oom_retry 0
-#ifdef __STDC__
#ifdef CONFIG_JBD_DEBUG
/*
* Define JBD_EXPENSIVE_CHECKING to enable more expensive internal
@@ -35,7 +34,11 @@
*/
#define JBD_EXPENSIVE_CHECKING
extern int journal_enable_debug;
+#else
+#define journal_enable_debug (-1)
+#endif /* !CONFIG_JBD_DEBUG */
+#ifdef __STDC__
#define jbd_debug(n, f, a...) \
do { \
if ((n) <= journal_enable_debug) { \
@@ -45,27 +48,8 @@ extern int journal_enable_debug;
} \
} while (0)
#else
-#ifdef __GNUC__
-#if defined(__KERNEL__) || !defined(CONFIG_JBD_DEBUG)
-#define jbd_debug(f, a...) /**/
-#else
-extern int journal_enable_debug;
-#define jbd_debug(n, f, a...) \
- do { \
- if ((n) <= journal_enable_debug) { \
- printf("(%s, %d): %s: ", \
- __FILE__, __LINE__, __func__); \
- printf(f, ## a); \
- } \
- } while (0)
-#endif /*__KERNEL__ */
-#else
-#define jbd_debug(f, ...) /**/
-#endif
-#endif
-#else
#define jbd_debug(x) /* AIX doesn't do STDC */
-#endif
+#endif /* !__STDC__ */
extern void * __jbd_kmalloc (char *where, size_t size, int flags, int retry);
#define jbd_kmalloc(size, flags) \
--
2.32.0.272.g935e593368-goog
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/6] e2fsck: sync fc_do_one_pass() changes from kernel
2021-06-16 4:53 [PATCH 0/6] e2fsprogs: fix compiler warnings introduced since v1.45.4 Eric Biggers
2021-06-16 4:53 ` [PATCH 1/6] libext2fs: improve jbd_debug() implementation Eric Biggers
@ 2021-06-16 4:53 ` Eric Biggers
2021-07-07 2:42 ` Theodore Ts'o
2021-06-16 4:53 ` [PATCH 3/6] mke2fs: use ext2fs_get_device_size2() on all platforms Eric Biggers
` (3 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Eric Biggers @ 2021-06-16 4:53 UTC (permalink / raw)
To: linux-ext4
From: Eric Biggers <ebiggers@google.com>
Sync the changes to fc_do_one_pass() from the kernel's recovery.c so
that e2fsck picks up the fixes to the jbd_debug() statements.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
e2fsck/recovery.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/e2fsck/recovery.c b/e2fsck/recovery.c
index dc0694fc..1e07dfac 100644
--- a/e2fsck/recovery.c
+++ b/e2fsck/recovery.c
@@ -245,15 +245,14 @@ static int fc_do_one_pass(journal_t *journal,
return 0;
while (next_fc_block <= journal->j_fc_last) {
- jbd_debug(3, "Fast commit replay: next block %ld",
+ jbd_debug(3, "Fast commit replay: next block %ld\n",
next_fc_block);
err = jread(&bh, journal, next_fc_block);
if (err) {
- jbd_debug(3, "Fast commit replay: read error");
+ jbd_debug(3, "Fast commit replay: read error\n");
break;
}
- jbd_debug(3, "Processing fast commit blk with seq %d");
err = journal->j_fc_replay_callback(journal, bh, pass,
next_fc_block - journal->j_fc_first,
expected_commit_id);
--
2.32.0.272.g935e593368-goog
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/6] mke2fs: use ext2fs_get_device_size2() on all platforms
2021-06-16 4:53 [PATCH 0/6] e2fsprogs: fix compiler warnings introduced since v1.45.4 Eric Biggers
2021-06-16 4:53 ` [PATCH 1/6] libext2fs: improve jbd_debug() implementation Eric Biggers
2021-06-16 4:53 ` [PATCH 2/6] e2fsck: sync fc_do_one_pass() changes from kernel Eric Biggers
@ 2021-06-16 4:53 ` Eric Biggers
2021-07-07 2:43 ` Theodore Ts'o
2021-06-16 4:53 ` [PATCH 4/6] Fix -Wunused-parameter warnings Eric Biggers
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Eric Biggers @ 2021-06-16 4:53 UTC (permalink / raw)
To: linux-ext4
From: Eric Biggers <ebiggers@google.com>
Since commit e8c858047be6 ("libext2fs: fix build issue for on
Windows/Cygwin systems"), ext2fs_get_device_size2() is available in
Windows builds of libext2fs. So there is no need for mke2fs to call
ext2fs_get_device_size() instead.
This fixes a -Wincompatible-pointer-types warning because
ext2fs_get_device_size() was being passed a 'blk64_t *', but it expected
a 'blk_t *'.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
misc/mke2fs.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index afbcf486..d5ab334e 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1989,15 +1989,9 @@ profile_error:
dev_size = fs_blocks_count;
retval = 0;
} else
-#ifndef _WIN32
retval = ext2fs_get_device_size2(device_name,
EXT2_BLOCK_SIZE(&fs_param),
&dev_size);
-#else
- retval = ext2fs_get_device_size(device_name,
- EXT2_BLOCK_SIZE(&fs_param),
- &dev_size);
-#endif
if (retval && (retval != EXT2_ET_UNIMPLEMENTED)) {
com_err(program_name, retval, "%s",
_("while trying to determine filesystem size"));
--
2.32.0.272.g935e593368-goog
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/6] Fix -Wunused-parameter warnings
2021-06-16 4:53 [PATCH 0/6] e2fsprogs: fix compiler warnings introduced since v1.45.4 Eric Biggers
` (2 preceding siblings ...)
2021-06-16 4:53 ` [PATCH 3/6] mke2fs: use ext2fs_get_device_size2() on all platforms Eric Biggers
@ 2021-06-16 4:53 ` Eric Biggers
2021-07-07 2:44 ` Theodore Ts'o
2021-06-16 4:53 ` [PATCH 5/6] Fix -Wunused-variable warnings Eric Biggers
2021-06-16 4:53 ` [PATCH 6/6] libext2fs: fix a -Wunused-label warning Eric Biggers
5 siblings, 1 reply; 13+ messages in thread
From: Eric Biggers @ 2021-06-16 4:53 UTC (permalink / raw)
To: linux-ext4
From: Eric Biggers <ebiggers@google.com>
Fix all warnings about unused function parameters that were introduced
since e2fsprogs v1.45.4, by adding EXT2FS_ATTR((unused)) or removing
parameters as appropriate.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
debugfs/journal.c | 3 ++-
e2fsck/jfs_user.h | 3 ++-
e2fsck/journal.c | 7 ++++---
e2fsck/pass1b.c | 3 ++-
e2fsck/pass2.c | 3 ++-
lib/support/mkquota.c | 3 ++-
6 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/debugfs/journal.c b/debugfs/journal.c
index 686d0eb0..095fff00 100644
--- a/debugfs/journal.c
+++ b/debugfs/journal.c
@@ -161,7 +161,8 @@ int sync_blockdev(kdev_t kdev)
return io_channel_flush(io) ? EIO : 0;
}
-void ll_rw_block(int rw, int op_flags, int nr, struct buffer_head *bhp[])
+void ll_rw_block(int rw, int op_flags EXT2FS_ATTR((unused)), int nr,
+ struct buffer_head *bhp[])
{
errcode_t retval;
struct buffer_head *bh;
diff --git a/e2fsck/jfs_user.h b/e2fsck/jfs_user.h
index 1babf417..6d24558b 100644
--- a/e2fsck/jfs_user.h
+++ b/e2fsck/jfs_user.h
@@ -92,7 +92,8 @@ typedef struct kmem_cache {
#define kmalloc(len, flags) malloc(len)
#define kfree(p) free(p)
-static inline void *kmalloc_array(unsigned n, unsigned size, int flags)
+static inline void *kmalloc_array(unsigned n, unsigned size,
+ int flags EXT2FS_ATTR((unused)))
{
if (n && (~0U)/n < size)
return NULL;
diff --git a/e2fsck/journal.c b/e2fsck/journal.c
index a0a4d968..5a06e26e 100644
--- a/e2fsck/journal.c
+++ b/e2fsck/journal.c
@@ -155,7 +155,8 @@ int sync_blockdev(kdev_t kdev)
return io_channel_flush(io) ? -EIO : 0;
}
-void ll_rw_block(int rw, int op_flags, int nr, struct buffer_head *bhp[])
+void ll_rw_block(int rw, int op_flags EXT2FS_ATTR((unused)), int nr,
+ struct buffer_head *bhp[])
{
errcode_t retval;
struct buffer_head *bh;
@@ -439,7 +440,7 @@ static int ex_len_compar(const void *arg1, const void *arg2)
return 0;
}
-static void ex_sort_and_merge(e2fsck_t ctx, struct extent_list *list)
+static void ex_sort_and_merge(struct extent_list *list)
{
blk64_t ex_end;
int i, j;
@@ -549,7 +550,7 @@ static int ext4_modify_extent_list(e2fsck_t ctx, struct extent_list *list,
list->extents[list->count - 1] = add_ex;
}
- ex_sort_and_merge(ctx, list);
+ ex_sort_and_merge(list);
/* Mark all occupied blocks allocated */
for (i = 0; i < list->count; i++)
diff --git a/e2fsck/pass1b.c b/e2fsck/pass1b.c
index 656a275b..92c746c1 100644
--- a/e2fsck/pass1b.c
+++ b/e2fsck/pass1b.c
@@ -104,7 +104,8 @@ static dict_t clstr_dict, ino_dict;
static ext2fs_inode_bitmap inode_dup_map;
-static int dict_int_cmp(const void* cmp_ctx, const void *a, const void *b)
+static int dict_int_cmp(const void *cmp_ctx EXT2FS_ATTR((unused)),
+ const void *a, const void *b)
{
intptr_t ia, ib;
diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
index e504b30a..1b2cb94a 100644
--- a/e2fsck/pass2.c
+++ b/e2fsck/pass2.c
@@ -332,7 +332,8 @@ static short htree_depth(struct dx_dir_info *dx_dir,
return depth;
}
-static int dict_de_cmp(const void *cmp_ctx, const void *a, const void *b)
+static int dict_de_cmp(const void *cmp_ctx EXT2FS_ATTR((unused)),
+ const void *a, const void *b)
{
const struct ext2_dir_entry *de_a, *de_b;
int a_len, b_len;
diff --git a/lib/support/mkquota.c b/lib/support/mkquota.c
index fbc3833a..71f42c2c 100644
--- a/lib/support/mkquota.c
+++ b/lib/support/mkquota.c
@@ -234,7 +234,8 @@ out:
/* Helper functions for computing quota in memory. */
/******************************************************************/
-static int dict_uint_cmp(const void *cmp_ctx, const void *a, const void *b)
+static int dict_uint_cmp(const void *cmp_ctx EXT2FS_ATTR((unused)),
+ const void *a, const void *b)
{
unsigned int c, d;
--
2.32.0.272.g935e593368-goog
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/6] Fix -Wunused-variable warnings
2021-06-16 4:53 [PATCH 0/6] e2fsprogs: fix compiler warnings introduced since v1.45.4 Eric Biggers
` (3 preceding siblings ...)
2021-06-16 4:53 ` [PATCH 4/6] Fix -Wunused-parameter warnings Eric Biggers
@ 2021-06-16 4:53 ` Eric Biggers
2021-07-07 3:13 ` Theodore Ts'o
2021-06-16 4:53 ` [PATCH 6/6] libext2fs: fix a -Wunused-label warning Eric Biggers
5 siblings, 1 reply; 13+ messages in thread
From: Eric Biggers @ 2021-06-16 4:53 UTC (permalink / raw)
To: linux-ext4
From: Eric Biggers <ebiggers@google.com>
Fix all warnings about unused variables that were introduced since
e2fsprogs v1.45.4.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
e2fsck/extents.c | 2 +-
e2fsck/journal.c | 7 +------
e2fsck/rehash.c | 2 +-
lib/e2p/errcode.c | 1 -
lib/e2p/fgetflags.c | 2 +-
lib/e2p/fsetflags.c | 1 -
lib/ext2fs/mkjournal.c | 1 -
misc/mke2fs.c | 2 ++
8 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/e2fsck/extents.c b/e2fsck/extents.c
index 4e6e2611..0274e053 100644
--- a/e2fsck/extents.c
+++ b/e2fsck/extents.c
@@ -203,7 +203,7 @@ errcode_t rewrite_extent_replay(e2fsck_t ctx, struct extent_list *list,
ext2_extent_handle_t handle;
unsigned int i, ext_written;
struct ext2fs_extent *ex, extent;
- blk64_t start_val, delta, blkcount;
+ blk64_t start_val, delta;
/* Reset extent tree */
inode->i_flags &= ~EXT4_EXTENTS_FL;
diff --git a/e2fsck/journal.c b/e2fsck/journal.c
index 5a06e26e..0aeaf416 100644
--- a/e2fsck/journal.c
+++ b/e2fsck/journal.c
@@ -442,7 +442,6 @@ static int ex_len_compar(const void *arg1, const void *arg2)
static void ex_sort_and_merge(struct extent_list *list)
{
- blk64_t ex_end;
int i, j;
if (list->count < 2)
@@ -490,7 +489,7 @@ static int ext4_modify_extent_list(e2fsck_t ctx, struct extent_list *list,
{
int ret;
int i, offset;
- struct ext2fs_extent add_ex = *ex, add_ex2;
+ struct ext2fs_extent add_ex = *ex;
/* First let's create a hole from ex->e_lblk of length ex->e_len */
for (i = 0; i < list->count; i++) {
@@ -634,9 +633,7 @@ static inline void tl_to_darg(struct dentry_info_args *darg,
static int ext4_fc_handle_unlink(e2fsck_t ctx, struct ext4_fc_tl *tl)
{
- struct ext2_inode inode;
struct dentry_info_args darg;
- ext2_filsys fs = ctx->fs;
int ret;
tl_to_darg(&darg, tl);
@@ -724,7 +721,6 @@ static void ext4_fc_replay_fixup_iblocks(struct ext2_inode_large *ondisk_inode,
static int ext4_fc_handle_inode(e2fsck_t ctx, struct ext4_fc_tl *tl)
{
- struct e2fsck_fc_replay_state *state = &ctx->fc_replay_state;
int ino, inode_len = EXT2_GOOD_OLD_INODE_SIZE;
struct ext2_inode_large *inode = NULL, *fc_inode = NULL;
struct ext4_fc_inode *fc_inode_val;
@@ -790,7 +786,6 @@ static int ext4_fc_handle_add_extent(e2fsck_t ctx, struct ext4_fc_tl *tl)
{
struct ext2fs_extent extent;
struct ext4_fc_add_range *add_range;
- struct ext4_fc_del_range *del_range;
int ret = 0, ino;
add_range = (struct ext4_fc_add_range *)ext4_fc_tag_val(tl);
diff --git a/e2fsck/rehash.c b/e2fsck/rehash.c
index 204ff7de..7d30ff00 100644
--- a/e2fsck/rehash.c
+++ b/e2fsck/rehash.c
@@ -287,7 +287,7 @@ static EXT2_QSORT_TYPE name_cf_cmp(const struct name_cmp_ctx *ctx,
{
const struct hash_entry *he_a = (const struct hash_entry *) a;
const struct hash_entry *he_b = (const struct hash_entry *) b;
- unsigned int he_a_len, he_b_len, min_len;
+ unsigned int he_a_len, he_b_len;
int ret;
he_a_len = ext2fs_dirent_name_len(he_a->dir);
diff --git a/lib/e2p/errcode.c b/lib/e2p/errcode.c
index 27d4b15f..7e426553 100644
--- a/lib/e2p/errcode.c
+++ b/lib/e2p/errcode.c
@@ -34,7 +34,6 @@ static const char *err_string[] = {
/* Return the name of an encoding or NULL */
const char *e2p_errcode2str(int err)
{
- unsigned int i;
static char buf[32];
if (err < ARRAY_SIZE(err_string))
diff --git a/lib/e2p/fgetflags.c b/lib/e2p/fgetflags.c
index 0f1a059e..93e130c6 100644
--- a/lib/e2p/fgetflags.c
+++ b/lib/e2p/fgetflags.c
@@ -50,8 +50,8 @@
int fgetflags (const char * name, unsigned long * flags)
{
- struct stat buf;
#if HAVE_STAT_FLAGS && !(APPLE_DARWIN && HAVE_EXT2_IOCTLS)
+ struct stat buf;
if (stat (name, &buf) == -1)
return -1;
diff --git a/lib/e2p/fsetflags.c b/lib/e2p/fsetflags.c
index 28515547..6455e386 100644
--- a/lib/e2p/fsetflags.c
+++ b/lib/e2p/fsetflags.c
@@ -81,7 +81,6 @@ int fsetflags (const char * name, unsigned long flags)
return syscall(SYS_fsctl, name, EXT2_IOC_SETFLAGS, &f, 0);
#elif HAVE_EXT2_IOCTLS
int fd, r, f, save_errno = 0;
- struct stat buf;
fd = open(name, OPEN_FLAGS);
if (fd == -1) {
diff --git a/lib/ext2fs/mkjournal.c b/lib/ext2fs/mkjournal.c
index bc8c57bf..11d73e30 100644
--- a/lib/ext2fs/mkjournal.c
+++ b/lib/ext2fs/mkjournal.c
@@ -604,7 +604,6 @@ errcode_t ext2fs_add_journal_inode2(ext2_filsys fs, blk_t num_blocks,
blk64_t goal, int flags)
{
struct ext2fs_journal_params jparams;
- errcode_t ret;
jparams.num_journal_blocks = num_blocks;
jparams.num_fc_blocks = 0;
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index d5ab334e..54aa340a 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1577,7 +1577,9 @@ static void PRS(int argc, char *argv[])
int use_bsize;
char *newpath;
int pathlen = sizeof(PATH_SET) + 1;
+#ifdef HAVE_BLKID_PROBE_GET_TOPOLOGY
struct device_param dev_param;
+#endif
if (oldpath)
pathlen += strlen(oldpath);
--
2.32.0.272.g935e593368-goog
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 6/6] libext2fs: fix a -Wunused-label warning
2021-06-16 4:53 [PATCH 0/6] e2fsprogs: fix compiler warnings introduced since v1.45.4 Eric Biggers
` (4 preceding siblings ...)
2021-06-16 4:53 ` [PATCH 5/6] Fix -Wunused-variable warnings Eric Biggers
@ 2021-06-16 4:53 ` Eric Biggers
2021-07-07 3:14 ` Theodore Ts'o
5 siblings, 1 reply; 13+ messages in thread
From: Eric Biggers @ 2021-06-16 4:53 UTC (permalink / raw)
To: linux-ext4
From: Eric Biggers <ebiggers@google.com>
Remove a label which isn't used.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
lib/ext2fs/unix_io.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
index 64eee342..3bb8d238 100644
--- a/lib/ext2fs/unix_io.c
+++ b/lib/ext2fs/unix_io.c
@@ -329,7 +329,6 @@ success_unlock:
error_unlock:
mutex_unlock(data, BOUNCE_MTX);
-error_out:
if (actual >= 0 && actual < size)
memset((char *) buf+actual, 0, size-actual);
if (channel->read_error)
--
2.32.0.272.g935e593368-goog
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 1/6] libext2fs: improve jbd_debug() implementation
2021-06-16 4:53 ` [PATCH 1/6] libext2fs: improve jbd_debug() implementation Eric Biggers
@ 2021-07-07 2:38 ` Theodore Ts'o
0 siblings, 0 replies; 13+ messages in thread
From: Theodore Ts'o @ 2021-07-07 2:38 UTC (permalink / raw)
To: Eric Biggers; +Cc: linux-ext4
On Tue, Jun 15, 2021 at 09:53:29PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> Make jbd_debug() do format string checking (but still get compiled away
> to nothing) when --enable-jbd-debug isn't specified, similar to
> commit d556435156b7 ("jbd2: avoid -Wempty-body warnings") on the kernel
> side. This should prevent --enable-jbd-debug from getting broken due to
> bad jbd_debug() statements. It also eliminates a -Wunused-variable
> warning where a variable was only used in a jbd_debug() statement.
>
> Also remove an alternative definition of jbd_debug() that was
> conditional on CONFIG_JBD_DEBUG && !CONFIG_JBD_DEBUG, so was dead code.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/6] e2fsck: sync fc_do_one_pass() changes from kernel
2021-06-16 4:53 ` [PATCH 2/6] e2fsck: sync fc_do_one_pass() changes from kernel Eric Biggers
@ 2021-07-07 2:42 ` Theodore Ts'o
0 siblings, 0 replies; 13+ messages in thread
From: Theodore Ts'o @ 2021-07-07 2:42 UTC (permalink / raw)
To: Eric Biggers; +Cc: linux-ext4
On Tue, Jun 15, 2021 at 09:53:30PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> Sync the changes to fc_do_one_pass() from the kernel's recovery.c so
> that e2fsck picks up the fixes to the jbd_debug() statements.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/6] mke2fs: use ext2fs_get_device_size2() on all platforms
2021-06-16 4:53 ` [PATCH 3/6] mke2fs: use ext2fs_get_device_size2() on all platforms Eric Biggers
@ 2021-07-07 2:43 ` Theodore Ts'o
0 siblings, 0 replies; 13+ messages in thread
From: Theodore Ts'o @ 2021-07-07 2:43 UTC (permalink / raw)
To: Eric Biggers; +Cc: linux-ext4
On Tue, Jun 15, 2021 at 09:53:31PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> Since commit e8c858047be6 ("libext2fs: fix build issue for on
> Windows/Cygwin systems"), ext2fs_get_device_size2() is available in
> Windows builds of libext2fs. So there is no need for mke2fs to call
> ext2fs_get_device_size() instead.
>
> This fixes a -Wincompatible-pointer-types warning because
> ext2fs_get_device_size() was being passed a 'blk64_t *', but it expected
> a 'blk_t *'.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/6] Fix -Wunused-parameter warnings
2021-06-16 4:53 ` [PATCH 4/6] Fix -Wunused-parameter warnings Eric Biggers
@ 2021-07-07 2:44 ` Theodore Ts'o
0 siblings, 0 replies; 13+ messages in thread
From: Theodore Ts'o @ 2021-07-07 2:44 UTC (permalink / raw)
To: Eric Biggers; +Cc: linux-ext4
On Tue, Jun 15, 2021 at 09:53:32PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> Fix all warnings about unused function parameters that were introduced
> since e2fsprogs v1.45.4, by adding EXT2FS_ATTR((unused)) or removing
> parameters as appropriate.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 5/6] Fix -Wunused-variable warnings
2021-06-16 4:53 ` [PATCH 5/6] Fix -Wunused-variable warnings Eric Biggers
@ 2021-07-07 3:13 ` Theodore Ts'o
0 siblings, 0 replies; 13+ messages in thread
From: Theodore Ts'o @ 2021-07-07 3:13 UTC (permalink / raw)
To: Eric Biggers; +Cc: linux-ext4
On Tue, Jun 15, 2021 at 09:53:33PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> Fix all warnings about unused variables that were introduced since
> e2fsprogs v1.45.4.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Fixed, although I had to drop a hunk which was already fixed by the commit:
1e0c8ca7 e2fsck: fix portability problems caused by unaligned accesses
- Ted
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 6/6] libext2fs: fix a -Wunused-label warning
2021-06-16 4:53 ` [PATCH 6/6] libext2fs: fix a -Wunused-label warning Eric Biggers
@ 2021-07-07 3:14 ` Theodore Ts'o
0 siblings, 0 replies; 13+ messages in thread
From: Theodore Ts'o @ 2021-07-07 3:14 UTC (permalink / raw)
To: Eric Biggers; +Cc: linux-ext4
On Tue, Jun 15, 2021 at 09:53:34PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> Remove a label which isn't used.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-07-07 3:14 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 4:53 [PATCH 0/6] e2fsprogs: fix compiler warnings introduced since v1.45.4 Eric Biggers
2021-06-16 4:53 ` [PATCH 1/6] libext2fs: improve jbd_debug() implementation Eric Biggers
2021-07-07 2:38 ` Theodore Ts'o
2021-06-16 4:53 ` [PATCH 2/6] e2fsck: sync fc_do_one_pass() changes from kernel Eric Biggers
2021-07-07 2:42 ` Theodore Ts'o
2021-06-16 4:53 ` [PATCH 3/6] mke2fs: use ext2fs_get_device_size2() on all platforms Eric Biggers
2021-07-07 2:43 ` Theodore Ts'o
2021-06-16 4:53 ` [PATCH 4/6] Fix -Wunused-parameter warnings Eric Biggers
2021-07-07 2:44 ` Theodore Ts'o
2021-06-16 4:53 ` [PATCH 5/6] Fix -Wunused-variable warnings Eric Biggers
2021-07-07 3:13 ` Theodore Ts'o
2021-06-16 4:53 ` [PATCH 6/6] libext2fs: fix a -Wunused-label warning Eric Biggers
2021-07-07 3:14 ` Theodore Ts'o
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.