All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] xfsprogs: scrub: fix warnings/errors due to missing include
@ 2023-01-06  9:36 Holger Hoffstätte
  0 siblings, 0 replies; only message in thread
From: Holger Hoffstätte @ 2023-01-06  9:36 UTC (permalink / raw)
  To: linux-xfs, Carlos Maiolino


Gentoo is currently trying to rebuild the world with clang-16, uncovering exciting
new errors in many packages since several warnings have been turned into errors,
among them missing prototypes, as documented at:
https://discourse.llvm.org/t/clang-16-notice-of-potentially-breaking-changes/65562

xfsprogs came up, with details at https://bugs.gentoo.org/875050.

The problem was easy to find: a missing include for the u_init/u_cleanup
prototypes. The error:

Building scrub
     [CC]     unicrash.o
unicrash.c:746:2: error: call to undeclared function 'u_init'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
         u_init(&uerr);
         ^
unicrash.c:746:2: note: did you mean 'u_digit'?
/usr/include/unicode/uchar.h:4073:1: note: 'u_digit' declared here
u_digit(UChar32 ch, int8_t radix);
^
unicrash.c:754:2: error: call to undeclared function 'u_cleanup'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
         u_cleanup();
         ^
2 errors generated.

The complaint is valid and the fix is easy enough: just add the missing include.

Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
---
  scrub/unicrash.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/scrub/unicrash.c b/scrub/unicrash.c
index cb0880c1..24d4ea58 100644
--- a/scrub/unicrash.c
+++ b/scrub/unicrash.c
@@ -10,6 +10,7 @@
  #include <sys/types.h>
  #include <sys/statvfs.h>
  #include <strings.h>
+#include <unicode/uclean.h>
  #include <unicode/ustring.h>
  #include <unicode/unorm2.h>
  #include <unicode/uspoof.h>
-- 
2.39.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-06  9:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06  9:36 [PATCH RESEND] xfsprogs: scrub: fix warnings/errors due to missing include Holger Hoffstätte

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.