Messages in this thread Patch in this message | | | Subject | [PATCH] perf: Fix compilation warning/abort | From | Davidlohr Bueso <> | Date | Thu, 09 Sep 2010 10:14:47 -0400 |
| |
[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/
| |