lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240528131841.576999-1-hi@alyssa.is>
Date: Tue, 28 May 2024 15:18:41 +0200
From: Alyssa Ross <hi@...ssa.is>
To: Theodore Ts'o <tytso@....edu>,
	linux-ext4@...r.kernel.org
Subject: [PATCH e2fsprogs v2] libext2fs: fix unused parameter warnings/errors

This fixes building dependent packages that use -Werror.

Signed-off-by: Alyssa Ross <hi@...ssa.is>
---
 lib/ext2fs/ext2fs.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index 6e87829f..ff22f66b 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -585,7 +585,8 @@ typedef struct ext2_struct_inode_scan *ext2_inode_scan;
  */
 #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;
 
@@ -595,7 +596,8 @@ static inline __u32 __encode_extra_time(time_t seconds, __u32 nsec)
 #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)
@@ -630,7 +632,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)
@@ -639,7 +642,7 @@ static inline void __sb_set_tstamp(__u32 *lo, __u8 *hi, time_t seconds)
 	*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;

base-commit: 950a0d69c82b585aba30118f01bf80151deffe8c
-- 
2.44.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ