Merge branch 'master' into epel7
This commit is contained in:
commit
5c6981ac5a
38
cppcheck-1.74-test.patch
Normal file
38
cppcheck-1.74-test.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
Index: lib/checkcondition.cpp
|
||||||
|
===================================================================
|
||||||
|
--- lib/checkcondition.cpp (revision a5cfa2b12c034e59b5805ac51b53e893c8bc2d1b)
|
||||||
|
+++ lib/checkcondition.cpp (revision 9bda97975aeec2c18198946e72524f13b4308d8e)
|
||||||
|
@@ -569,14 +569,6 @@
|
||||||
|
// 5 => return value that is larger than both value1 and value2
|
||||||
|
switch (test) {
|
||||||
|
- case 1: {
|
||||||
|
- const T ret = std::min(value1, value2);
|
||||||
|
- if ((ret - (T)1) < ret)
|
||||||
|
- return ret - (T)1;
|
||||||
|
- else if ((ret / (T)2) < ret)
|
||||||
|
- return ret / (T)2;
|
||||||
|
- else if ((ret * (T)2) < ret)
|
||||||
|
- return ret * (T)2;
|
||||||
|
- return ret;
|
||||||
|
- }
|
||||||
|
+ case 1:
|
||||||
|
+ return std::numeric_limits<T>::lowest();
|
||||||
|
case 2:
|
||||||
|
return value1;
|
||||||
|
@@ -585,14 +577,6 @@
|
||||||
|
case 4:
|
||||||
|
return value2;
|
||||||
|
- case 5: {
|
||||||
|
- const T ret = std::max(value1, value2);
|
||||||
|
- if ((ret + (T)1) > ret)
|
||||||
|
- return ret + (T)1;
|
||||||
|
- else if ((ret / (T)2) > ret)
|
||||||
|
- return ret / (T)2;
|
||||||
|
- else if ((ret * (T)2) > ret)
|
||||||
|
- return ret * (T)2;
|
||||||
|
- return ret;
|
||||||
|
- }
|
||||||
|
+ case 5:
|
||||||
|
+ return std::numeric_limits<T>::max();
|
||||||
|
};
|
||||||
|
return 0;
|
@ -1,6 +1,6 @@
|
|||||||
Name: cppcheck
|
Name: cppcheck
|
||||||
Version: 1.74
|
Version: 1.74
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Tool for static C/C++ code analysis
|
Summary: Tool for static C/C++ code analysis
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
@ -13,6 +13,8 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|||||||
Patch0: cppcheck-1.73-tinyxml.patch
|
Patch0: cppcheck-1.73-tinyxml.patch
|
||||||
# Fix location of translations
|
# Fix location of translations
|
||||||
Patch1: cppcheck-1.73-translations.patch
|
Patch1: cppcheck-1.73-translations.patch
|
||||||
|
# Fix tests on x86
|
||||||
|
Patch2: cppcheck-1.74-test.patch
|
||||||
|
|
||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: tinyxml2-devel >= 2.1.0
|
BuildRequires: tinyxml2-devel >= 2.1.0
|
||||||
@ -42,6 +44,7 @@ This package contains the graphical user interface for cppcheck.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .tinyxml
|
%patch0 -p1 -b .tinyxml
|
||||||
%patch1 -p1 -b .translations
|
%patch1 -p1 -b .translations
|
||||||
|
%patch2 -p0 -b .test
|
||||||
# Make sure bundled tinyxml is not used
|
# Make sure bundled tinyxml is not used
|
||||||
rm -r externals/tinyxml
|
rm -r externals/tinyxml
|
||||||
|
|
||||||
@ -72,10 +75,7 @@ install -D -p -m 644 gui/icon.png %{buildroot}%{_datadir}/pixmaps/cppcheck.png
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
cd objdir-%{_target_platform}/bin
|
cd objdir-%{_target_platform}/bin
|
||||||
# A test currently fails on 32-bit archs, see http://trac.cppcheck.net/ticket/7037
|
|
||||||
%if 0%{?__isa_bits} == 64
|
|
||||||
./testrunner -g -q
|
./testrunner -g -q
|
||||||
%endif
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -93,6 +93,9 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 02 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.74-2
|
||||||
|
- Re-enable tests on x86.
|
||||||
|
|
||||||
* Mon Aug 01 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.74-1
|
* Mon Aug 01 2016 Susi Lehtola <jussilehtola@fedoraproject.org> - 1.74-1
|
||||||
- Update to 1.74.
|
- Update to 1.74.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user