blob: 84b05ac97125a188a5666d17e129381dfe274a89 [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -05001From 76d3f0851520bc8488e432f423941f1e72cc7405 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Mon, 25 Oct 2021 17:47:23 +0200
4Subject: [PATCH] src: fix compatibility with ncurses 6.3
5
6Upstream-Status: Submitted [https://github.com/fenrus75/powertop/pull/92]
7Signed-off-by: Alexander Kanavin <alex@linutronix.de>
8---
9 src/devices/devfreq.cpp | 2 +-
10 src/display.cpp | 2 +-
11 src/lib.cpp | 2 +-
12 3 files changed, 3 insertions(+), 3 deletions(-)
13
14diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp
15index 0509d0f..b194ac4 100644
16--- a/src/devices/devfreq.cpp
17+++ b/src/devices/devfreq.cpp
18@@ -297,7 +297,7 @@ void display_devfreq_devices(void)
19 df->fill_freq_utilization(j, buf);
20 strcat(fline, buf);
21 strcat(fline, "\n");
22- wprintw(win, fline);
23+ wprintw(win, "%s", fline);
24 }
25 wprintw(win, "\n");
26 }
27diff --git a/src/display.cpp b/src/display.cpp
28index 7131144..cc03919 100644
29--- a/src/display.cpp
30+++ b/src/display.cpp
31@@ -125,7 +125,7 @@ void show_tab(unsigned int tab)
32
33 c = bottom_lines[tab_names[tab]].c_str();
34 if (c && strlen(c) > 0)
35- mvwprintw(bottom_line, 0,0, c);
36+ mvwprintw(bottom_line, 0,0, "%s", c);
37 else
38 mvwprintw(bottom_line, 0, 0,
39 "<ESC> %s | <TAB> / <Shift + TAB> %s | ", _("Exit"),
40diff --git a/src/lib.cpp b/src/lib.cpp
41index 5e48f37..5cd1c4a 100644
42--- a/src/lib.cpp
43+++ b/src/lib.cpp
44@@ -583,7 +583,7 @@ void ui_notify_user_ncurses(const char *frmt, ...)
45 * buffer */
46 vsnprintf(notify, UI_NOTIFY_BUFF_SZ - 1, frmt, list);
47 va_end(list);
48- mvprintw(1, 0, notify);
49+ mvprintw(1, 0, "%s", notify);
50 attroff(COLOR_PAIR(1));
51 }
52