aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/tiptop/tiptop/0001-Fix-a-lot-of-Werror-format-security-errors-with-mvwp.patch
blob: 6d5e293c7fe9e1802d40c6745afb8def32c459d8 (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
From 42e99eb6c727df7c9d49586803a4bf9933a9796b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Oct 2021 10:52:42 -0700
Subject: [PATCH] Fix a lot of -Werror=format-security errors with mvwprintw

In all these places a non-constant is used as a format string which
compiler complains about. Fix by using "%s" as format.

Upstream-Status: Pending

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/helpwin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/helpwin.c b/src/helpwin.c
index 0d660f9..1623d9c 100644
--- a/src/helpwin.c
+++ b/src/helpwin.c
@@ -61,7 +61,7 @@ void show_help_win(WINDOW* win, screen_t* screen)
     wattroff(win, A_REVERSE);
 
   /* screen description */
-  mvwprintw(win, 2, 1, screen->desc);
+  mvwprintw(win, 2, 1, "%s", screen->desc);
 
   /* max size of column headers */
   for(i = 0; i < n; i++) {
-- 
2.33.1