All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: a.p.zijlstra@chello.nl, acme@redhat.com, mingo@elte.hu
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] perf: Fix compilation warning/abort
Date: Thu, 09 Sep 2010 10:14:47 -0400	[thread overview]
Message-ID: <1284041687.2000.6.camel@cowboy> (raw)

[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




                 reply	other threads:[~2010-09-09 14:15 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=1284041687.2000.6.camel@cowboy \
    --to=dave@gnu.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.