Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d512bf3
releasenotes: start new notes for 2.16 [ci skip] (#6751)
danmar Aug 31, 2024
7f7de27
manual-premium.md: merge changes in manual.md into the premium manual…
danmar Aug 31, 2024
9ebed11
Fix #13061 (Add cfg file for protobuf) [ci skip] (#6753)
danmar Aug 31, 2024
cd67030
AUTHORS: cconverse711 [ci skip] (#6755)
danmar Aug 31, 2024
698e981
donate-cpu-server.py: Update OLD_VERSION to 2.15.0 [ci skip] (#6757)
danmar Aug 31, 2024
56ff2cc
createrelease: updates after 2.15.0 release (#6758)
danmar Aug 31, 2024
94e9a72
Fix #13057 FP: Returning pointer to local variable (#6739)
chrchr-github Sep 1, 2024
5e1db12
ValueFlow: some small cleanups (#6737)
firewave Sep 2, 2024
01f9aa3
more `const_iterator` usage (#6761)
firewave Sep 2, 2024
508eb98
bumped version to 2.15.99/2.16 (#6760)
firewave Sep 2, 2024
bed7912
removed duplicated `ErrorPath*` aliases (#6763)
firewave Sep 2, 2024
a7dcc70
CI: Update Cppcheck Premium used for selfchecking to 24.9.0.1 (#6762)
danmar Sep 2, 2024
b8f80a9
Fix #13064 FP derefInvalidIteratorRedundantCheck for initializer_list…
chrchr-github Sep 3, 2024
b8b0280
utilize `returns_nonnull` function attribute (#6759)
firewave Sep 3, 2024
e3a5d41
Fix #13069 FN constVariable for multidimensional array (#6771)
chrchr-github Sep 4, 2024
1527922
Fix #13072 FN constVariablePointer for nested array access (regressio…
chrchr-github Sep 5, 2024
400f870
Fix #13074 (GUI: The guideline/classification is not always set corre…
danmar Sep 5, 2024
c2f4c5c
CI: Run all github actions on commits in release branches (#6777)
danmar Sep 7, 2024
fc2f551
Fix #13067 FP incorrectStringBooleanError for macro argument (#6770)
chrchr-github Sep 7, 2024
27340e7
Update Japanese Translation
fu7mu4 Sep 7, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/CI-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/CI-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/CI-unixish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/CI-unixish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/CI-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/buildman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/cppcheck-premium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand All @@ -21,18 +22,19 @@ permissions:
jobs:

build:
runs-on: ubuntu-22.04 # run on the latest image only
runs-on: ubuntu-24.04 # run on the latest image only
steps:
- uses: actions/checkout@v4

- name: Download cppcheckpremium
run: |
premium_version=${{ inputs.premium_version }}
if [ -z $premium_version ]; then
premium_version=devdrop-20240815
wget https://files.cppchecksolutions.com/devdrop/cppcheckpremium-$premium_version-amd64.tar.gz -O cppcheckpremium.tar.gz
premium_version=24.9.0.1
#wget https://files.cppchecksolutions.com/devdrop/cppcheckpremium-$premium_version-amd64.tar.gz -O cppcheckpremium.tar.gz
wget https://files.cppchecksolutions.com/$premium_version/ubuntu-24.04/cppcheckpremium-$premium_version-amd64.tar.gz -O cppcheckpremium.tar.gz
else
wget https://files.cppchecksolutions.com/$premium_version/ubuntu-22.04/cppcheckpremium-$premium_version-amd64.tar.gz -O cppcheckpremium.tar.gz
wget https://files.cppchecksolutions.com/$premium_version/ubuntu-24.04/cppcheckpremium-$premium_version-amd64.tar.gz -O cppcheckpremium.tar.gz
fi
tar xvzf cppcheckpremium.tar.gz
mv cppcheckpremium-$premium_version cppcheckpremium
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/scriptcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/selfcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ubsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches:
- 'main'
- 'releases/**'
- '2.*'
tags:
- '2.*'
pull_request:
Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Carl Morgan
Carlo Marcelo Arenas Belón
Carlos Gomes Martinho
Carl-Oskar Larsson
Cary Converse
Cary R
Changkyoon Kim
Chris Lalancette
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.5)
if(MSVC)
cmake_minimum_required(VERSION 3.13)
endif()
project(Cppcheck VERSION 2.14.99 LANGUAGES CXX)
project(Cppcheck VERSION 2.15.99 LANGUAGES CXX)

include(cmake/cxx11.cmake)
use_cxx11()
Expand Down
9 changes: 9 additions & 0 deletions cfg/protobuf.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<def format="2">
<define name="PROTOBUF_VERSION" value="9999999"/>
<define name="PROTOBUF_MIN_PROTOC_VERSION" value="0"/>
<define name="PROTOBUF_NAMESPACE_OPEN" value=""/>
<define name="PROTOBUF_NAMESPACE_CLOSE" value=""/>
<define name="PROTOBUF_SECTION_VARIABLE(SECTION)" value=""/>
<define name="GOOGLE_PROTOBUF_RUNTIME_DEPRECATED(MSG)" value=""/>
</def>
4 changes: 2 additions & 2 deletions cli/cmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ bool CmdLineParser::fillSettingsFromArgs(int argc, const char* const argv[])

// Check that all include paths exist
{
for (std::list<std::string>::iterator iter = mSettings.includePaths.begin();
iter != mSettings.includePaths.end();
for (std::list<std::string>::const_iterator iter = mSettings.includePaths.cbegin();
iter != mSettings.includePaths.cend();
) {
const std::string path(Path::toNativeSeparators(*iter));
if (Path::isDirectory(path))
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.14.99
* @version 2.15.99
*
* @section overview_sec Overview
* Cppcheck is a simple tool for static analysis of C/C++ code.
Expand Down
14 changes: 7 additions & 7 deletions cli/processexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,18 @@ unsigned int ProcessExecutor::check()
const int r = select(*std::max_element(rpipes.cbegin(), rpipes.cend()) + 1, &rfds, nullptr, nullptr, &tv);

if (r > 0) {
std::list<int>::iterator rp = rpipes.begin();
while (rp != rpipes.end()) {
std::list<int>::const_iterator rp = rpipes.cbegin();
while (rp != rpipes.cend()) {
if (FD_ISSET(*rp, &rfds)) {
std::string name;
const std::map<int, std::string>::iterator p = pipeFile.find(*rp);
if (p != pipeFile.end()) {
const std::map<int, std::string>::const_iterator p = pipeFile.find(*rp);
if (p != pipeFile.cend()) {
name = p->second;
}
const bool readRes = handleRead(*rp, result, name);
if (!readRes) {
std::size_t size = 0;
if (p != pipeFile.end()) {
if (p != pipeFile.cend()) {
pipeFile.erase(p);
const auto fs = std::find_if(mFiles.cbegin(), mFiles.cend(), [&name](const FileWithDetails& entry) {
return entry.path() == name;
Expand Down Expand Up @@ -358,8 +358,8 @@ unsigned int ProcessExecutor::check()
const pid_t child = waitpid(0, &stat, WNOHANG);
if (child > 0) {
std::string childname;
const std::map<pid_t, std::string>::iterator c = childFile.find(child);
if (c != childFile.end()) {
const std::map<pid_t, std::string>::const_iterator c = childFile.find(child);
if (c != childFile.cend()) {
childname = c->second;
childFile.erase(c);
}
Expand Down
12 changes: 7 additions & 5 deletions createrelease
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# Create release candidate
# ========================
#
# update cppcheck used in premium addon CI
#
# check every isPremiumEnabled call:
# - every id should be in --errorlist
# git grep 'isPremiumEnabled[(]"' | sed 's/.*isPremiumEnabled[(]"//' | sed 's/".*//' | sort | uniq > ids1.txt
Expand All @@ -20,7 +22,7 @@
#
# self check, fix critical issues:
# make clean && make CXXFLAGS=-O2 MATCHCOMPILER=yes -j4
# ./cppcheck -D__CPPCHECK__ -D__GNUC__ -DCHECK_INTERNAL -DHAVE_RULES --std=c++11 --library=cppcheck-lib --library=qt --enable=style --inconclusive --inline-suppr --suppress=bitwiseOnBoolean --suppress=shadowFunction --suppress=useStlAlgorithm --suppress=*:externals/picojson.h --suppress=functionConst --suppress=functionStatic --xml cli gui/*.cpp lib 2> selfcheck.xml
# ./cppcheck -D__CPPCHECK__ -D__GNUC__ -DCHECK_INTERNAL -DHAVE_RULES --std=c++11 --library=cppcheck-lib --library=qt --enable=style --inconclusive --inline-suppr --suppress=bitwiseOnBoolean --suppress=shadowFunction --suppress=useStlAlgorithm --suppress=*:externals/picojson.h --suppress=functionConst --suppress=functionStatic --suppress=normalCheckLevelMaxBranches --xml cli gui/*.cpp lib 2> selfcheck.xml
#
# Generate lib/checkers.cpp (TODO the premium checkers should not be statically coded)
# cd ~/cppchecksolutions/cppcheck && python3 tools/get_checkers.py > lib/checkers.cpp
Expand All @@ -47,7 +49,7 @@
#
# Update version numbers in:
# sed -i -r "s/version 2[.][0-9]+([.]99)*/version 2.13.0/" cli/main.cpp
# sed -i -r "s|2[.][0-9]+([.]99)*|2.13.0|" cmake/versions.cmake # version must have 3 parts.
# sed -i -r "s|VERSION 2[.][0-9]+[.]99|VERSION 2.13.0|" CMakeLists.txt # version must have 3 parts.
# sed -i -r "s/CPPCHECK_MINOR_VERSION [0-9]+/CPPCHECK_MINOR_VERSION 13/" lib/version.h
# sed -i -r "s/2[.][0-9]+([.]99)*( dev)*/2.13.0/" win_installer/productInfo.wxi
# sed -i -r "s/subtitle: Version 2\.[0-9]+.*/subtitle: Version 2.13/" man/*.md
Expand Down Expand Up @@ -87,8 +89,7 @@
# Update download link on index.php main page
#
# Write Changelog
# git log 2.11..2.12 > Changelog
# <edit>
# git log 2.11.0..2.12.0 > Changelog
#
# Trac:
# 1. Create ticket "2.12 safety cosmetic changes"
Expand All @@ -110,9 +111,10 @@
#
# Backup:
# * trac: cd /var && nice tar -cJf trac.tar.xz trac-cppcheck
# * daca: cd /var && nice tar -cJf daca.tar.xz daca@home
# * git: git checkout -f && git checkout main && git pull && tar -cJf git.tar.xz .git
# * Changelog
# * ci status: screenshot(s) showing that all tests pass for tagged commit
# * mkdir out && python3 ~/cppchecksolutions/getWorkflowAndIssueLogs.py -r danmar/cppcheck -t 2.15.0 -p out

# Folder/tag to use
folder=$1
Expand Down
Loading