From 967bcb155295c5e33c0edc6555bd4e25e9307899 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 28 May 2024 15:18:41 +0200 Subject: [PATCH] libext2fs: fix unused parameter warnings/errors Git-commit: 967bcb155295c5e33c0edc6555bd4e25e9307899 Patch-mainline: v1.47.2 This fixes building dependent packages that use -Werror. Signed-off-by: Alyssa Ross Link: https://lore.kernel.org/r/20240528131841.576999-1-hi@alyssa.is Signed-off-by: Theodore Ts'o Acked-by: Anthony Iliopoulos --- lib/ext2fs/ext2fs.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) Index: e2fsprogs-1.47.1/lib/ext2fs/ext2fs.h =================================================================== --- e2fsprogs-1.47.1.orig/lib/ext2fs/ext2fs.h +++ e2fsprogs-1.47.1/lib/ext2fs/ext2fs.h @@ -586,7 +586,8 @@ typedef struct ext2_struct_inode_scan *e */ #define EXT2_I_SIZE(i) ((i)->i_size | ((__u64) (i)->i_size_high << 32)) -static inline __u32 __encode_extra_time(time_t seconds, __u32 nsec) +static inline __u32 __encode_extra_time(time_t seconds EXT2FS_ATTR((unused)), + __u32 nsec) { __u32 extra = 0; @@ -596,7 +597,8 @@ static inline __u32 __encode_extra_time( #endif return extra | (nsec << EXT4_EPOCH_BITS); } -static inline time_t __decode_extra_sec(time_t seconds, __u32 extra) +static inline time_t __decode_extra_sec(time_t seconds, + __u32 extra EXT2FS_ATTR((unused))) { #if (SIZEOF_TIME_T > 4) if (extra & EXT4_EPOCH_MASK) @@ -631,7 +633,8 @@ do { \ ((struct ext2_inode_large *)(inode))->field ## _extra) : \ (time_t)(inode)->field) -static inline void __sb_set_tstamp(__u32 *lo, __u8 *hi, time_t seconds) +static inline void __sb_set_tstamp(__u32 *lo, __u8 *hi EXT2FS_ATTR((unused)), + time_t seconds) { *lo = seconds & 0xffffffff; #if (SIZEOF_TIME_T > 4) @@ -640,7 +643,7 @@ static inline void __sb_set_tstamp(__u32 *hi = 0; #endif } -static inline time_t __sb_get_tstamp(__u32 *lo, __u8 *hi) +static inline time_t __sb_get_tstamp(__u32 *lo, __u8 *hi EXT2FS_ATTR((unused))) { #if (SIZEOF_TIME_T == 4) return *lo;