SHA256
1
0
forked from pool/cppcheck

- update to 2.12.0:

* uselessOverride finds overriding functions that either
    duplicate code from or delegate back to the base class
    implementation
  * knownPointerToBool finds pointer to bool conversions that are
    always true or false
  * truncLongCastAssignment and truncLongCastReturn check
    additional types, including float/double/long double
  * duplInheritedMember also reports duplicated member functions
  * constParameter*/constVariable* checks find more instances of
    pointers/references that can be const, e.g. when calling
    library functions
  * Write how many checkers was activated after a run
  * Added --checkers-report that can be used to generate a report
    in a file that shows what checkers was activated and disabled
  * The qmake build system has been deprecated and will be
    removed in a future version.
  * Command-line option '--template
- update to 2.11:
  * pop_back on empty container is UB
  * Improve useStlAlgorithm check to handle many more conditions
    in the loop for any_of, all_of and none_of algorithms
  * ValueFlow can evaluate the return value of functions even
    when conditionals are used
  * ValueFlow will now forward the container sizes being returned
    from a function
  * ValueFlow can infer possible values from possible symbolic
    values
  * Improve valueflow after pushing to container
  * The new option --check-level= has been added that controls

OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=113
This commit is contained in:
Dirk Mueller 2023-09-15 07:59:45 +00:00 committed by Git OBS Bridge
parent b4b55e5e82
commit 4ff6c22bfc
5 changed files with 167 additions and 73 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8aae5e116daeaaf5d19f3efa61b91c06f161cb97412a1d1af6e1e20686e48967
size 3447010

3
cppcheck-2.12.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7d67776118aee9a4f0214f993a4baa4a168b2dbb10c14b6ec5baf2ca147565b8
size 3579683

View File

@ -1,3 +1,68 @@
-------------------------------------------------------------------
Thu Sep 14 11:18:59 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.12.0:
* uselessOverride finds overriding functions that either
duplicate code from or delegate back to the base class
implementation
* knownPointerToBool finds pointer to bool conversions that are
always true or false
* truncLongCastAssignment and truncLongCastReturn check
additional types, including float/double/long double
* duplInheritedMember also reports duplicated member functions
* constParameter*/constVariable* checks find more instances of
pointers/references that can be const, e.g. when calling
library functions
* Write how many checkers was activated after a run
* Added --checkers-report that can be used to generate a report
in a file that shows what checkers was activated and disabled
* The qmake build system has been deprecated and will be
removed in a future version.
* Command-line option '--template
- update to 2.11:
* pop_back on empty container is UB
* Improve useStlAlgorithm check to handle many more conditions
in the loop for any_of, all_of and none_of algorithms
* ValueFlow can evaluate the return value of functions even
when conditionals are used
* ValueFlow will now forward the container sizes being returned
from a function
* ValueFlow can infer possible values from possible symbolic
values
* Improve valueflow after pushing to container
* The new option --check-level= has been added that controls
how much checking is made by Cppcheck. The default checking
level is "normal". If you feel that you can wait longer on
results you can use --check-level=exhaustive.
* It is no longer necessary to run "--check-config" to get
detailed "missingInclude" and "missingIncludeSystem"
messages. They will always be issued in the regular analysis
if "missingInclude" is enabled.
* "missingInclude" and "missingIncludeSystem" are reported with
"-j" is > 1 and processes are used in the backend (default in
non-Windows binaries)
* "missingInclude" and "missingIncludeSystem" will now cause
the "--error-exitcode" to be applied
* "--enable=information" will no longer implicitly enable
"missingInclude" starting with 2.16. Please enable it
explicitly if you require it.
* The `constParameter` and `constVariable` checks have been
split into 3 different IDs based on if the variable is a
pointer, a reference, or local. The different IDs will allow
users to suppress different const warning based on variable
type.
* `constParameter`
* `constParameterReference`
* `constParameterPointer`
* `constVariable`
* `constVariableReference`
* `constVariablePointer`
* More command-line parameters will now check if the given
integer argument is actually valid. Several other internal
string-to-integer conversions will now be error checked.
* scanning projects (with -j1) will now defer the analysis of
markup files until the whole code was processed
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 30 10:57:47 UTC 2023 - Manfred Schwarb <manfred99@gmx.ch> Tue May 30 10:57:47 UTC 2023 - Manfred Schwarb <manfred99@gmx.ch>

View File

@ -17,21 +17,18 @@
Name: cppcheck Name: cppcheck
Version: 2.10.3 Version: 2.12.0
Release: 0 Release: 0
Summary: A tool for static C/C++ code analysis Summary: A tool for static C/C++ code analysis
License: GPL-3.0-or-later License: GPL-3.0-or-later
URL: https://github.com/danmar/cppcheck URL: https://github.com/danmar/cppcheck
Source: https://github.com/danmar/cppcheck/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source: https://github.com/danmar/cppcheck/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: disable-some-tests-about-char-signedness.patch Patch0: disable-some-tests-about-char-signedness.patch
Patch1: werror-return-type.patch
BuildRequires: cmake BuildRequires: cmake
BuildRequires: docbook-xsl-stylesheets BuildRequires: docbook-xsl-stylesheets
BuildRequires: fdupes BuildRequires: fdupes
%if 0%{?suse_version} > 1500
BuildRequires: gcc12-c++
%else
BuildRequires: gcc-c++ BuildRequires: gcc-c++
%endif
BuildRequires: libqt5-linguist-devel BuildRequires: libqt5-linguist-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: python3-base BuildRequires: python3-base
@ -82,11 +79,8 @@ doesn't see.
%autosetup -p1 %autosetup -p1
%build %build
%if 0%{?suse_version} > 1500
export CXX=/usr/bin/g++-12
%endif
%cmake \ %cmake \
-DCMAKE_CXX_FLAGS="-DNDEBUG %{optflags}" \ -DCMAKE_CXX_FLAGS="%{optflags} -UNDEBUG" \
-DFILESDIR="%{_datadir}/%{name}" \ -DFILESDIR="%{_datadir}/%{name}" \
-DBUILD_GUI=ON \ -DBUILD_GUI=ON \
-DBUILD_TESTS=ON \ -DBUILD_TESTS=ON \

35
werror-return-type.patch Normal file
View File

@ -0,0 +1,35 @@
Index: cppcheck-2.12.0/lib/keywords.cpp
===================================================================
--- cppcheck-2.12.0.orig/lib/keywords.cpp
+++ cppcheck-2.12.0/lib/keywords.cpp
@@ -165,6 +166,7 @@ const std::unordered_set<std::string>& K
return c23_keywords_all;*/
}
assert(false && "unreachable");
+ __builtin_unreachable();
}
// cppcheck-suppress unusedFunction
@@ -185,6 +187,7 @@ const std::unordered_set<std::string>& K
return cpp23_keywords_all;
}
assert(false && "unreachable");
+ __builtin_unreachable();
}
// cppcheck-suppress unusedFunction
@@ -202,6 +205,7 @@ const std::unordered_set<std::string>& K
return c23_keywords_all;*/
}
assert(false && "unreachable");
+ __builtin_unreachable();
}
// cppcheck-suppress unusedFunction
@@ -223,5 +227,6 @@ const std::unordered_set<std::string>& K
return cpp23_keywords;
}
assert(false && "unreachable");
+ __builtin_unreachable();
}