diff options
author | Eric Biggers <ebiggers@google.com> | 2021-06-15 21:53:32 -0700 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-07-06 22:44:19 -0400 |
commit | b5f2be81eb6df08dc28ecee6a0be857a0b539b74 (patch) | |
tree | c3fe33283ad4978029ff7e0981e5d40df8729b96 | |
parent | 108f3021a6b68a86eae3bd9da7f9ce8a1568ce50 (diff) | |
download | e2fsprogs-b5f2be81eb6df08dc28ecee6a0be857a0b539b74.tar.gz |
Fix -Wunused-parameter warnings
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>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | debugfs/journal.c | 3 | ||||
-rw-r--r-- | e2fsck/jfs_user.h | 3 | ||||
-rw-r--r-- | e2fsck/journal.c | 7 | ||||
-rw-r--r-- | e2fsck/pass1b.c | 3 | ||||
-rw-r--r-- | e2fsck/pass2.c | 3 | ||||
-rw-r--r-- | lib/support/mkquota.c | 3 |
6 files changed, 14 insertions, 8 deletions
diff --git a/debugfs/journal.c b/debugfs/journal.c index 686d0eb07..095fff008 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 1babf4172..6d24558b7 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 16d5cf86b..af0effceb 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; @@ -442,7 +443,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; @@ -552,7 +553,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 656a275be..92c746c1d 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 94f92c8bd..8ebdf7667 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 fbc3833ae..71f42c2cb 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; |