!7 Fix build error caused by gcc update to 12.3.1

From: @starlet-dx 
Reviewed-by: @wk333 
Signed-off-by: @wk333
This commit is contained in:
openeuler-ci-bot 2023-07-17 11:16:15 +00:00 committed by Gitee
commit 283dcfac52
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 51c0b300b0b1a0194628c4b84bb35885b21663ab Mon Sep 17 00:00:00 2001
From: Jeff Law <law@redhat.com>
Date: Tue, 23 Mar 2021 20:35:37 -0400
Subject: [PATCH] Use reference to avoid range-loop-construct diagnostic
Pulled from scap-workbench-1.2.1-7 in Fedora Rawhide.
Signed-off-by: Alexander Scheel <alex.scheel@canonical.com>
---
src/MainWindow.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 496e1724..bea7e754 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -409,7 +409,7 @@ void MainWindow::openFile(const QString& path, bool reload)
// Refill mFSWatch after opening file
mFSWatch->removePaths(mFSWatch->files());
- for (const QString path : mScanningSession->getOriginalClosure())
+ for (const QString &path : mScanningSession->getOriginalClosure())
{
mFSWatch->addPath(path);
}

View File

@ -1,6 +1,6 @@
Name: scap-workbench Name: scap-workbench
Version: 1.2.1 Version: 1.2.1
Release: 1 Release: 2
Summary: Scanning, tailoring, editing and validation tool for SCAP content Summary: Scanning, tailoring, editing and validation tool for SCAP content
License: GPLv3+ License: GPLv3+
URL: http://www.open-scap.org/tools/scap-workbench URL: http://www.open-scap.org/tools/scap-workbench
@ -8,6 +8,8 @@ Source0: https://github.com/OpenSCAP/scap-workbench/releases/download/%{v
Patch1: Use-QT-provided-macro-function-to-version-check-depr.patch Patch1: Use-QT-provided-macro-function-to-version-check-depr.patch
Patch2: Replace-obsolete-QString-SkipEmptyParts.patch Patch2: Replace-obsolete-QString-SkipEmptyParts.patch
Patch3: Do-not-set-rpath.patch Patch3: Do-not-set-rpath.patch
# https://github.com/OpenSCAP/scap-workbench/commit/51c0b300b0b1a0194628c4b84bb35885b21663ab
Patch4: Use-reference-to-avoid-range-loop-construct-diagnostic.patch
BuildRequires: cmake >= 2.6 qt5-devel >= 5.0.0 openscap-devel >= 1.2.11 qt5-qtbase-devel >= 5.0.0 qt5-qtxmlpatterns-devel >= 5.0.0 BuildRequires: cmake >= 2.6 qt5-devel >= 5.0.0 openscap-devel >= 1.2.11 qt5-qtbase-devel >= 5.0.0 qt5-qtxmlpatterns-devel >= 5.0.0
BuildRequires: openscap-utils >= 1.2.11 openssh-clients util-linux asciidoc BuildRequires: openscap-utils >= 1.2.11 openssh-clients util-linux asciidoc
@ -50,6 +52,9 @@ to access SCAP functionalities.
%{_mandir}/man8/scap-workbench.8.gz %{_mandir}/man8/scap-workbench.8.gz
%changelog %changelog
* Mon Jul 17 2023 yaoxin <yao_xin001@hoperun.com> - 1.2.1-2
- Fix build error caused by gcc update to 12.3.1
* Wed Feb 16 2022 chenchen <chen_aka_jan@163.com> - 1.2.1-1 * Wed Feb 16 2022 chenchen <chen_aka_jan@163.com> - 1.2.1-1
- Update to 1.2.1 - Update to 1.2.1