!10 [sync] PR-8: Fix compiler error for option -Werror=format-security

From: @openeuler-sync-bot 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
This commit is contained in:
openeuler-ci-bot 2022-04-02 02:43:34 +00:00 committed by Gitee
commit f17e96f744
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,39 @@
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

View File

@ -1,12 +1,13 @@
Name: libcdio
Version: 2.1.0
Release: 3
Release: 4
Summary: CD-ROM input and control library
License: GPLv3+
URL: http://www.gnu.org/software/libcdio/
Source0: https://ftp.gnu.org/gnu/libcdio/libcdio-%{version}.tar.bz2
Source1: https://ftp.gnu.org/gnu/libcdio/libcdio-%{version}.tar.bz2.sig
Source2: libcdio_x86_64_config.h
Patch9000: 0001-fix-Werror-format-security.patch
BuildRequires: gcc gcc-c++ pkgconfig doxygen ncurses-devel help2man chrpath gettext-devel libcdio
Requires(post): /sbin/ldconfig
@ -98,6 +99,9 @@ fi
%{_infodir}/*
%changelog
* Fri Mar 11 2022 JunYang <jun.yang@suse.com> - 2.1.0-4
- Fix compiler error for option -Werror=format-security
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 2.1.0-3
- DESC: delete -S git from %autosetup, and delete BuildRequires git