All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxfs: fix compilation errors
@ 2026-10-14 17:44 Darrick J. Wong
  2026-10-14 18:24 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2026-10-14 17:44 UTC (permalink / raw)
  To: Andrey Albershteyn; +Cc: linux-xfs

From: Darrick J. Wong <djwong@kernel.org>

Add includes to eliminate warnings from -Werror=missing-prototypes.
It's not a good idea to let the compiler apply the default function
declaration.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 libxfs/defer_item.c |    6 ++++++
 libxfs/trans.c      |    1 +
 2 files changed, 7 insertions(+)

diff --git a/libxfs/defer_item.c b/libxfs/defer_item.c
index 72d79b10d82064..c6ea292d3d6940 100644
--- a/libxfs/defer_item.c
+++ b/libxfs/defer_item.c
@@ -30,6 +30,12 @@
 #include "xfs_group.h"
 #include "xfs_rtgroup.h"
 #include "xfs_attr_item.h"
+#include "xfs_extfree_item.h"
+#include "xfs_bmap_item.h"
+#include "xfs_rmap_item.h"
+#include "xfs_refcount_item.h"
+#include "xfs_exchmaps_item.h"
+#include "xfs_icreate_item.h"
 
 /* Dummy defer item ops, since we don't do logging. */
 
diff --git a/libxfs/trans.c b/libxfs/trans.c
index 128e9f4431dc7c..c509ca1131116d 100644
--- a/libxfs/trans.c
+++ b/libxfs/trans.c
@@ -22,6 +22,7 @@
 #include "xfs_defer.h"
 #include "xfs_trace.h"
 #include "xfs_rtbitmap.h"
+#include "xfs_icreate_item.h"
 
 static void xfs_trans_free_items(struct xfs_trans *tp);
 STATIC struct xfs_trans *xfs_trans_dup(struct xfs_trans *tp);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] libxfs: fix compilation errors
  2026-10-14 17:44 [PATCH] libxfs: fix compilation errors Darrick J. Wong
@ 2026-10-14 18:24 ` Christoph Hellwig
  2026-10-14 18:42   ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2026-10-14 18:24 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: Andrey Albershteyn, linux-xfs

On Wed, Oct 14, 2026 at 10:44:42AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Add includes to eliminate warnings from -Werror=missing-prototypes.
> It's not a good idea to let the compiler apply the default function
> declaration.

What do I need to do to see these warnings?  I'm getting a few warnings
at the moment (and plan to look into them), but they are entirely
different:

xfs_alloc.c: In function '__xfs_free_extent':
xfs_alloc.c:4017:41: warning: variable 'busy_flags' set but not used [-Wunused-but-set-variable=]
 4017 |         unsigned int                    busy_flags = 0;
      |                                         ^~~~~~~~~~
xfs_bmap.c: In function 'xfs_bmapi_convert_one_delalloc':
xfs_bmap.c:4360:33: warning: variable 'flags' set but not used [-Wunused-but-set-variable=]
 4360 |         uint16_t                flags = 0;
      |                                 ^~~~~
xfs_log_rlimit.c: In function 'libxfs_log_get_max_trans_res':
xfs_log_rlimit.c:162:33: warning: variable 'i' set but not used [-Wunused-but-set-variable=]
  162 |         unsigned int            i;
      |                                 ^
2345 translated messages.
3139 translated messages.
prefetch.c: In function ‘do_inode_prefetch’:
prefetch.c:1027:33: warning: variable ‘queues_started’ set but not used [-Wunused-but-set-variable=]
 1027 |         int                     queues_started = 0;
      |                                 ^~~~~~~~~~~~~~
btheight.c: In function ‘construct_records_per_block’:
btheight.c:158:11: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  158 |         p = strchr(tag, ':');


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] libxfs: fix compilation errors
  2026-10-14 18:24 ` Christoph Hellwig
@ 2026-10-14 18:42   ` Darrick J. Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2026-10-14 18:42 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Andrey Albershteyn, linux-xfs

On Wed, Oct 14, 2026 at 11:24:09AM -0700, Christoph Hellwig wrote:
> On Wed, Oct 14, 2026 at 10:44:42AM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > Add includes to eliminate warnings from -Werror=missing-prototypes.
> > It's not a good idea to let the compiler apply the default function
> > declaration.
> 
> What do I need to do to see these warnings?  I'm getting a few warnings
> at the moment (and plan to look into them), but they are entirely
> different:

Add -Werror=missing-prototype (or -Werror) to WARNINGS in
include/builddefs.in:

WARNINGS += -Werror

Then rerun configure and make

--D

> xfs_alloc.c: In function '__xfs_free_extent':
> xfs_alloc.c:4017:41: warning: variable 'busy_flags' set but not used [-Wunused-but-set-variable=]
>  4017 |         unsigned int                    busy_flags = 0;
>       |                                         ^~~~~~~~~~
> xfs_bmap.c: In function 'xfs_bmapi_convert_one_delalloc':
> xfs_bmap.c:4360:33: warning: variable 'flags' set but not used [-Wunused-but-set-variable=]
>  4360 |         uint16_t                flags = 0;
>       |                                 ^~~~~
> xfs_log_rlimit.c: In function 'libxfs_log_get_max_trans_res':
> xfs_log_rlimit.c:162:33: warning: variable 'i' set but not used [-Wunused-but-set-variable=]
>   162 |         unsigned int            i;
>       |                                 ^
> 2345 translated messages.
> 3139 translated messages.
> prefetch.c: In function ‘do_inode_prefetch’:
> prefetch.c:1027:33: warning: variable ‘queues_started’ set but not used [-Wunused-but-set-variable=]
>  1027 |         int                     queues_started = 0;
>       |                                 ^~~~~~~~~~~~~~
> btheight.c: In function ‘construct_records_per_block’:
> btheight.c:158:11: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>   158 |         p = strchr(tag, ':');
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-14 18:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14 17:44 [PATCH] libxfs: fix compilation errors Darrick J. Wong
2026-10-14 18:24 ` Christoph Hellwig
2026-10-14 18:42   ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.