public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf: Fix compilation warning/abort
@ 2010-09-09 14:14 Davidlohr Bueso
  0 siblings, 0 replies; only message in thread
From: Davidlohr Bueso @ 2010-09-09 14:14 UTC (permalink / raw)
  To: a.p.zijlstra, acme, mingo; +Cc: LKML

[PATCH] perf: Fix compilation warning regarding the -Wstack-protector option.

The message is (GCC 4.4.3):

CC util/ui/util.o
cc1: warnings being treated as errors
util/ui/util.c: In function ‘ui__dialog_yesno’:
util/ui/util.c:109: error: not protecting function: no buffer at least 8 bytes long
make: *** [util/ui/util.o] Error 1

This was also mentioned in http://lkml.org/lkml/2010/8/21/143

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 tools/perf/util/ui/util.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/ui/util.c b/tools/perf/util/ui/util.c
index 04600e2..e5b1186 100644
--- a/tools/perf/util/ui/util.c
+++ b/tools/perf/util/ui/util.c
@@ -109,6 +109,5 @@ 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;
+	return newtWinChoice(NULL, (char *) "Yes", (char *) "No", (char *)msg) == 1;
 }
-- 
1.7.0.4




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

only message in thread, other threads:[~2010-09-09 14:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-09 14:14 [PATCH] perf: Fix compilation warning/abort Davidlohr Bueso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox