Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/cppcheck cppcheck: update to 2.1.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bd167f668103
branches:  trunk
changeset: 434982:bd167f668103
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Mon Jun 29 13:06:51 2020 +0000

description:
cppcheck: update to 2.1.

2.1

This is a minor release.

We have tweaked build scripts.

* When you use USE_Z3=yes, we will handle new versions of z3 better.
If you have an old z3 library and get compilation problems you will
need to add a z3_version.h in externals.

* The cmake scripts were updated.

There was a couple of bug fixes.

New check:

* for "expression % 1" the result is always 0.

2.0

Overview

The command line is not changed drastically. Your old cppcheck
scripts should work as before.

Compiling: There is a new dependency Z3. When compiling with the
Makefile it is highly recommended to use "USE_Z3=yes".

Improved clang-tidy integration

Several fixes to;

    improve parsing detect more bugs with existing checks fix false
    alarms

Clang import

Clang is a C/C++ compiler that has a very robust and well made
parser.

Cppcheck will always use its internal parser by default. However
there is now an option to use the Clang parser instead.

It is recommended that you use the default internal Cppcheck parser
unless you notice that it fails to parse your code properly (syntax
errors, strange false alarms).  Bug hunting

There is a new "soundy" analysis in Cppcheck that should detect
most bugs. You should expect false alarms, however the false alarms
will not be overwhelming.

This new "soundy" analysis is not intended to replace normal Cppcheck
analysis. There are use cases where false alarms can not be tolerated.

We have added 1 checker and that checks for division by zero:

    It detects all "integer division by zero" bugs in the Juliet
    test suite.

    It detects all "division by zero" bugs in the ITC test suite.

    There was 28 division by zero CVEs published in 2019 for C/C++
    open source projects, and we could quickly see that 21 of the
    bugs are found by Cppcheck. There is no CVE bug that we know
    Cppcheck fails to diagnose. But there are 7 CVEs that would
    require additional investigation to establish if it is really
    detected or not.

You can read more about this analysis in the "Bug hunting" chapter
in the manual.

diffstat:

 devel/cppcheck/Makefile |  16 ++++++++++++----
 devel/cppcheck/distinfo |  10 +++++-----
 2 files changed, 17 insertions(+), 9 deletions(-)

diffs (67 lines):

diff -r 99baf65ae1c4 -r bd167f668103 devel/cppcheck/Makefile
--- a/devel/cppcheck/Makefile   Mon Jun 29 13:05:26 2020 +0000
+++ b/devel/cppcheck/Makefile   Mon Jun 29 13:06:51 2020 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.69 2020/06/23 20:46:50 wiz Exp $
+# $NetBSD: Makefile,v 1.70 2020/06/29 13:06:51 wiz Exp $
 
-DISTNAME=      cppcheck-1.90
-PKGREVISION=   2
+DISTNAME=      cppcheck-2.1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=cppcheck/}
 EXTRACT_SUFX=  .tar.bz2
@@ -17,6 +16,7 @@
 
 USE_LANGUAGES=         c c++0x
 USE_TOOLS+=            gmake
+#USE_CMAKE=            yes
 
 BUILD_TARGET=          all man
 BUILD_MAKE_FLAGS+=     DB2MAN=${PREFIX}/share/xsl/docbook/manpages/docbook.xsl
@@ -24,16 +24,23 @@
 MAKE_FLAGS+=           FILESDIR=${PREFIX}/share/cppcheck
 # rules support (needs pcre)
 MAKE_FLAGS+=           HAVE_RULES=yes
+MAKE_FLAGS+=           USE_Z3=yes
+#CMAKE_ARGS+=          -DBUILD_TESTS=ON
+#CMAKE_ARGS+=          -DHAVE_RULES=ON
+#CMAKE_ARGS+=          -DUSE_Z3=ON
 
 .include "../../mk/compiler.mk"
+
 .if !empty(CC_VERSION:Mgcc-4.[0-5]*) || !empty(CC_VERSION:Mgcc-3.*)
-CXXFLAGS+= -include lib/cxx11emu.h
+CXXFLAGS+=             -include lib/cxx11emu.h
 .endif
 
 INSTALLATION_DIRS+=    ${PKGMANDIR}/man1
 
 REPLACE_PYTHON+=       htmlreport/cppcheck-htmlreport
 
+TEST_TARGET=           test
+
 .include "options.mk"
 
 .PHONY: man-install
@@ -43,4 +50,5 @@
 
 .include "../../lang/python/application.mk"
 .include "../../devel/pcre/buildlink3.mk"
+.include "../../math/z3/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 99baf65ae1c4 -r bd167f668103 devel/cppcheck/distinfo
--- a/devel/cppcheck/distinfo   Mon Jun 29 13:05:26 2020 +0000
+++ b/devel/cppcheck/distinfo   Mon Jun 29 13:06:51 2020 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.15 2020/04/16 21:50:35 wiz Exp $
+$NetBSD: distinfo,v 1.16 2020/06/29 13:06:51 wiz Exp $
 
-SHA1 (cppcheck-1.90.tar.bz2) = eaaf02abf5a1e1bfd2b3c0c039d2f65b4cba8ac5
-RMD160 (cppcheck-1.90.tar.bz2) = c7ee1685e2d6519bad46e091ecac691970f2e296
-SHA512 (cppcheck-1.90.tar.bz2) = 78072729590946bd03f98741872932a14266391d85ee448af730024e30668001b90d266d4dbd92f8d70db0aed341464413910f7a9fddf498a8a8d72d22ac061a
-Size (cppcheck-1.90.tar.bz2) = 2025457 bytes
+SHA1 (cppcheck-2.1.tar.bz2) = 3cf4c1bc20d25f8876fdc78cdb19586561dda470
+RMD160 (cppcheck-2.1.tar.bz2) = b35d3e49ab0b833f7a7a5e6dba796702975c8866
+SHA512 (cppcheck-2.1.tar.bz2) = ddf10ea394fc7e862fefb4380e5aa4cdece4d9b135dc959c6e37c6dbdd85c77c4e3f4eac3af1b51415543eb16d3e225694963658530241250835586983dba4ae
+Size (cppcheck-2.1.tar.bz2) = 2480943 bytes



Home | Main Index | Thread Index | Old Index