From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: "Frédéric Weisbecker" <fweisbec@gmail.com>,
"Ingo Molnar" <mingo@elte.hu>,
"Peter Zijlstra" <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: perf compilation fails on Ubuntu's gcc 4.3.3
Date: Sun, 22 Aug 2010 01:07:11 +0400 [thread overview]
Message-ID: <20100821210711.GE5746@lenovo> (raw)
Hi,
here is what I got today trying to compile perf on my
Ubuntu system
> CC util/ui/util.o
> cc1: warnings being treated as errors
> util/ui/util.c: In function ‘ui__dialog_yesno’:
> util/ui/util.c:108: error: not protecting function: no buffer at least 8 bytes long
> make: *** [util/ui/util.o] Error 1
An ugly hack like
diff --git a/tools/perf/util/ui/util.c b/tools/perf/util/ui/util.c
index 9706d9d..4ef6a86 100644
--- a/tools/perf/util/ui/util.c
+++ b/tools/perf/util/ui/util.c
@@ -107,6 +107,7 @@ out_destroy_form:
bool ui__dialog_yesno(const char *msg)
{
/* newtWinChoice should really be accepting const char pointers... */
- char yes[] = "Yes", no[] = "No";
- return newtWinChoice(NULL, yes, no, (char *)msg) == 1;
+ const char *yes = "Yes";
+ const char *no = "No";
+ return newtWinChoice(NULL, (char *)yes, (char *)no, (char *)msg) == 1;
}
did trick for me. But the issue origin is
EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstack-protector
What is the best way to deal with it?
| cyrill@lenovo perf $ gcc --version
| gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
| Copyright (C) 2008 Free Software Foundation, Inc.
| This is free software; see the source for copying conditions. There is NO
| warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-- Cyrill
reply other threads:[~2010-08-21 21:07 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=20100821210711.GE5746@lenovo \
--to=gorcunov@gmail.com \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.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