!21 修复编译失败问题

From: @caodongxia 
Reviewed-by: @zhuchunyi 
Signed-off-by: @zhuchunyi
This commit is contained in:
openeuler-ci-bot 2022-04-25 12:04:02 +00:00 committed by Gitee
commit 20fe3c140a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,29 @@
From 52f16d2654a891e72ceb34d34870ec543a62ca68 Mon Sep 17 00:00:00 2001
From: Qiang Wei <qiang.wei@suse.com>
Date: Tue, 8 Mar 2022 10:43:26 +0800
Subject: [PATCH] Add format literal string to resolve g++ issue for
format-security.
In ncruses 6.3 version, if there is no format string in function
printw, g++ complaints it with option -Werr=format-security on.
Signed-off-by: Qiang Wei <qiang.wei@suse.com>
---
src/tools/hunspell.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tools/hunspell.cxx b/src/tools/hunspell.cxx
index 690e34a..b165634 100644
--- a/src/tools/hunspell.cxx
+++ b/src/tools/hunspell.cxx
@@ -581,7 +581,7 @@ const char* basename(const char* s, char c) {
#ifdef HAVE_CURSES_H
char* scanline(char* message) {
char input[INPUTLEN];
- printw(message);
+ printw("%s", message);
echo();
getnstr(input, INPUTLEN);
noecho();
--
2.26.2

View File

@ -1,14 +1,15 @@
Name: hunspell Name: hunspell
Summary: A spell checker and morphological analyzer library Summary: A spell checker and morphological analyzer library
Version: 1.7.0 Version: 1.7.0
Release: 8 Release: 9
URL: https://github.com/hunspell/hunspell URL: https://github.com/hunspell/hunspell
Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz Source: https://github.com/hunspell/hunspell/archive/v%{version}.tar.gz
Patch1: backport-CVE-2019-16707.patch Patch1: backport-CVE-2019-16707.patch
Patch2: 0001-Add-format-literal-string-to-resolve-g-issue-for-for.patch
License: LGPLv2+ or GPLv2+ or MPLv1.1 License: LGPLv2+ or GPLv2+ or MPLv1.1
BuildRequires: gcc-c++ autoconf automake libtool ncurses-devel gettext BuildRequires: gcc-c++ autoconf automake libtool ncurses-devel gettext-devel
BuildRequires: perl-generators words hunspell hunspell-devel BuildRequires: perl-generators words hunspell hunspell-devel
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
BuildRequires: valgrind BuildRequires: valgrind
@ -86,6 +87,9 @@ cp -a %{_libdir}/libhunspell-1.6.so* %{buildroot}%{_libdir}
%lang(hu) %{_mandir}/hu/man1/hunspell.1.gz %lang(hu) %{_mandir}/hu/man1/hunspell.1.gz
%changelog %changelog
* Mon Apr 25 2022 caodongxia<caodongxia@h-partners.com> -1.7.0-9
- Add format literal string to resolve g++ issue for format-security.
* Wed Jul 21 2021 yushaogui <yushaogui@huawei.com> - 1.7.0-8 * Wed Jul 21 2021 yushaogui <yushaogui@huawei.com> - 1.7.0-8
- delete a buildrequires for gdb - delete a buildrequires for gdb