From: Michal Marek <mmarek@suse.cz>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Arnaud Lacombe <lacombar@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>
Subject: Re: linux-next: build warning after merge of the kbuild tree
Date: Thu, 30 Sep 2010 22:24:28 +0200 [thread overview]
Message-ID: <20100930202428.GB25629@sepie.suse.cz> (raw)
In-Reply-To: <20100930105222.d1dd6606.sfr@canb.auug.org.au>
On Thu, Sep 30, 2010 at 10:52:22AM +1000, Stephen Rothwell wrote:
> After merging the kbuild tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
>
> In file included from scripts/kconfig/zconf.tab.c:2485:
> scripts/kconfig/symbol.c: In function 'sym_expand_string_value':
> scripts/kconfig/symbol.c:881: warning: ignoring return value of 'realloc', declared with attribute warn_unused_result
>
> Introduced by commit 76a540958af5390a94b7f68c46cb7f2aed34ccf1 ("kconfig:
> add a symbol string expansion helper").
Thanks a lot for spotting it, fixed with
From: Michal Marek <mmarek@suse.cz>
Subject: kconfig: Fix realloc usage()
Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
scripts/kconfig/symbol.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index dc5dcf2..c0efe10 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -878,7 +878,7 @@ const char *sym_expand_string_value(const char *in)
newlen = strlen(res) + strlen(symval) + strlen(src);
if (newlen > reslen) {
reslen = newlen;
- realloc(res, reslen);
+ res = realloc(res, reslen);
}
strcat(res, symval);
Actually dealing with OOM condition would be another patch, right now
most of kconfig ignores it.
Michal
next prev parent reply other threads:[~2010-09-30 20:24 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-30 0:52 linux-next: build warning after merge of the kbuild tree Stephen Rothwell
2010-09-30 20:24 ` Michal Marek [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-10-03 23:13 Stephen Rothwell
2023-08-28 4:57 Stephen Rothwell
2023-08-28 17:28 ` Nick Desaulniers
2021-08-19 23:28 Stephen Rothwell
2021-08-23 0:25 ` Masahiro Yamada
2020-12-20 22:10 Stephen Rothwell
2020-12-09 9:30 Stephen Rothwell
2020-12-09 13:01 ` Dominique Martinet
2020-12-09 20:56 ` Stephen Rothwell
2020-12-10 6:47 ` Dominique Martinet
2020-12-14 20:44 ` Stephen Rothwell
2017-12-10 22:52 Stephen Rothwell
2017-12-11 0:22 ` Masahiro Yamada
2017-12-11 16:11 ` Bart Van Assche
2016-11-30 23:06 Stephen Rothwell
2016-12-01 2:00 ` Nicholas Piggin
2011-05-02 2:18 Stephen Rothwell
2011-05-02 2:24 ` Dave Jones
2011-05-02 3:45 ` Stephen Rothwell
2011-05-02 4:02 ` Dave Jones
2011-05-02 4:44 ` Stephen Rothwell
2011-05-02 4:24 ` Stephen Rothwell
2011-05-02 4:36 ` Dave Jones
2011-05-02 5:57 ` Stephen Rothwell
2011-05-02 4:53 ` Stephen Rothwell
2011-05-02 11:13 ` Michal Marek
2011-05-02 15:17 ` Valdis.Kletnieks
2011-05-02 15:31 ` Michal Marek
2010-12-23 0:00 Stephen Rothwell
2010-09-30 0:50 Stephen Rothwell
2010-09-30 20:25 ` Michal Marek
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=20100930202428.GB25629@sepie.suse.cz \
--to=mmarek@suse.cz \
--cc=lacombar@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=sfr@canb.auug.org.au \
/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).