mbox series

[0/2] xfs: Clear a couple of W=1 warnings

Message ID 20240425120846.707829-1-john.g.garry@oracle.com (mailing list archive)
Headers show
Series xfs: Clear a couple of W=1 warnings | expand

Message

John Garry April 25, 2024, 12:08 p.m. UTC
For configs XFS_DEBUG and XFS_WARN disabled, there are a couple of W=1
warnings for unused variables. I have attempted to clear these here by
simply marking the unused variables as __maybe_unused.

I suppose that another solution would be to change the ASSERT() statement
relevant to this config from:
#define ASSERT(expr) ((void)0)
to:
#define ASSERT(expr) ((void)(expr))

Then the problem is that some local variables need to lose the
#ifdef XFS_DEBUG guards, as those variables are now referenced in
ASSERT(). This means that the objcode grows ever so slightly. I
assume that this has all been considered previously...

Based on v6.9-rc5

John Garry (2):
  xfs: Clear W=1 warning in xfs_iwalk_run_callbacks():
  xfs: Clear W=1 warning in xfs_trans_unreserve_and_mod_sb():

 fs/xfs/xfs_iwalk.c | 2 +-
 fs/xfs/xfs_trans.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)