代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/powertop 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 9ef1559a1582f23d599c149601c3a8e06809296c Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <[email protected]>
Date: Mon, 25 Oct 2021 17:47:23 +0200
Subject: [PATCH] src: fix compatibility with ncurses 6.3
Signed-off-by: Alexander Kanavin <[email protected]>
---
src/devices/devfreq.cpp | 2 +-
src/display.cpp | 2 +-
src/lib.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp
index 0509d0f..b194ac4 100644
--- 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");
}
diff --git a/src/display.cpp b/src/display.cpp
index 7131144..cc03919 100644
--- 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"),
diff --git a/src/lib.cpp b/src/lib.cpp
index 5e48f37..5cd1c4a 100644
--- a/src/lib.cpp
+++ b/src/lib.cpp
@@ -583,7 +583,7 @@ void ui_notify_user_ncurses(const char *frmt, ...)
* 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));
}
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。