From: Max <linmaxi@gmail.com>
To: linux-ext4@vger.kernel.org
Subject: [PROBLEM] all warnings being treated as errors when I try to compile ext4 subtree
Date: Sat, 14 Sep 2024 15:53:26 +0300 [thread overview]
Message-ID: <20240914125340.44480-1-linmaxi@gmail.com> (raw)
I have cloned the ext4 subtree: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
Then I tried to build it, first by making a .config file, and then running make.
The make won't finish beacuse I am getting this "all warnings being treated as errors":
In file included from help.c:12:
subcmd-util.h: In function ‘xrealloc’:
subcmd-util.h:58:31: error: pointer ‘ptr’ may be used after ‘realloc’ [-Werror=use-after-free]
58 | ret = realloc(ptr, 1);
| ^~~~~~~~~~~~~~~
subcmd-util.h:52:21: note: call to ‘realloc’ here
52 | void *ret = realloc(ptr, size);
| ^~~~~~~~~~~~~~~~~~
subcmd-util.h:56:23: error: pointer ‘ptr’ may be used after ‘realloc’ [-Werror=use-after-free]
56 | ret = realloc(ptr, size);
| ^~~~~~~~~~~~~~~~~~
subcmd-util.h:52:21: note: call to ‘realloc’ here
52 | void *ret = realloc(ptr, size);
| ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [/home/max/kernels/ext4/tools/build/Makefile.build:97: /home/max/kernels/build_ext4/tools/objtool/help.o] Error 1
Worth mentioning that trying to 'make' the mainline tree works fine.
I have tried adding the -Wno-error flag but it didnt work and anyway I think I shouldn't attempt changing it at all in order to build.
I would appreciate any help, I am a newbie, and I'd like to help fixing some bugs.
reply other threads:[~2024-09-14 12:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240914125340.44480-1-linmaxi@gmail.com \
--to=linmaxi@gmail.com \
--cc=linux-ext4@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