Re: [tip:perf/core] perf top: Introduce slang based TUI

From: Arnaldo Carvalho de Melo
Date: Tue Feb 01 2011 - 14:29:00 EST


Em Tue, Feb 01, 2011 at 10:51:23AM -0800, Yinghai Lu escreveu:
> On 02/01/2011 01:20 AM, tip-bot for Arnaldo Carvalho de Melo wrote:
> > + slsmg_write_nstring(width >= syme->map->dso->long_name_len ?
> > + syme->map->dso->long_name :
> > + syme->map->dso->short_name, width);
>
>
> need update macro for that calling
>
> [PATCH] perf: fix compiling for perf top tui
>
> util/ui/browsers/top.c: In function âperf_top_browser__writeâ:
> util/ui/browsers/top.c:60:2: error: cast to pointer from integer of different size
> util/ui/browsers/top.c:60:2: error: comparison between pointer and integer
> util/ui/browsers/top.c:60:2: error: passing argument 1 of âSLsmg_write_nstringâ discards qualifiers from pointer target type
> /usr/include/slang.h:1728:16: note: expected âchar *â but argument is of type âconst char *â
> make: *** [util/ui/browsers/top.o] Error 1
>
> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>

Good catch, why I didn't got this here is a mistery... anyway, applying,
thanks,

- Arnaldo

> ---
> tools/perf/util/ui/libslang.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: linux-2.6/tools/perf/util/ui/libslang.h
> ===================================================================
> --- linux-2.6.orig/tools/perf/util/ui/libslang.h
> +++ linux-2.6/tools/perf/util/ui/libslang.h
> @@ -13,11 +13,11 @@
>
> #if SLANG_VERSION < 20104
> #define slsmg_printf(msg, args...) \
> - SLsmg_printf((char *)msg, ##args)
> + SLsmg_printf((char *)(msg), ##args)
> #define slsmg_write_nstring(msg, len) \
> - SLsmg_write_nstring((char *)msg, len)
> + SLsmg_write_nstring((char *)(msg), len)
> #define sltt_set_color(obj, name, fg, bg) \
> - SLtt_set_color(obj,(char *)name, (char *)fg, (char *)bg)
> + SLtt_set_color(obj,(char *)(name), (char *)(fg), (char *)(bg))
> #else
> #define slsmg_printf SLsmg_printf
> #define slsmg_write_nstring SLsmg_write_nstring
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/