From: "Darrick J. Wong" <djwong@kernel.org>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 6/7] libsupport: fix gcc -Wall warnings
Date: Mon, 4 May 2026 17:20:44 -0700 [thread overview]
Message-ID: <20260505002044.GG1101423@frogsfrogsfrogs> (raw)
In-Reply-To: <20260504233301.2345652-7-tytso@mit.edu>
On Mon, May 04, 2026 at 07:33:00PM -0400, Theodore Ts'o wrote:
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Looks good to me,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> lib/support/cache.c | 12 +++++++++---
> lib/support/cache.h | 2 +-
> lib/support/list.h | 8 ++++----
> 3 files changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/lib/support/cache.c b/lib/support/cache.c
> index aec785347..ece0adece 100644
> --- a/lib/support/cache.c
> +++ b/lib/support/cache.c
> @@ -15,6 +15,12 @@
> #include <stdint.h>
> #include <errno.h>
>
> +#ifdef __GNUC__
> +#define EXT2FS_ATTR(x) __attribute__(x)
> +#else
> +#define EXT2FS_ATTR(x)
> +#endif
> +
> #include "config.h"
> #include "list.h"
> #include "cache.h"
> @@ -711,7 +717,7 @@ cache_node_put(
>
> void
> cache_node_set_priority(
> - struct cache * cache,
> + struct cache * cache EXT2FS_ATTR((unused)),
> struct cache_node * node,
> int priority)
> {
> @@ -820,7 +826,7 @@ cache_flush(
> {
> struct cache_hash *hash;
> struct cache_node *node;
> - int i;
> + unsigned int i;
> bool still_dirty = false;
>
> if (!cache->flush)
> @@ -848,7 +854,7 @@ cache_report(
> const char *name,
> struct cache *cache)
> {
> - int i;
> + unsigned int i;
> unsigned long count, index, total;
> unsigned long hash_bucket_lengths[HASH_REPORT + 2] = { 0 };
>
> diff --git a/lib/support/cache.h b/lib/support/cache.h
> index 71fb9762f..cd0e8c20e 100644
> --- a/lib/support/cache.h
> +++ b/lib/support/cache.h
> @@ -83,7 +83,7 @@ typedef unsigned int (*cache_node_resize_t)(const struct cache *c,
> unsigned int curr_size,
> int dir);
>
> -static inline unsigned int cache_gradual_resize(const struct cache *cache,
> +static inline unsigned int cache_gradual_resize(const struct cache *cache EXT2FS_ATTR((unused)),
> unsigned int curr_size,
> int dir)
> {
> diff --git a/lib/support/list.h b/lib/support/list.h
> index 0ec8de525..54e8e2360 100644
> --- a/lib/support/list.h
> +++ b/lib/support/list.h
> @@ -148,13 +148,13 @@ static __always_inline bool __list_del_entry_valid(struct list_head *entry)
> return ret;
> }
> #else
> -static inline bool __list_add_valid(struct list_head *new,
> - struct list_head *prev,
> - struct list_head *next)
> +static inline bool __list_add_valid(struct list_head *new EXT2FS_ATTR((unused)),
> + struct list_head *prev EXT2FS_ATTR((unused)),
> + struct list_head *next EXT2FS_ATTR((unused)))
> {
> return true;
> }
> -static inline bool __list_del_entry_valid(struct list_head *entry)
> +static inline bool __list_del_entry_valid(struct list_head *entry EXT2FS_ATTR((unused)))
> {
> return true;
> }
> --
> 2.53.0
>
>
next prev parent reply other threads:[~2026-05-05 0:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 23:32 [PATCH 0/7] fix up issues from djwong/fuse4fs-fork Theodore Ts'o
2026-05-04 23:32 ` [PATCH 1/7] libsupport: drop xbitops.h and define fls() if necessary Theodore Ts'o
2026-05-05 0:11 ` Darrick J. Wong
2026-05-04 23:32 ` [PATCH 2/7] configure.ac: fix disable fuse2fs/fuse4fs by default path Theodore Ts'o
2026-05-05 0:13 ` Darrick J. Wong
2026-05-04 23:32 ` [PATCH 3/7] libsupport: don't use bzero in cache.c Theodore Ts'o
2026-05-05 0:15 ` Darrick J. Wong
2026-05-04 23:32 ` [PATCH 4/7] fuse[24]fs: suppress clang warnings which were breaking the github CI Theodore Ts'o
2026-05-05 0:20 ` Darrick J. Wong
2026-05-04 23:32 ` [PATCH 5/7] libsupport: remove the LIST_HEAD macro from list.h Theodore Ts'o
2026-05-05 0:20 ` Darrick J. Wong
2026-05-04 23:33 ` [PATCH 6/7] libsupport: fix gcc -Wall warnings Theodore Ts'o
2026-05-05 0:20 ` Darrick J. Wong [this message]
2026-05-04 23:33 ` [PATCH 7/7] fuse2fs: fix uninitialized variable warnings Theodore Ts'o
2026-05-05 0:26 ` Darrick J. Wong
2026-05-05 0:08 ` [PATCH 0/7] fix up issues from djwong/fuse4fs-fork Darrick J. Wong
2026-05-05 7:21 ` Theodore Tso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260505002044.GG1101423@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox