perf: Fix compilation warning/abort
PATCH 1/1 perf: Fix compilation warning/abort
[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 errorsutil/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 <[email protected]>
--- tools/perf/util/ui/util.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
tools/perf/util/ui/util.c +1 -2
@@ -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 ; }
Signature · 1 line
1.7.0.4