aboutsummaryrefslogtreecommitdiff
path: root/utils/powertop/patches/010-ncurses63.patch
blob: 53f9ff7078b956e9277a2e570e9c9bfaa3598b2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 9ef1559a1582f23d599c149601c3a8e06809296c Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Mon, 25 Oct 2021 17:47:23 +0200
Subject: [PATCH] src: fix compatibility with ncurses 6.3

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 src/devices/devfreq.cpp | 2 +-
 src/display.cpp         | 2 +-
 src/lib.cpp             | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

--- a/src/devices/devfreq.cpp
+++ b/src/devices/devfreq.cpp
@@ -297,7 +297,7 @@ void display_devfreq_devices(void)
 			df->fill_freq_utilization(j, buf);
 			strcat(fline, buf);
 			strcat(fline, "\n");
-			wprintw(win, fline);
+			wprintw(win, "%s", fline);
 		}
 		wprintw(win, "\n");
 	}
--- a/src/display.cpp
+++ b/src/display.cpp
@@ -125,7 +125,7 @@ void show_tab(unsigned int tab)
 
 	c = bottom_lines[tab_names[tab]].c_str();
 	if (c && strlen(c) > 0)
-		mvwprintw(bottom_line, 0,0, c);
+		mvwprintw(bottom_line, 0,0, "%s", c);
 	else
 		mvwprintw(bottom_line, 0, 0,
 			"<ESC> %s | <TAB> / <Shift + TAB> %s | ", _("Exit"),
--- a/src/lib.cpp
+++ b/src/lib.cpp
@@ -583,7 +583,7 @@ void ui_notify_user_ncurses(const char *
 	 * buffer */
 	vsnprintf(notify, UI_NOTIFY_BUFF_SZ - 1, frmt, list);
 	va_end(list);
-	mvprintw(1, 0, notify);
+	mvprintw(1, 0, "%s", notify);
 	attroff(COLOR_PAIR(1));
 }