libcdio/0001-fix-Werror-format-security.patch
Jun Yang 1810124060 Fix compiler error for option -Werror=format-security
After ncurses upgrade to 6.3, it introduces a format-security
compile error.
To fix it, a format literal string is added.

Reference: https://gitee.com/src-openeuler/gcc/issues/I4W7ZB

Signed-off-by: Jun Yang <jun.yang@suse.com>
(cherry picked from commit 6adce27012d58005c625fda28bcdc6bdb0399433)
2022-03-29 11:18:43 +08:00

40 lines
1.1 KiB
Diff

From 0e2d1498f1172c764eecbd1f278cf65740db0eb4 Mon Sep 17 00:00:00 2001
From: Jun Yang <jun.yang@suse.com>
Date: Wed, 9 Mar 2022 17:35:21 +0800
Subject: [PATCH] fix compiler error for option -Werror=format-security
Signed-off-by: Jun Yang <jun.yang@suse.com>
---
src/cdda-player.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/cdda-player.c b/src/cdda-player.c
index 69eddee..3566ca0 100644
--- a/src/cdda-player.c
+++ b/src/cdda-player.c
@@ -298,7 +298,7 @@ action(const char *psz_action)
psz_action);
else
snprintf(psz_action_line, sizeof(psz_action_line), "%s", "" );
- mvprintw(LINE_ACTION, 0, psz_action_line);
+ mvprintw(LINE_ACTION, 0, (char *) "%s", psz_action_line);
clrtoeol();
refresh();
}
@@ -1029,10 +1029,10 @@ display_tracks(void)
}
if (sub.track == i) {
attron(A_STANDOUT);
- mvprintw(i_line++, 0, line);
+ mvprintw(i_line++, 0, (char *) "%s", line);
attroff(A_STANDOUT);
} else
- mvprintw(i_line++, 0, line);
+ mvprintw(i_line++, 0, (char *) "%s", line);
clrtoeol();
}
}
--
2.34.1