From 8f5d6bebaf58f8d21f3ab9d56f74ee1b55089202 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 17 Feb 2017 13:14:31 +0900 Subject: [PATCH] Fix FTBFS with gcc7 (bug 1423312, upstream ticket 7910) --- cppcheck-1.77-gcc7.patch | 20 ++++++++++++++++++++ cppcheck.spec | 9 ++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 cppcheck-1.77-gcc7.patch diff --git a/cppcheck-1.77-gcc7.patch b/cppcheck-1.77-gcc7.patch new file mode 100644 index 0000000..f2a3d70 --- /dev/null +++ b/cppcheck-1.77-gcc7.patch @@ -0,0 +1,20 @@ +--- cppcheck-1.76.1.orig/gui/librarydialog.cpp ++++ cppcheck-1.76.1/gui/librarydialog.cpp +@@ -96,7 +96,7 @@ void LibraryDialog::openCfg() + ui->buttonSaveAs->setEnabled(true); + ui->filter->clear(); + ui->functions->clear(); +- for (struct CppcheckLibraryData::Function &function : data.functions) { ++ for (CppcheckLibraryData::Function &function : data.functions) { + ui->functions->addItem(new FunctionListItem(ui->functions, + &function, + false)); +@@ -246,7 +246,7 @@ void LibraryDialog::sortFunctions(bool s + ignoreChanges = true; + CppcheckLibraryData::Function *selfunction = currentFunction(); + ui->functions->clear(); +- for (struct CppcheckLibraryData::Function &function : data.functions) { ++ for (CppcheckLibraryData::Function &function : data.functions) { + ui->functions->addItem(new FunctionListItem(ui->functions, + &function, + selfunction == &function)); diff --git a/cppcheck.spec b/cppcheck.spec index fd8f34a..e1cb09a 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -1,6 +1,6 @@ Name: cppcheck Version: 1.77 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Tool for static C/C++ code analysis Group: Development/Languages License: GPLv3+ @@ -12,6 +12,9 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Patch0: cppcheck-1.77-tinyxml.patch # Fix location of translations Patch1: cppcheck-1.77-translations.patch +# http://trac.cppcheck.net/ticket/7910 +# Patch not committed into repository yet, pulled from the above ticket +Patch2: cppcheck-1.77-gcc7.patch BuildRequires: pcre-devel BuildRequires: tinyxml2-devel >= 2.1.0 @@ -41,6 +44,7 @@ This package contains the graphical user interface for cppcheck. %setup -q %patch0 -p1 -b .tinyxml %patch1 -p1 -b .translations +%patch2 -p1 -b .gcc7 # Make sure bundled tinyxml is not used rm -r externals/tinyxml @@ -91,6 +95,9 @@ rm -rf %{buildroot} %changelog +* Fri Feb 17 2017 Mamoru TASAKA - 1.77-3 +- Fix FTBFS with gcc7 (bug 1423312, upstream ticket 7910) + * Fri Feb 10 2017 Fedora Release Engineering - 1.77-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild