You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.3 KiB

  1. From 9ef1559a1582f23d599c149601c3a8e06809296c Mon Sep 17 00:00:00 2001
  2. From: Alexander Kanavin <alex@linutronix.de>
  3. Date: Mon, 25 Oct 2021 17:47:23 +0200
  4. Subject: [PATCH] src: fix compatibility with ncurses 6.3
  5. Signed-off-by: Alexander Kanavin <alex@linutronix.de>
  6. ---
  7. src/devices/devfreq.cpp | 2 +-
  8. src/display.cpp | 2 +-
  9. src/lib.cpp | 2 +-
  10. 3 files changed, 3 insertions(+), 3 deletions(-)
  11. --- a/src/devices/devfreq.cpp
  12. +++ b/src/devices/devfreq.cpp
  13. @@ -297,7 +297,7 @@ void display_devfreq_devices(void)
  14. df->fill_freq_utilization(j, buf);
  15. strcat(fline, buf);
  16. strcat(fline, "\n");
  17. - wprintw(win, fline);
  18. + wprintw(win, "%s", fline);
  19. }
  20. wprintw(win, "\n");
  21. }
  22. --- a/src/display.cpp
  23. +++ b/src/display.cpp
  24. @@ -125,7 +125,7 @@ void show_tab(unsigned int tab)
  25. c = bottom_lines[tab_names[tab]].c_str();
  26. if (c && strlen(c) > 0)
  27. - mvwprintw(bottom_line, 0,0, c);
  28. + mvwprintw(bottom_line, 0,0, "%s", c);
  29. else
  30. mvwprintw(bottom_line, 0, 0,
  31. "<ESC> %s | <TAB> / <Shift + TAB> %s | ", _("Exit"),
  32. --- a/src/lib.cpp
  33. +++ b/src/lib.cpp
  34. @@ -583,7 +583,7 @@ void ui_notify_user_ncurses(const char *
  35. * buffer */
  36. vsnprintf(notify, UI_NOTIFY_BUFF_SZ - 1, frmt, list);
  37. va_end(list);
  38. - mvprintw(1, 0, notify);
  39. + mvprintw(1, 0, "%s", notify);
  40. attroff(COLOR_PAIR(1));
  41. }