Skip to content
Merged

Release #6315

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ ifeq (clang++, $(findstring clang++,$(CXX)))
CPPCHK_GLIBCXX_DEBUG=
endif
ifndef CXXFLAGS
CXXFLAGS=-pedantic -Wall -Wextra -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-shadow -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar -Woverloaded-virtual $(CPPCHK_GLIBCXX_DEBUG) -g
CXXFLAGS=-std=c++0x -O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-multichar
endif

ifeq (g++, $(findstring g++,$(CXX)))
Expand Down Expand Up @@ -366,7 +366,7 @@ dmake: tools/dmake/dmake.o cli/filelister.o $(libcppdir)/pathmatch.o $(libcppdir
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)

run-dmake: dmake
./dmake
./dmake --release

clean:
rm -f build/*.cpp build/*.o lib/*.o cli/*.o test/*.o tools/*.o externals/*/*.o testrunner dmake cppcheck cppcheck.exe cppcheck.1
Expand Down
2 changes: 1 addition & 1 deletion cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
*
* @mainpage Cppcheck
* @version 2.13.99
* @version 2.14.0
*
* @section overview_sec Overview
* Cppcheck is a simple tool for static analysis of C/C++ code.
Expand Down
7 changes: 7 additions & 0 deletions lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5379,7 +5379,14 @@ static const Scope* getLoopScope(const Token* tok)
static void valueFlowConditionExpressions(const TokenList &tokenlist, const SymbolDatabase& symboldatabase, ErrorLogger &errorLogger, const Settings &settings)
{
if (!settings.daca && (settings.checkLevel == Settings::CheckLevel::normal))
{
if (settings.debugwarnings) {
ErrorMessage::FileLocation loc(tokenlist.getSourceFilePath(), 0, 0);
const ErrorMessage errmsg({std::move(loc)}, tokenlist.getSourceFilePath(), Severity::debug, "Analysis of condition expressions is disabled. Use --check-level=exhaustive to enable it.", "normalCheckLevelConditionExpressions", Certainty::normal);
errorLogger.reportErr(errmsg);
}
return;
}

for (const Scope * scope : symboldatabase.functionScopes) {
if (const Token* incompleteTok = findIncompleteVar(scope->bodyStart, scope->bodyEnd)) {
Expand Down
4 changes: 2 additions & 2 deletions lib/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#define versionH

#define CPPCHECK_MAJOR_VERSION 2
#define CPPCHECK_MINOR_VERSION 13
#define CPPCHECK_MINOR_VERSION 14
#define CPPCHECK_DEVMINOR_VERSION 14
#define CPPCHECK_BUGFIX_VERSION 99
#define CPPCHECK_BUGFIX_VERSION 0

#define STRINGIFY(x) STRING(x)
#define STRING(VER) #VER
Expand Down
2 changes: 1 addition & 1 deletion man/manual.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Cppcheck manual
subtitle: Version 2.13.99
subtitle: Version 2.14
author: Cppcheck team
lang: en
documentclass: report
Expand Down
2 changes: 1 addition & 1 deletion man/reference-cfg-format.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Cppcheck .cfg format
subtitle: Version 2.13.99
subtitle: Version 2.14
author: Cppcheck team
lang: en
documentclass: report
Expand Down
2 changes: 1 addition & 1 deletion man/writing-addons.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Writing addons
subtitle: Version 2.13.99
subtitle: Version 2.14
author: Cppcheck team
lang: en
documentclass: report
Expand Down
33 changes: 18 additions & 15 deletions releasenotes.txt
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
Release Notes for Cppcheck 2.14

New checks:
eraseIteratorOutOfBounds: warns when erase() is called on an iterator that is out of bounds
returnByReference: warns when a large class member is returned by value from a getter function
Summary:
- Fixed 23 "crash" tickets
- Fixed 69 "false positive" tickets
- Fixed 36 "improve check" tickets

Improved checking:
initializerList: warn if a member is used before it is initialized
New checks:
- eraseIteratorOutOfBounds: warns when erase() is called on an iterator that is out of bounds
- returnByReference: warns when a large class member is returned by value from a getter function

GUI:
-
-Make it possible to suppress warnings in all files in a folder

Changed interface:
-

Deprecations:
-
- Fixed crash with '--rule-file=' if some data was missing.
- '--rule-file' will now bail out if a rule could not be added or a file contains unexpected data.
- Add option '--check-version', you can use it to pin the cppcheck version in a script.
- Added '--template=simple'. It is expands to '{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]' without any additional location details.
- Removed deprecated platform type 'Unspecified'. Please use 'unspecified' instead.
- Add --file-filter=- option that reads file filters from stdin. Added for a plugin.

Other:
- Added CMake option 'EXTERNALS_AS_SYSTEM' to treat external includes as 'SYSTEM' ones.
- The minimum required compiler versions have been bumped to GCC 5.1 / Clang 3.5 / Visual Studio 2015
- The minimum required CMake version has been bumped to 3.5
- Using Visual Studio with CMake now checks if the CMake version is at least 3.13. This was always required but was not checked explicitly.
- Added '--template=simple'. It is expands to '{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]' without any additional location details.
- Removed deprecated platform type 'Unspecified'. Please use 'unspecified' instead.
- Removed deprecated 'Makefile' option 'SRCDIR'.
- Added CMake option 'DISALLOW_THREAD_EXECUTOR' to control the inclusion of the executor which performs the analysis within a thread of the main process.
- Removed CMake option 'USE_THREADS' in favor of 'DISALLOW_THREAD_EXECUTOR'.
- Fixed crash with '--rule-file=' if some data was missing.
- '--rule-file' will now bail out if a rule could not be added or a file contains unexpected data.
- Add option '--check-version', you can use it to pin the cppcheck version in a script.
- misra-config will not be treated as a critical error anymore

Safety critical:
- #12440 : Misra violations found but cppcheck exited with 0 even after specifying exit code
4 changes: 2 additions & 2 deletions tools/donate_cpu_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
# changes)
CLIENT_VERSION = "1.3.56"
CLIENT_VERSION = "1.3.57"

# Timeout for analysis with Cppcheck in seconds
CPPCHECK_TIMEOUT = 30 * 60
Expand Down Expand Up @@ -450,7 +450,7 @@ def scan_package(cppcheck_path, source_path, libraries, capture_callstack=True,
options += ' --check-level=' + check_level
if debug_warnings:
options += ' --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout' \
' --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning'
' --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions'
options += ' -D__GNUC__ --platform=unix64'
options_rp = options + ' -rp={}'.format(dir_to_scan)
if __make_cmd == 'msbuild.exe':
Expand Down
4 changes: 2 additions & 2 deletions win_installer/productInfo.wxi
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Include>
<?define ProductName = "Cppcheck $(var.Platform) 2.14 dev" ?>
<?define ProductName = "Cppcheck $(var.Platform) 2.14.0" ?>
<?define ProductNameShort = "Cppcheck" ?>
<?define ProductVersion = "2.13.99" ?>
<?define ProductVersion = "2.14.0" ?>

<?define ProductManufacturer = "The Cppcheck team" ?>
<?define ProductDescription = "Cppcheck is a tool for static analysis of C/C++ code" ?>
Expand Down