forked from pool/cppcheck
Accepting request 892004 from home:coolo:branches:openSUSE:Factory
- add fix-i586.patch to fix compilation on i586, where the test case tests the wrong IntRange OBS-URL: https://build.opensuse.org/request/show/892004 OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=77
This commit is contained in:
parent
870eab9200
commit
a89fcb6bcc
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 10 06:49:08 UTC 2021 - Stephan Kulow <coolo@suse.com>
|
||||
|
||||
- add fix-i586.patch to fix compilation on i586, where the test
|
||||
case tests the wrong IntRange
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 24 08:12:09 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -23,6 +23,7 @@ Summary: A tool for static C/C++ code analysis
|
||||
License: GPL-3.0-or-later
|
||||
URL: https://github.com/danmar/cppcheck
|
||||
Source: https://github.com/danmar/cppcheck/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Patch0: fix-i586.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: docbook-xsl-stylesheets
|
||||
BuildRequires: gcc-c++
|
||||
@ -70,7 +71,7 @@ This is the gui for Cppcheck, a program to detect bugs that your C/C++ compiler
|
||||
doesn't see.
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
|
22
fix-i586.patch
Normal file
22
fix-i586.patch
Normal file
@ -0,0 +1,22 @@
|
||||
Index: cppcheck-2.4.1/test/testexprengine.cpp
|
||||
===================================================================
|
||||
--- cppcheck-2.4.1.orig/test/testexprengine.cpp
|
||||
+++ cppcheck-2.4.1/test/testexprengine.cpp
|
||||
@@ -811,12 +811,17 @@ private:
|
||||
" *x = 2;\n"
|
||||
" *x = 1;\n"
|
||||
"}";
|
||||
+#if INTPTR_MAX == INT64_MAX
|
||||
+ // for 32bit the situation is more complex, armv7l has ffffffff,
|
||||
+ // i586 has hfffffffflffffffff - so better not test this in those
|
||||
+ // situations
|
||||
ASSERT_EQUALS("1:28: $2=ArrayValue([$1],[:]=?,null)\n"
|
||||
"1:28: $1=IntRange(1:ffffffffffffffff)\n"
|
||||
"1:28: 0:memory:{x=($2,[$1],[:]=?)}\n"
|
||||
"2:9: 0:memory:{x=($2,[$1],[:]=?,[0]=2)}\n"
|
||||
"3:9: 0:memory:{x=($2,[$1],[:]=?,[0]=1)}\n",
|
||||
trackExecution(code));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void arrayInit1() {
|
Loading…
Reference in New Issue
Block a user