]> bbs.cooldavid.org Git - net-next-2.6.git/commit
perf, ui: Eliminate stack-smashing protection compiler complaint
authorCyrill Gorcunov <gorcunov@gmail.com>
Sat, 6 Nov 2010 08:47:24 +0000 (11:47 +0300)
committerIngo Molnar <mingo@elte.hu>
Wed, 10 Nov 2010 08:04:32 +0000 (09:04 +0100)
commita3da8e451321c31d88cebd12c234d0aac2a1cc35
treebb9ebc34ecaaf6a18b54a3c874a02403a8a107c9
parentf6614b7bb405a9b35dd28baea989a749492c46b2
perf, ui: Eliminate stack-smashing protection compiler complaint

The gcc complains about small auto-var strings being allocated from stack space.
Make them const to avoid this:

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

The real bug is in the newtWinChoice() ABI - but that's an
externality we cannot fix here, so we use this workaround.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <20101106084724.GA5956@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/util/ui/util.c