blob: b53e107d84ab5f817c04ae5e11ac898eab9ca376 [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -05001From 191f528da19193d713d94ee252e2485efd9af4d3 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Mon, 25 Oct 2021 17:59:24 +0200
4Subject: [PATCH] staprun: address ncurses 6.3 failures
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex@linutronix.de>
8---
9 staprun/monitor.c | 24 ++++++++++++------------
10 1 file changed, 12 insertions(+), 12 deletions(-)
11
12diff --git a/staprun/monitor.c b/staprun/monitor.c
13index 478634c09..f4fbfd686 100644
14--- a/staprun/monitor.c
15+++ b/staprun/monitor.c
16@@ -448,12 +448,12 @@ void monitor_render(void)
17 if (active_window == 0)
18 wattron(status, A_BOLD);
19 wprintw(status, "\n%*s\t%*s\t%*s\t%*s\t%*s\t%*s\t%s\n",
20- width[p_index], HIGHLIGHT("index", p_index, comp_fn_index),
21- width[p_state], HIGHLIGHT("state", p_state, comp_fn_index),
22- width[p_hits], HIGHLIGHT("hits", p_hits, comp_fn_index),
23- width[p_min], HIGHLIGHT("min", p_min, comp_fn_index),
24- width[p_avg], HIGHLIGHT("avg", p_avg, comp_fn_index),
25- width[p_max], HIGHLIGHT("max", p_max, comp_fn_index),
26+ (int)width[p_index], HIGHLIGHT("index", p_index, comp_fn_index),
27+ (int)width[p_state], HIGHLIGHT("state", p_state, comp_fn_index),
28+ (int)width[p_hits], HIGHLIGHT("hits", p_hits, comp_fn_index),
29+ (int)width[p_min], HIGHLIGHT("min", p_min, comp_fn_index),
30+ (int)width[p_avg], HIGHLIGHT("avg", p_avg, comp_fn_index),
31+ (int)width[p_max], HIGHLIGHT("max", p_max, comp_fn_index),
32 HIGHLIGHT("name", p_name, comp_fn_index));
33 if (active_window == 0)
34 wattroff(status, A_BOLD);
35@@ -466,17 +466,17 @@ void monitor_render(void)
36 json_object *probe, *field;
37 probe = json_object_array_get_idx(jso_probe_list, i);
38 json_object_object_get_ex(probe, "index", &field);
39- wprintw(status, "%*s\t", width[p_index], json_object_get_string(field));
40+ wprintw(status, "%*s\t", (int)width[p_index], json_object_get_string(field));
41 json_object_object_get_ex(probe, "state", &field);
42- wprintw(status, "%*s\t", width[p_state], json_object_get_string(field));
43+ wprintw(status, "%*s\t", (int)width[p_state], json_object_get_string(field));
44 json_object_object_get_ex(probe, "hits", &field);
45- wprintw(status, "%*s\t", width[p_hits], json_object_get_string(field));
46+ wprintw(status, "%*s\t", (int)width[p_hits], json_object_get_string(field));
47 json_object_object_get_ex(probe, "min", &field);
48- wprintw(status, "%*s\t", width[p_min], json_object_get_string(field));
49+ wprintw(status, "%*s\t", (int)width[p_min], json_object_get_string(field));
50 json_object_object_get_ex(probe, "avg", &field);
51- wprintw(status, "%*s\t", width[p_avg], json_object_get_string(field));
52+ wprintw(status, "%*s\t", (int)width[p_avg], json_object_get_string(field));
53 json_object_object_get_ex(probe, "max", &field);
54- wprintw(status, "%*s\t", width[p_max], json_object_get_string(field));
55+ wprintw(status, "%*s\t", (int)width[p_max], json_object_get_string(field));
56 getyx(status, discard, cur_x);
57 json_object_object_get_ex(probe, "name", &field);
58 wprintw(status, "%.*s", max_cols-cur_x-1, json_object_get_string(field));
59--
602.20.1
61