lkml.org 
[lkml]   [2010]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] perf: Fix compilation warning/abort
From
Date
[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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-09-09 16:17    [W:0.043 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site