From: "Holger Hoffstätte" <holger@applied-asynchrony.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfsprogs: fix warnings/errors due to missing include
Date: Tue, 4 Oct 2022 20:34:23 +0200 [thread overview]
Message-ID: <e1df04bf-866d-1dc8-9653-7612cce96fe0@applied-asynchrony.com> (raw)
In-Reply-To: <Yzx7RrC1v2LQ6wSf@magnolia>
On 2022-10-04 20:28, Darrick J. Wong wrote:
> On Tue, Oct 04, 2022 at 08:11:05PM +0200, Holger Hoffstätte wrote:
>>
>> 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>
>
> Aha, that explains why I kept hearing reports about this but could never
> get gcc to spit out this error. Thanks for fixing this.
You're welcome. This reproduces with gcc when explicitly enabled:
$CFLAGS="-Werror=implicit-function-declaration -Werror=implicit-int" ./configure
cheers,
Holger
next prev parent reply other threads:[~2022-10-04 18:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 18:11 [PATCH] xfsprogs: fix warnings/errors due to missing include Holger Hoffstätte
2022-10-04 18:28 ` Darrick J. Wong
2022-10-04 18:34 ` Holger Hoffstätte [this message]
2022-10-04 18:40 ` Darrick J. Wong
2022-10-04 18:54 ` Holger Hoffstätte
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=e1df04bf-866d-1dc8-9653-7612cce96fe0@applied-asynchrony.com \
--to=holger@applied-asynchrony.com \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).