diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000000..b83436861bd --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,94 @@ +--- +Checks: > + *, + -abseil-*, + -altera-*, + -android-*, + -boost-*, + -cert-*, + -cppcoreguidelines-*, + -darwin-*, + -fuchsia-*, + -google-*, + -hicpp-*, + -linuxkernel-*, + -llvm-*, + -llvmlibc-*, + -mpi-*, + -objc-*, + -openmp-*, + -zircon-*, + cppcoreguidelines-pro-type-static-cast-downcast, + cppcoreguidelines-rvalue-reference-param-not-moved, + google-explicit-constructor, + -bugprone-assignment-in-if-condition, + -bugprone-branch-clone, + -bugprone-command-processor, + -bugprone-easily-swappable-parameters, + -bugprone-empty-catch, + -bugprone-macro-parentheses, + -bugprone-narrowing-conversions, + -bugprone-signed-char-misuse, + -bugprone-switch-missing-default-case, + -bugprone-throwing-static-initialization, + -bugprone-unchecked-optional-access, + -clang-analyzer-*, + -concurrency-mt-unsafe, + -misc-const-correctness, + -misc-no-recursion, + -misc-non-private-member-variables-in-classes, + -misc-throw-by-value-catch-by-reference, + -misc-use-anonymous-namespace, + -modernize-avoid-c-arrays, + -modernize-deprecated-ios-base-aliases, + -misc-include-cleaner, + -misc-multiple-inheritance, + -misc-unused-using-decls, + -modernize-avoid-c-style-cast, + -modernize-loop-convert, + -modernize-macro-to-enum, + -modernize-raw-string-literal, + -modernize-replace-auto-ptr, + -modernize-return-braced-init-list, + -modernize-type-traits, + -modernize-use-designated-initializers, + -modernize-use-nodiscard, + -modernize-use-scoped-lock, + -modernize-use-trailing-return-type, + -performance-avoid-endl, + -performance-inefficient-string-concatenation, + -performance-no-automatic-move, + -portability-avoid-pragma-once, + -portability-simd-intrinsics, + -portability-std-allocator-const, + -readability-avoid-nested-conditional-operator, + -readability-braces-around-statements, + -readability-container-data-pointer, + -readability-enum-initial-value, + -readability-function-cognitive-complexity, + -readability-function-size, + -readability-identifier-length, + -readability-identifier-naming, + -readability-implicit-bool-conversion, + -readability-inconsistent-ifelse-braces, + -readability-isolate-declaration, + -readability-magic-numbers, + -readability-redundant-parentheses, + -readability-suspicious-call-argument, + -readability-uppercase-literal-suffix, + -readability-use-concise-preprocessor-directives, + -misc-unconventional-assign-operator +WarningsAsErrors: '*' +HeaderFilterRegex: '(cli|gui|frontend|lib|oss-fuzz|test|triage)\/[a-z_]+\.h' +ExcludeHeaderFilterRegex: 'ui_.*.h' +CheckOptions: + - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic + value: '1' + - key: readability-simplify-boolean-expr.SimplifyDeMorgan + value: '0' + - key: modernize-use-trailing-return-type.TransformFunctions + value: false + - key: misc-override-with-different-visibility.DisallowedVisibilityChange + value: widening + - key: misc-use-internal-linkage.AnalyzeTypes + value: false diff --git a/.codacy.yml b/.codacy.yml new file mode 100644 index 00000000000..dcfec8e5c10 --- /dev/null +++ b/.codacy.yml @@ -0,0 +1,8 @@ +exclude_paths: + - addons/test/** + - addons/y2038/test/*.c + - htmlreport/example.cc + - samples/**/bad.c + - samples/**/bad.cpp + - test/cfg/*.c + - test/cfg/*.cpp diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..ed782473718 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,19 @@ +## standard default enconding +* text=auto + +## UNIX specific files +*.sh text eol=lf + +## Windows specific files +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf +*.vcxproj text eol=crlf +*.vcxproj.filters text eol=crlf +*.sln text eol=crlf +*.wixproj text eol=crlf +*.wxi text eol=crlf +*.wxs text eol=crlf + +## Binary resources +*.pdf binary \ No newline at end of file diff --git a/.github/workflows/CI-cygwin.yml b/.github/workflows/CI-cygwin.yml new file mode 100644 index 00000000000..bf67967c5f8 --- /dev/null +++ b/.github/workflows/CI-cygwin.yml @@ -0,0 +1,62 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: CI-cygwin + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +defaults: + run: + shell: cmd + +jobs: + # TODO: add CMake build + build_cygwin: + strategy: + matrix: + # only use the latest windows-* as the installed toolchain is identical + os: [windows-2025] + platform: [x86_64] + include: + - platform: 'x86_64' + packages: | + gcc-g++ + python3 + fail-fast: false + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up Cygwin + uses: cygwin/cygwin-install-action@v6 + with: + site: https://mirrors.cicku.me/cygwin/ + platform: ${{ matrix.platform }} + packages: ${{ matrix.packages }} + + # Cygwin will always link the binaries even if they already exist. The linking is also extremely slow. So just run the "check" target which includes all the binaries. + - name: Build all and run test + run: | + C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make VERBOSE=1 -j%NUMBER_OF_PROCESSORS% CXXOPTS="-Werror" test + + - name: Extra test for misra + run: | + cd %GITHUB_WORKSPACE%\addons\test + ..\..\cppcheck.exe --dump -DDUMMY --suppress=uninitvar --inline-suppr misra\misra-test.c --std=c89 --platform=unix64 + python3 ..\misra.py -verify misra\misra-test.c.dump + ..\..\cppcheck.exe --addon=misra --enable=style --inline-suppr --enable=information --error-exitcode=1 misra\misra-ctu-1-test.c misra\misra-ctu-2-test.c + diff --git a/.github/workflows/CI-mingw.yml b/.github/workflows/CI-mingw.yml new file mode 100644 index 00000000000..1b0cf3e5672 --- /dev/null +++ b/.github/workflows/CI-mingw.yml @@ -0,0 +1,75 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: CI-mingw + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +defaults: + run: + shell: msys2 {0} + +jobs: + # TODO: add CMake build + build_mingw: + strategy: + matrix: + # only use the latest windows-* as the installed toolchain is identical + os: [windows-2025] + fail-fast: false + + runs-on: ${{ matrix.os }} + + timeout-minutes: 19 # max + 3*std of the last 7K runs + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up MSYS2 + uses: msys2/setup-msys2@v2 + with: + release: false # use pre-installed + # TODO: install mingw-w64-x86_64-make and use mingw32.make instead - currently fails with "Windows Subsystem for Linux has no installed distributions." + install: >- + mingw-w64-x86_64-lld + mingw-w64-x86_64-ccache + make + mingw-w64-x86_64-gcc + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }} + + - name: Build cppcheck + run: | + export PATH="/mingw64/lib/ccache/bin:$PATH" + # set RDYNAMIC to work around broken MinGW detection + # use lld for faster linking + make VERBOSE=1 RDYNAMIC=-lshlwapi LDOPTS=-fuse-ld=lld -j$(nproc) CXXOPTS="-Werror" cppcheck + + - name: Build test + run: | + export PATH="/mingw64/lib/ccache/bin:$PATH" + # set RDYNAMIC to work around broken MinGW detection + # use lld for faster linking + make VERBOSE=1 RDYNAMIC=-lshlwapi LDOPTS=-fuse-ld=lld -j$(nproc) CXXOPTS="-Werror" testrunner + + - name: Run test + run: | + export PATH="/mingw64/lib/ccache/bin:$PATH" + # set RDYNAMIC to work around broken MinGW detection + # use lld for faster linking + make VERBOSE=1 RDYNAMIC=-lshlwapi LDOPTS=-fuse-ld=lld -j$(nproc) CXXOPTS="-Werror" test diff --git a/.github/workflows/CI-unixish-docker.yml b/.github/workflows/CI-unixish-docker.yml new file mode 100644 index 00000000000..a38feb452f0 --- /dev/null +++ b/.github/workflows/CI-unixish-docker.yml @@ -0,0 +1,150 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: CI-unixish-docker + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +jobs: + build_cmake: + + strategy: + matrix: + include: + - image: "ubuntu:24.04" + with_gui: true + full_build: true + - image: "ubuntu:25.10" + with_gui: true + full_build: true + - image: "alpine:3.23" + with_gui: false # it appears FindQt6.cmake is not provided by any package + full_build: false # FIXME: test-signalhandler.cpp fails to build since feenableexcept() is missing + fail-fast: false # Prefer quick result + + runs-on: ubuntu-22.04 + + # TODO: is this actually applied to the guest? + env: + # TODO: figure out why there are cache misses with PCH enabled + CCACHE_SLOPPINESS: pch_defines,time_macros + + container: + image: ${{ matrix.image }} + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install missing software on ubuntu + if: contains(matrix.image, 'ubuntu') + run: | + apt-get update + apt-get install -y cmake g++ make libxml2-utils libpcre3-dev + + - name: Install missing software (gui) on latest ubuntu + if: contains(matrix.image, 'ubuntu') + run: | + apt-get install -y qt6-base-dev qt6-charts-dev qt6-tools-dev + + - name: Install missing software on Alpine + if: contains(matrix.image, 'alpine') + run: | + apk add cmake make g++ pcre-dev + + # needs to be called after the package installation since + # - it doesn't call "apt-get update" + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ matrix.image }} + + - name: Run CMake + run: | + cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=${{ matrix.with_gui }} -DWITH_QCHART=On -DBUILD_TRIAGE=${{ matrix.with_gui }} -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + + - name: CMake build + if: matrix.full_build + run: | + cmake --build cmake.output -- -j$(nproc) + + - name: Run CMake test + run: | + cmake --build cmake.output --target check -- -j$(nproc) + + build_make: + + strategy: + matrix: + image: ["ubuntu:24.04", "ubuntu:25.10", "alpine:3.23"] + fail-fast: false # Prefer quick result + + runs-on: ubuntu-22.04 + + container: + image: ${{ matrix.image }} + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install missing software on ubuntu + if: contains(matrix.image, 'ubuntu') + run: | + apt-get update + apt-get install -y g++ make python3 libxml2-utils libpcre3-dev + + - name: Install missing software on Alpine + if: contains(matrix.image, 'alpine') + run: | + apk add make g++ pcre-dev bash python3 libxml2-utils + + # needs to be called after the package installation since + # - it doesn't call "apt-get update" + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ matrix.image }} + + # /usr/lib/ccache/bin - Alpine Linux + + - name: Build cppcheck + run: | + export PATH="/usr/lib/ccache/bin:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + make -j$(nproc) HAVE_RULES=yes CXXOPTS="-Werror" + + - name: Build test + run: | + export PATH="/usr/lib/ccache/bin:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + make -j$(nproc) HAVE_RULES=yes CXXOPTS="-Werror" testrunner + + - name: Run test + run: | + make -j$(nproc) HAVE_RULES=yes test + + # requires python3 + - name: Run extra tests + run: | + test/scripts/generate_and_run_more_tests.sh + + # requires which + - name: Validate + run: | + make -j$(nproc) checkCWEEntries validateXML + + - name: Test addons + run: | + ./cppcheck --addon=threadsafety addons/test/threadsafety + ./cppcheck --addon=threadsafety --std=c++03 addons/test/threadsafety diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml new file mode 100644 index 00000000000..3251a6b5adb --- /dev/null +++ b/.github/workflows/CI-unixish.yml @@ -0,0 +1,747 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: CI-unixish + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +jobs: + build_cmake_tinyxml2: + + strategy: + matrix: + os: [ubuntu-22.04, macos-15] + fail-fast: false # Prefer quick result + + runs-on: ${{ matrix.os }} + + env: + # TODO: figure out why there are cache misses with PCH enabled + CCACHE_SLOPPINESS: pch_defines,time_macros + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }} + + - name: Install missing software on ubuntu + if: contains(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install libxml2-utils libtinyxml2-dev + # qt6-tools-dev-tools for lprodump + # qt6-l10n-tools for lupdate + sudo apt-get install qt6-base-dev libqt6charts6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libglx-dev libgl1-mesa-dev + + # coreutils contains "nproc" + - name: Install missing software on macos + if: contains(matrix.os, 'macos') + run: | + # pcre was removed from runner images in November 2022 + brew install coreutils qt@6 tinyxml2 pcre + + - name: CMake build on ubuntu (with GUI / system tinyxml2) + if: contains(matrix.os, 'ubuntu') + run: | + cmake -S . -B cmake.output.tinyxml2 -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + cmake --build cmake.output.tinyxml2 -- -j$(nproc) + + - name: CMake build on macos (with GUI / system tinyxml2) + if: contains(matrix.os, 'macos') + run: | + cmake -S . -B cmake.output.tinyxml2 -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_BUNDLED_TINYXML2=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6 + cmake --build cmake.output.tinyxml2 -- -j$(nproc) + + - name: Run CMake test (system tinyxml2) + run: | + cmake --build cmake.output.tinyxml2 --target check -- -j$(nproc) + + build_cmake: + + strategy: + matrix: + os: [ubuntu-22.04, macos-15] + fail-fast: false # Prefer quick result + + runs-on: ${{ matrix.os }} + + env: + # TODO: figure out why there are cache misses with PCH enabled + CCACHE_SLOPPINESS: pch_defines,time_macros + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }} + + # TODO: move latest compiler to separate step + # TODO: bail out on warnings with latest GCC + - name: Set up GCC + uses: egor-tensin/setup-gcc@v1 + if: false # matrix.os == 'ubuntu-22.04' + with: + version: 13 + platform: x64 + + - name: Select compiler + if: false # matrix.os == 'ubuntu-22.04' + run: | + echo "CXX=g++-13" >> $GITHUB_ENV + + - name: Install missing software on ubuntu + if: contains(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install libxml2-utils + # qt6-tools-dev-tools for lprodump + # qt6-l10n-tools for lupdate + sudo apt-get install qt6-base-dev libqt6charts6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libglx-dev libgl1-mesa-dev + + # coreutils contains "nproc" + - name: Install missing software on macos + if: contains(matrix.os, 'macos') + run: | + # pcre was removed from runner images in November 2022 + brew install coreutils qt@6 pcre + + - name: Run CMake on ubuntu (with GUI) + if: contains(matrix.os, 'ubuntu') + run: | + cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install + + - name: Run CMake on macos (with GUI) + if: contains(matrix.os, 'macos') + run: | + cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6 + + - name: Run CMake build + run: | + cmake --build cmake.output -- -j$(nproc) + + - name: Run CMake test + run: | + cmake --build cmake.output --target check -- -j$(nproc) + + - name: Run CTest + run: | + pushd cmake.output + ctest --output-on-failure -j$(nproc) + + - name: Run CMake install + run: | + cmake --build cmake.output --target install + + - name: Run CMake on ubuntu (no CLI) + if: matrix.os == 'ubuntu-22.04' + run: | + cmake -S . -B cmake.output_nocli -Werror=dev -DBUILD_TESTING=Off -DBUILD_CLI=Off + + - name: Run CMake on ubuntu (no CLI / with tests) + if: matrix.os == 'ubuntu-22.04' + run: | + # the test and CLI code are too intertwined so for now we need to reject that + if cmake -S . -B cmake.output_nocli_tests -Werror=dev -DBUILD_TESTING=On -DBUILD_CLI=Off; then + exit 1 + else + exit 0 + fi + + - name: Run CMake on ubuntu (no CLI / with GUI) + if: matrix.os == 'ubuntu-22.04' + run: | + cmake -S . -B cmake.output_nocli_gui -Werror=dev -DBUILD_TESTING=Off -DBUILD_CLI=Off -DBUILD_GUI=On + + - name: Run CMake on ubuntu (no GUI) + if: matrix.os == 'ubuntu-22.04' + run: | + cmake -S . -B cmake.output_nogui -Werror=dev -DBUILD_TESTING=Off -DBUILD_GUI=Off + + - name: Run CMake on ubuntu (no GUI / with triage) + if: matrix.os == 'ubuntu-22.04' + run: | + # cannot build triage without GUI + if cmake -S . -B cmake.output_nogui_triage -Werror=dev -DBUILD_TESTING=Off -DBUILD_GUI=Off -DBUILD_TRIAGE=On; then + exit 1 + else + exit 0 + fi + + - name: Run CMake on ubuntu (no CLI / no GUI) + if: matrix.os == 'ubuntu-22.04' + run: | + cmake -S . -B cmake.output_nocli_nogui -Werror=dev -DBUILD_TESTING=Off -DBUILD_GUI=Off + + build_cmake_cxxstd: + + strategy: + matrix: + os: [ubuntu-22.04, macos-15] + cxxstd: [14, 17, 20] + # FIXME: macos-15 fails to compile with C++20 + # + # /Users/runner/work/cppcheck/cppcheck/cmake.output/gui/test/projectfile/moc_testprojectfile.cpp:84:1: error: 'constinit' specifier is incompatible with C++ standards before C++20 [-Werror,-Wc++20-compat] + # 84 | Q_CONSTINIT const QMetaObject TestProjectFile::staticMetaObject = { { + # | ^ + # /opt/homebrew/opt/qt/lib/QtCore.framework/Headers/qcompilerdetection.h:1409:23: note: expanded from macro 'Q_CONSTINIT' + exclude: + - os: macos-15 + cxxstd: 20 + fail-fast: false # Prefer quick result + + runs-on: ${{ matrix.os }} + + env: + # TODO: figure out why there are cache misses with PCH enabled + CCACHE_SLOPPINESS: pch_defines,time_macros + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}-${{ matrix.cxxstd }} + + - name: Install missing software on ubuntu + if: contains(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install libxml2-utils + # qt6-tools-dev-tools for lprodump + # qt6-l10n-tools for lupdate + sudo apt-get install qt6-base-dev libqt6charts6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libglx-dev libgl1-mesa-dev + + # coreutils contains "nproc" + - name: Install missing software on macos + if: contains(matrix.os, 'macos') + run: | + # pcre was removed from runner images in November 2022 + brew install coreutils qt@6 pcre + + - name: Run CMake on ubuntu (with GUI) + if: contains(matrix.os, 'ubuntu') + run: | + cmake -S . -B cmake.output -Werror=dev -DCMAKE_CXX_STANDARD=${{ matrix.cxxstd }} -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + + - name: Run CMake on macos (with GUI) + if: contains(matrix.os, 'macos') + run: | + cmake -S . -B cmake.output -Werror=dev -DCMAKE_CXX_STANDARD=${{ matrix.cxxstd }} -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQt6_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6 + + - name: Run CMake build + run: | + cmake --build cmake.output -- -j$(nproc) + + build_uchar: + + strategy: + matrix: + os: [ubuntu-22.04, macos-15] + fail-fast: false # Prefer quick result + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }} + + # coreutils contains "nproc" + - name: Install missing software on macos + if: contains(matrix.os, 'macos') + run: | + brew install coreutils + + - name: Build with Unsigned char + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + make -j$(nproc) CXXOPTS="-Werror -funsigned-char" testrunner + + - name: Test with Unsigned char + run: | + ./testrunner + + build_mathlib: + + strategy: + matrix: + os: [ubuntu-22.04, macos-15] + fail-fast: false # Prefer quick result + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }} + + # coreutils contains "nproc" + - name: Install missing software on macos + if: contains(matrix.os, 'macos') + run: | + brew install coreutils + + - name: Build with TEST_MATHLIB_VALUE + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + make -j$(nproc) CXXOPTS="-Werror" CPPOPTS=-DTEST_MATHLIB_VALUE all + + - name: Test with TEST_MATHLIB_VALUE + run: | + make -j$(nproc) test + + check_nonneg: + + strategy: + matrix: + os: [ubuntu-22.04, macos-15] + fail-fast: false # Prefer quick result + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + # coreutils contains "g++" (default is "c++") and "nproc" + - name: Install missing software on macos + if: contains(matrix.os, 'macos') + run: | + brew install coreutils + + - name: Check syntax with NONNEG + run: | + make check-nonneg CXXOPTS="-Werror" + + build_cmake_boost: + + strategy: + matrix: + os: [macos-15] # non-macos platforms are already built with Boost in other contexts + fail-fast: false # Prefer quick result + + runs-on: ${{ matrix.os }} + + env: + # TODO: figure out why there are cache misses with PCH enabled + CCACHE_SLOPPINESS: pch_defines,time_macros + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }} + + - name: Run CMake on macOS (force Boost) + run: | + # make sure we fail when Boost is requested and not available. + # will fail because no package configuration is available. + if cmake -S . -B cmake.output.boost-force-noavail -Werror=dev -DBUILD_TESTING=Off -DUSE_BOOST=On; then + exit 1 + else + exit 0 + fi + + # coreutils contains "nproc" + - name: Install missing software on macOS + run: | + brew install coreutils boost + + - name: Run CMake on macOS (force Boost) + run: | + cmake -S . -B cmake.output.boost-force -Werror=dev -DBUILD_TESTING=Off -DUSE_BOOST=On + + - name: Run CMake on macOS (no Boost) + run: | + # make sure Boost is not used when disabled even though it is available + cmake -S . -B cmake.output.boost-no -Werror=dev -DBUILD_TESTING=Off -DUSE_BOOST=Off + if grep -q '\-DHAVE_BOOST' ./cmake.output.boost-no/compile_commands.json; then + exit 1 + else + exit 0 + fi + + - name: Run CMake on macOS (with Boost) + run: | + cmake -S . -B cmake.output.boost -Werror=dev -DBUILD_TESTING=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + grep -q '\-DHAVE_BOOST' ./cmake.output.boost/compile_commands.json + + - name: Build with CMake on macOS (with Boost) + run: | + cmake --build cmake.output.boost -- -j$(nproc) + + build_cmake_minimum: # TODO: move to docker workflow? + + runs-on: ubuntu-22.04 # use the oldest available runner + + env: + CMAKE_VERSION: 3.22 + CMAKE_VERSION_FULL: 3.22.6 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install missing software + run: | + sudo apt-get update + sudo apt-get install libxml2-utils + # qt6-tools-dev-tools for lprodump + # qt6-l10n-tools for lupdate + sudo apt-get install qt6-base-dev libqt6charts6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libglx-dev libgl1-mesa-dev + + - name: Install CMake + run: | + wget https://cmake.org/files/v${{ env.CMAKE_VERSION }}/cmake-${{ env.CMAKE_VERSION_FULL }}-linux-x86_64.tar.gz + tar xf cmake-${{ env.CMAKE_VERSION_FULL }}-linux-x86_64.tar.gz + + - name: Run CMake (without GUI) + run: | + export PATH=cmake-${{ env.CMAKE_VERSION_FULL }}-linux-x86_64/bin:$PATH + cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On + + - name: Run CMake (with GUI) + run: | + export PATH=cmake-${{ env.CMAKE_VERSION_FULL }}-linux-x86_64/bin:$PATH + cmake -S . -B cmake.output.gui -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On + + build: + + strategy: + matrix: + os: [ubuntu-22.04, macos-15] + include: + - xdist_n: auto + # FIXME: test_color_tty fails with xdist - see #13278 + - os: macos-15 + xdist_n: '1' + fail-fast: false # Prefer quick result + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }} + + - name: Install missing software on ubuntu + if: contains(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install libxml2-utils + + # packages for strict cfg checks + - name: Install missing software on ubuntu 22.04 (cfg) + if: matrix.os == 'ubuntu-22.04' + run: | + sudo apt-get install libcairo2-dev libcurl4-openssl-dev liblua5.3-dev libssl-dev libsqlite3-dev libcppunit-dev libsigc++-2.0-dev libgtk-3-dev libboost-all-dev libselinux-dev libwxgtk3.0-gtk3-dev xmlstarlet qtbase5-dev + + # coreutils contains "nproc" + - name: Install missing software on macos + if: contains(matrix.os, 'macos') + run: | + # pcre was removed from runner images in November 2022 + brew install coreutils pcre gnu-sed + + - name: Install missing Python packages on ubuntu + if: contains(matrix.os, 'ubuntu') + run: | + python3 -m pip install pip --upgrade + python3 -m pip install pytest + python3 -m pip install pytest-timeout + python3 -m pip install pytest-xdist + python3 -m pip install psutil + + # we need to use -break-system-packages --user because the common approaches do not work. + # using pip works but it appears to install the packages into a different Python installation so they are not found later on. + # using python3 -m pip without the additional flags fails since the packages are being managed by a different tool (brew) and that lacks some of the packages. + # using pipx also does not work. + - name: Install missing Python packages on macos + if: contains(matrix.os, 'macos') + run: | + python3 -m pip install --break-system-packages --user pip --upgrade + python3 -m pip install --break-system-packages --user pytest + python3 -m pip install --break-system-packages --user pytest-timeout + python3 -m pip install --break-system-packages --user pytest-xdist + python3 -m pip install --break-system-packages --user psutil + + - name: Build cppcheck + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + make -j$(nproc) CXXOPTS="-Werror" HAVE_RULES=yes + + - name: Build test + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + make -j$(nproc) CXXOPTS="-Werror" HAVE_RULES=yes testrunner + + - name: Run test + run: | + make -j$(nproc) HAVE_RULES=yes test + + # requires "gnu-sed" installed on macos + - name: Run extra tests + run: | + test/scripts/generate_and_run_more_tests.sh + + - name: Run test/cli + run: | + python3 -m pytest -Werror --strict-markers -vv -n ${{ matrix.xdist_n }} test/cli + + # TODO: use the step below instead + # do not use pushd in this step since we go below the working directory + - name: Run test/cli (symlink) + run: | + cd .. + ln -s cppcheck 'cpp check' + cd 'cpp check/test/cli' + python3 -m pytest -Werror --strict-markers -vv -n ${{ matrix.xdist_n }} + + # FIXME: proj2_test.py fails because of the relative path cleanups in ImportProject::setRelativePaths() + # It fails because the application path used as base path has its symlink resolved by getcwd(). + - name: Run test/cli (symlink) + if: false + run: | + ln -s . 'cpp check' + python3 -m pytest -Werror --strict-markers -vv -n ${{ matrix.xdist_n }} 'cpp check/test/cli' + + - name: Run test/cli (-j2) + run: | + python3 -m pytest -Werror --strict-markers -vv -n ${{ matrix.xdist_n }} test/cli + env: + TEST_CPPCHECK_INJECT_J: 2 + + - name: Run test/cli (--clang) + if: false + run: | + python3 -m pytest -Werror --strict-markers -vv -n ${{ matrix.xdist_n }} test/cli + env: + TEST_CPPCHECK_INJECT_CLANG: clang + + - name: Run test/cli (--cppcheck-build-dir) + run: | + python3 -m pytest -Werror --strict-markers -vv -n ${{ matrix.xdist_n }} test/cli + env: + TEST_CPPCHECK_INJECT_BUILDDIR: injected + + - name: Run cfg tests + if: matrix.os != 'ubuntu-22.04' + run: | + make -j$(nproc) checkcfg + + - name: Run cfg tests (strict) + if: matrix.os == 'ubuntu-22.04' + run: | + make -j$(nproc) checkcfg + env: + STRICT: 1 + + - name: Run --dump test + run: | + ./cppcheck test/testpreprocessor.cpp --dump + xmllint --noout test/testpreprocessor.cpp.dump + + - name: Validate + run: | + make -j$(nproc) checkCWEEntries validateXML + + - name: Test install + run: | + # this is only to test the "install" target - since we did not build with FILESDIR it would not work as intended + make DESTDIR=cppcheck-make-install FILESDIR=/share/Cppcheck install + rm -rf cppcheck-make-install + + - name: Test Signalhandler + run: | + cmake -S . -B build.cmake.signal -Werror=dev -DBUILD_TESTING=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On + cmake --build build.cmake.signal --target test-signalhandler -- -j$(nproc) + # TODO: how to run this without copying the file? + cp build.cmake.signal/bin/test-s* . + python3 -m pytest -Werror --strict-markers -vv test/signal/test-signalhandler.py + rm test-signalhandler + + # no unix backtrace support on MacOs + - name: Test Stacktrace + if: contains(matrix.os, 'ubuntu') + run: | + cmake -S . -B build.cmake.stack -Werror=dev -DBUILD_TESTING=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On + cmake --build build.cmake.stack --target test-stacktrace -- -j$(nproc) + # TODO: how to run this without copying the file? + cp build.cmake.stack/bin/test-s* . + python3 -m pytest -Werror --strict-markers -vv test/signal/test-stacktrace.py + rm test-stacktrace + + # TODO: move to scriptcheck.yml so these are tested with all Python versions? + - name: Test addons + run: | + set -x + ./cppcheck --error-exitcode=1 --inline-suppr --addon=threadsafety addons/test/threadsafety + ./cppcheck --error-exitcode=1 --inline-suppr --addon=threadsafety --std=c++03 addons/test/threadsafety + ./cppcheck --error-exitcode=1 --inline-suppr --addon=misra addons/test/misra/crash*.c + ./cppcheck --error-exitcode=1 --inline-suppr --addon=misra --enable=information addons/test/misra/config*.c + + ./cppcheck --addon=misra --enable=style --inline-suppr --enable=information --error-exitcode=1 addons/test/misra/misra-ctu-*-test.c + pushd addons/test + # We'll force C89 standard to enable an additional verification for + # rules 5.4 and 5.5 which have standard-dependent options. + ../../cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra/misra-test.c --std=c89 --platform=unix64 + python3 ../misra.py -verify misra/misra-test.c.dump + # Test slight MISRA differences in C11 standard + ../../cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra/misra-test-c11.c --std=c11 --platform=unix64 + python3 ../misra.py -verify misra/misra-test-c11.c.dump + # TODO: do we need to verify something here? + ../../cppcheck --dump -DDUMMY --suppress=uninitvar --suppress=uninitStructMember --std=c89 misra/misra-test.h + ../../cppcheck --dump misra/misra-test.cpp + python3 ../misra.py -verify misra/misra-test.cpp.dump + python3 ../misra.py --rule-texts=misra/misra2012_rules_dummy_ascii.txt -verify misra/misra-test.cpp.dump + python3 ../misra.py --rule-texts=misra/misra2012_rules_dummy_utf8.txt -verify misra/misra-test.cpp.dump + python3 ../misra.py --rule-texts=misra/misra2012_rules_dummy_windows1250.txt -verify misra/misra-test.cpp.dump + ../../cppcheck --addon=misra --enable=style --platform=avr8 --error-exitcode=1 misra/misra-test-avr8.c + ../../cppcheck --dump misc-test.cpp + python3 ../misc.py -verify misc-test.cpp.dump + ../../cppcheck --dump naming_test.c + python3 ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.c.dump + ../../cppcheck --dump naming_test.cpp + python3 ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.cpp.dump + + # TODO: run with "-n auto" when misra_test.py can be run in parallel + - name: test addons (Python) + if: matrix.os != 'ubuntu-22.04' + run: | + python3 -m pytest -Werror --strict-markers -vv -n 1 addons/test + env: + PYTHONPATH: ./addons + + # TODO: run with "-n auto" when misra_test.py can be run in parallel + # we cannot specify -Werror since xml/etree/ElementTree.py in Python 3.10 contains an unclosed file + - name: test addons (Python) + if: matrix.os == 'ubuntu-22.04' + run: | + python3 -m pytest --strict-markers -vv -n 1 addons/test + env: + PYTHONPATH: ./addons + + - name: Build democlient + if: matrix.os == 'ubuntu-22.04' + run: | + warnings="-pedantic -Wall -Wextra -Wcast-qual -Wno-deprecated-declarations -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" + g++ $warnings -c -Ilib -Iexternals/tinyxml2 democlient/democlient.cpp + + - name: Test disabled executors + if: matrix.os == 'ubuntu-22.04' + run: | + g++ -Ilib -c cli/threadexecutor.cpp -DDISALLOW_THREAD_EXECUTOR + test -z "$(nm threadexecutor.o)" + g++ -Ilib -c cli/processexecutor.cpp -DDISALLOW_PROCESS_EXECUTOR + test -z "$(nm processexecutor.o)" + # TODO: test NO_* defines + + - name: Test execinfo.h detection + run: | + make clean + make cli/stacktrace.o | grep HAVE_EXECINFO_H=1 + test -n "$(nm cli/stacktrace.o)" + + - name: Test testrunner inclusion/exclusion + run: | + ! ./testrunner -d TestUtils | grep -v TestUtils > /dev/null + ! ./testrunner -d TestUtils::trim | grep -v TestUtils::trim > /dev/null + ! ./testrunner -d -x TestUtils | grep TestUtils > /dev/null + ! ./testrunner -d -x TestUtils:trim | grep TestUtils:trim > /dev/null + + - name: Show all ignored files + if: false # TODO: currently lists all the contents of ignored folders - we only need what actually matched + run: | + git ls-files --others --ignored --exclude-standard + + - name: Check for changed and unversioned files + run: | + # TODO: how to do this with a single command? + git status --ignored=no + git status --ignored=no | grep -q 'working tree clean' + + selfcheck: + needs: build # wait for all tests to be successful first + + runs-on: ubuntu-22.04 # run on the latest image only + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }} + + - name: Install missing software on ubuntu + run: | + sudo apt-get update + # qt6-tools-dev-tools for lprodump + # qt6-l10n-tools for lupdate + sudo apt-get install qt6-base-dev libqt6charts6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libglx-dev libgl1-mesa-dev + sudo apt-get install libboost-container-dev + + - name: Self check (build) + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + # compile with verification and ast matchers + make -j$(nproc) CXXOPTS="-Werror -g -O2" CPPOPTS="-DCHECK_INTERNAL -DHAVE_BOOST" MATCHCOMPILER=yes VERIFY=1 + + - name: CMake + run: | + cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_MATCHCOMPILER=Verify -DENABLE_CHECK_INTERNAL=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On + + - name: Generate dependencies + run: | + # make sure auto-generated GUI files exist + make -C cmake.output autogen + make -C cmake.output gui-build-deps triage-build-ui-deps + + - name: Self check + run: | + ./selfcheck.sh diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml new file mode 100644 index 00000000000..71d72025cf9 --- /dev/null +++ b/.github/workflows/CI-windows.yml @@ -0,0 +1,338 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: CI-windows + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +defaults: + run: + shell: cmd + +jobs: + + build_qt: + strategy: + matrix: + os: [windows-2022, windows-2025] + qt_ver: [6.10.0] + fail-fast: false + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up Visual Studio environment + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + + - name: Install Qt ${{ matrix.qt_ver }} + uses: jurplel/install-qt-action@v4 + with: + version: ${{ matrix.qt_ver }} + modules: 'qtcharts' + setup-python: 'false' + cache: true + aqtversion: '==3.1.*' # TODO: remove when aqtinstall 3.2.2 is available + + - name: Run CMake + run: | + rem TODO: enable rules? + rem specify Release build so matchcompiler is used + cmake -S . -B build -Werror=dev -DCMAKE_BUILD_TYPE=Release -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DBUILD_TESTING=Off -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DBUILD_ONLINE_HELP=On -DCMAKE_INSTALL_PREFIX=cppcheck-cmake-install -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel! + + - name: Build GUI release + run: | + cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel! + + - name: Deploy GUI + run: | + windeployqt build\bin\Release || exit /b !errorlevel! + del build\bin\Release\cppcheck-gui.ilk || exit /b !errorlevel! + del build\bin\Release\cppcheck-gui.pdb || exit /b !errorlevel! + + # TODO: run GUI tests + + - name: Run CMake install + run: | + cmake --build build --target install + + build_cmake_cxxstd: + strategy: + matrix: + os: [windows-2022, windows-2025] + cxxstd: [14, 17, 20] + fail-fast: false + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up Visual Studio environment + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + + - name: Run CMake + run: | + cmake -S . -B build.cxxstd -Werror=dev -A x64 -DCMAKE_CXX_STANDARD=${{ matrix.cxxstd }} -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel! + + - name: Build + run: | + cmake --build build.cxxstd --config Debug || exit /b !errorlevel! + + build_cmake_minimum: + + runs-on: windows-2022 # use the oldest available runner + + env: + CMAKE_VERSION: 3.22 + CMAKE_VERSION_FULL: 3.22.6 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install CMake + run: | + curl -fsSL https://cmake.org/files/v${{ env.CMAKE_VERSION }}/cmake-${{ env.CMAKE_VERSION_FULL }}-windows-x86_64.zip -o cmake.zip || exit /b !errorlevel! + 7z x cmake.zip || exit /b !errorlevel! + + - name: Set up Visual Studio environment + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: 6.10.0 + modules: 'qtcharts' + setup-python: 'false' + cache: true + aqtversion: '==3.1.*' # TODO: remove when aqtinstall 3.2.2 is available + + - name: Run CMake (without GUI) + run: | + :: TODO: enable DHAVE_RULES? + cmake-${{ env.CMAKE_VERSION_FULL }}-windows-x86_64\bin\cmake.exe -S . -B cmake.output -A x64 -DHAVE_RULES=Off -DBUILD_TESTING=On + + - name: Run CMake (with GUI) + run: | + :: TODO: enable DHAVE_RULES? + cmake-${{ env.CMAKE_VERSION_FULL }}-windows-x86_64\bin\cmake.exe -S . -B cmake.output.gui -A x64 -DHAVE_RULES=Off -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On + + build: + strategy: + matrix: + os: [windows-2022, windows-2025] + config: [debug, release] + fail-fast: false + + runs-on: ${{ matrix.os }} + + env: + # see https://www.pcre.org/original/changelog.txt + PCRE_VERSION: 8.45 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up Python + if: matrix.config == 'release' + uses: actions/setup-python@v5 + with: + python-version: '3.14' + check-latest: true + + - name: Set up Visual Studio environment + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + + - name: Cache PCRE + id: cache-pcre + uses: actions/cache@v4 + with: + path: | + externals\pcre.h + externals\pcre.lib + externals\pcre64.lib + key: pcre-${{ env.PCRE_VERSION }}-x64-bin-win + + - name: Download PCRE + if: steps.cache-pcre.outputs.cache-hit != 'true' + run: | + curl -fsSL https://github.com/pfultz2/pcre/archive/refs/tags/%PCRE_VERSION%.zip -o pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! + + - name: Install PCRE + if: steps.cache-pcre.outputs.cache-hit != 'true' + run: | + @echo on + 7z x pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! + cd pcre-%PCRE_VERSION% || exit /b !errorlevel! + git apply --ignore-space-change ..\externals\pcre.patch || exit /b !errorlevel! + cmake . -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DPCRE_BUILD_PCRECPP=Off -DPCRE_BUILD_TESTS=Off -DPCRE_BUILD_PCREGREP=Off -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel! + nmake || exit /b !errorlevel! + copy pcre.h ..\externals || exit /b !errorlevel! + copy pcre.lib ..\externals\pcre64.lib || exit /b !errorlevel! + env: + CL: /MP + + - name: Install missing Python packages + if: matrix.config == 'release' + run: | + python -m pip install pip --upgrade || exit /b !errorlevel! + python -m pip install pytest || exit /b !errorlevel! + python -m pip install pytest-custom_exit_code || exit /b !errorlevel! + python -m pip install pytest-timeout || exit /b !errorlevel! + python -m pip install pytest-xdist || exit /b !errorlevel! + python -m pip install psutil || exit /b !errorlevel! + + - name: Build CLI debug configuration using MSBuild + if: matrix.config == 'debug' + run: | + :: cmake --build build --target check --config Debug || exit /b !errorlevel! + msbuild -m cppcheck.sln /p:Configuration=Debug-PCRE;Platform=x64 -maxcpucount || exit /b !errorlevel! + env: + _CL_: /WX + + - name: Run Debug test + if: matrix.config == 'debug' + run: .\bin\debug\testrunner.exe -t || exit /b !errorlevel! + + - name: Build CLI release configuration using MSBuild + if: matrix.config == 'release' + run: | + :: cmake --build build --target check --config Release || exit /b !errorlevel! + msbuild -m cppcheck.sln /p:Configuration=Release-PCRE;Platform=x64 -maxcpucount || exit /b !errorlevel! + env: + _CL_: /WX + + - name: Run Release test + if: matrix.config == 'release' + run: .\bin\testrunner.exe || exit /b !errorlevel! + + - name: Prepare test/cli + if: matrix.config == 'release' + run: | + :: since FILESDIR is not set copy the binary to the root so the addons are found + :: copy .\build\bin\Release\cppcheck.exe .\cppcheck.exe || exit /b !errorlevel! + copy .\bin\cppcheck.exe .\cppcheck.exe || exit /b !errorlevel! + copy .\bin\cppcheck-core.dll .\cppcheck-core.dll || exit /b !errorlevel! + + - name: Run test/cli + if: matrix.config == 'release' + run: | + python -m pytest -Werror --strict-markers -vv -n auto test/cli || exit /b !errorlevel! + + - name: Run test/cli (-j2) + if: matrix.config == 'release' + run: | + python -m pytest -Werror --strict-markers -vv -n auto test/cli || exit /b !errorlevel! + env: + TEST_CPPCHECK_INJECT_J: 2 + + # TODO: install clang + - name: Run test/cli (--clang) + if: false # matrix.config == 'release' + run: | + python -m pytest -Werror --strict-markers -vv -n auto test/cli || exit /b !errorlevel! + env: + TEST_CPPCHECK_INJECT_CLANG: clang + + - name: Run test/cli (--cppcheck-build-dir) + if: matrix.config == 'release' + run: | + python -m pytest -Werror --strict-markers -vv -n auto test/cli || exit /b !errorlevel! + env: + TEST_CPPCHECK_INJECT_BUILDDIR: injected + + # TODO: test with Release configuration? + - name: Test SEH wrapper + if: matrix.config == 'release' + run: | + cmake -S . -B build.cmake.seh -Werror=dev -DBUILD_TESTING=On -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel! + cmake --build build.cmake.seh --target test-sehwrapper || exit /b !errorlevel! + :: TODO: how to run this without copying the file? + copy build.cmake.seh\bin\Debug\test-sehwrapper.exe . || exit /b !errorlevel! + python3 -m pytest -Werror --strict-markers -vv test/seh/test-sehwrapper.py || exit /b !errorlevel! + del test-sehwrapper.exe || exit /b !errorlevel! + + - name: Test addons + if: matrix.config == 'release' + run: | + echo on + .\cppcheck --addon=threadsafety addons\test\threadsafety || exit /b !errorlevel! + .\cppcheck --addon=threadsafety --std=c++03 addons\test\threadsafety || exit /b !errorlevel! + .\cppcheck --addon=misra --enable=style --inline-suppr --enable=information --error-exitcode=1 addons\test\misra\misra-ctu-*-test.c || exit /b !errorlevel! + cd addons\test + rem We'll force C89 standard to enable an additional verification for + rem rules 5.4 and 5.5 which have standard-dependent options. + ..\..\cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra\misra-test.c --std=c89 --platform=unix64 || exit /b !errorlevel! + python3 ..\misra.py -verify misra\misra-test.c.dump || exit /b !errorlevel! + rem Test slight MISRA differences in C11 standard + ..\..\cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra\misra-test-c11.c --std=c11 --platform=unix64 || exit /b !errorlevel! + python3 ..\misra.py -verify misra\misra-test-c11.c.dump || exit /b !errorlevel! + rem TODO: do we need to verify something here? + ..\..\cppcheck --dump -DDUMMY --suppress=uninitvar --suppress=uninitStructMember --std=c89 misra\misra-test.h || exit /b !errorlevel! + ..\..\cppcheck --dump misra\misra-test.cpp || exit /b !errorlevel! + python3 ..\misra.py -verify misra\misra-test.cpp.dump || exit /b !errorlevel! + python3 ..\misra.py --rule-texts=misra\misra2012_rules_dummy_ascii.txt -verify misra\misra-test.cpp.dump || exit /b !errorlevel! + python3 ..\misra.py --rule-texts=misra\misra2012_rules_dummy_utf8.txt -verify misra\misra-test.cpp.dump || exit /b !errorlevel! + python3 ..\misra.py --rule-texts=misra\misra2012_rules_dummy_windows1250.txt -verify misra\misra-test.cpp.dump || exit /b !errorlevel! + ..\..\cppcheck --addon=misra --enable=style --platform=avr8 --error-exitcode=1 misra\misra-test-avr8.c || exit /b !errorlevel! + ..\..\cppcheck --dump misc-test.cpp || exit /b !errorlevel! + python3 ..\misc.py -verify misc-test.cpp.dump || exit /b !errorlevel! + ..\..\cppcheck --dump naming_test.c || exit /b !errorlevel! + rem TODO: fix this - does not fail on Linux + rem python3 ..\naming.py --var='[a-z].*' --function='[a-z].*' naming_test.c.dump || exit /b !errorlevel! + ..\..\cppcheck --dump naming_test.cpp || exit /b !errorlevel! + python3 ..\naming.py --var='[a-z].*' --function='[a-z].*' naming_test.cpp.dump || exit /b !errorlevel! + + # TODO: run with "-n auto" when misra_test.py can be run in parallel + - name: test addons (Python) + if: matrix.config == 'release' + run: | + python -m pytest -Werror --strict-markers -vv -n 1 addons/test || exit /b !errorlevel! + env: + PYTHONPATH: ./addons + + - name: Check Windows test syntax + if: matrix.config == 'debug' + run: | + cd test\cfg + cl.exe windows.cpp -DUNICODE=1 -D_UNICODE=1 /Zs || exit /b !errorlevel! + cl.exe mfc.cpp /EHsc /Zs || exit /b !errorlevel! + + - name: Show all ignored files + if: false # TODO: currently lists all the contents of ignored folders - we only need what actually matched + run: | + git ls-files --others --ignored --exclude-standard || exit /b !errorlevel! + + - name: Check for changed and unversioned files + run: | + :: TODO: how to do this with a single command? + git status --ignored=no + :: TODO: make this work + :: git status --ignored=no | grep -q 'working tree clean' diff --git a/.github/workflows/buildman.yml b/.github/workflows/buildman.yml new file mode 100644 index 00000000000..b0b399dd851 --- /dev/null +++ b/.github/workflows/buildman.yml @@ -0,0 +1,65 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: Build manual + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +jobs: + convert_via_pandoc: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - run: | + mkdir output + + - uses: docker://pandoc/latex:3.6.3 + with: + args: --output=output/manual.html man/manual.md + + - uses: docker://pandoc/latex:3.6.3 + with: + args: --output=output/manual.pdf man/manual.md + + - uses: docker://pandoc/latex:3.6.3 + with: + args: --output=output/manual-premium.pdf man/manual-premium.md + + - uses: actions/upload-artifact@v4 + with: + name: output + path: output + + manpage: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install missing software on ubuntu + run: | + sudo apt-get update + sudo apt-get install -y xsltproc docbook-xsl + + - name: build manpage + run: | + make man + + - uses: actions/upload-artifact@v4 + with: + name: cppcheck.1 + path: cppcheck.1 diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml new file mode 100644 index 00000000000..c54d47da4f1 --- /dev/null +++ b/.github/workflows/cifuzz.yml @@ -0,0 +1,34 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: CIFuzz + +on: [pull_request] + +permissions: + contents: read + +jobs: + Fuzzing: + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'cppcheck-opensource' }} + steps: + - name: Build Fuzzers + id: build + uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master + with: + oss-fuzz-project-name: 'cppcheck' + dry-run: false + language: c++ + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'cppcheck' + fuzz-seconds: 300 + dry-run: false + language: c++ + - name: Upload Crash + uses: actions/upload-artifact@v4 + if: failure() && steps.build.outcome == 'success' + with: + name: artifacts + path: ./out/artifacts diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml new file mode 100644 index 00000000000..c4f8cc0cf6b --- /dev/null +++ b/.github/workflows/clang-tidy.yml @@ -0,0 +1,93 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: clang-tidy + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + schedule: + - cron: '0 0 * * 0' + workflow_dispatch: + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-22.04 + + env: + QT_VERSION: 6.10.0 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install missing software + run: | + sudo apt-get update + sudo apt-get install -y cmake make + sudo apt-get install -y libpcre3-dev + sudo apt-get install -y libgl-dev # fixes missing dependency for Qt in CMake + + - name: Install clang + run: | + sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14 + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh 22 + sudo apt-get install -y clang-tidy-22 + + - name: Install Qt ${{ env.QT_VERSION }} + uses: jurplel/install-qt-action@v4 + with: + version: ${{ env.QT_VERSION }} + modules: 'qtcharts' + setup-python: 'false' + install-deps: false + cache: true + + - name: Verify clang-tidy configuration + run: | + clang-tidy-22 --verify-config + + - name: Prepare CMake + run: | + cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_COMPILE_WARNING_AS_ERROR=On + env: + CC: clang-22 + CXX: clang++-22 + + - name: Prepare CMake dependencies + run: | + # make sure the auto-generated GUI sources exist + make -C cmake.output autogen + # make sure the precompiled headers exist + make -C cmake.output/cli cmake_pch.hxx.pch + make -C cmake.output/gui cmake_pch.hxx.pch + make -C cmake.output/lib cmake_pch.hxx.pch + make -C cmake.output/test cmake_pch.hxx.pch + + - name: Clang-Tidy + if: ${{ github.event.schedule == '' && github.event_name != 'workflow_dispatch' }} + run: | + cmake --build cmake.output --target run-clang-tidy 2> /dev/null + + - name: Clang Static Analyzer + if: ${{ github.event.schedule != '' || github.event_name == 'workflow_dispatch' }} + run: | + cmake --build cmake.output --target run-clang-tidy-csa 2> /dev/null + + - uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: Compilation Database + path: ./cmake.output/compile_commands.json diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000000..12e758d2c9e --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,52 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: "CodeQL" + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-22.04 + permissions: + security-events: write + + strategy: + fail-fast: false + matrix: + # Override automatic language detection by changing the below list + # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] + language: ['cpp', 'python'] + # Learn more... + # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + persist-credentials: false + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + + - name: Build cppcheck + if: matrix.language == 'cpp' + run: | + make -j$(nproc) CXXOPTS="-Werror" HAVE_RULES=yes CPPCHK_GLIBCXX_DEBUG= cppcheck + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/corpus.yml b/.github/workflows/corpus.yml new file mode 100644 index 00000000000..0c1aeda94de --- /dev/null +++ b/.github/workflows/corpus.yml @@ -0,0 +1,58 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: corpus + +on: + schedule: + - cron: '0 0 * * 0' + workflow_dispatch: + +permissions: + contents: read + +jobs: + corpus: + runs-on: ubuntu-22.04 + if: ${{ github.repository_owner == 'cppcheck-opensource' }} + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ runner.os }} + + - name: Install missing software on ubuntu + run: | + sudo apt-get update + sudo apt-get install -y fdupes + + - name: build testrunner + run: | + store_dir=$(pwd)/store + mkdir $store_dir + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + make -j$(nproc) CXXOPTS="-Werror" CPPOPTS="-DSTORE_INPUT_DIR=\"\\\"$store_dir\\\"\"" testrunner + + - name: run testrunner + run: | + ./testrunner -q + + - name: de-duplicate files + run: | + set -x + ls -l ./store | wc -l + echo "removing duplicates" + fdupes -qdN ./store > /dev/null + ls -l ./store | wc -l + # print largest size + ls -l ./store | cut -d' ' -f5 | sort -u -n -r | head -n1 + + - uses: actions/upload-artifact@v4 + if: success() + with: + name: corpus + path: ./store diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000000..13f56172a80 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,71 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: Coverage + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ runner.os }} + + - name: Install missing software on ubuntu + run: | + sudo apt-get update + sudo apt-get install libxml2-utils lcov + + - name: Install missing Python packages on ubuntu + run: | + python -m pip install pip --upgrade + python -m pip install lcov_cobertura + + - name: Compile instrumented + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + make -j$(nproc) CXXOPTS="-Werror -g -fprofile-arcs -ftest-coverage" HAVE_RULES=yes CPPCHK_GLIBCXX_DEBUG= all + + - name: Run instrumented tests + run: | + ./testrunner + test/cfg/runtests.sh + + - name: Generate coverage report + run: | + gcov lib/*.cpp -o lib/ + lcov --directory ./ --capture --output-file lcov_tmp.info -b ./ + lcov --extract lcov_tmp.info "$(pwd)/*" --output-file lcov.info + genhtml lcov.info -o coverage_report --frame --legend --demangle-cpp + + - uses: actions/upload-artifact@v4 + with: + name: Coverage results + path: coverage_report + + - uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + # file: ./coverage.xml # optional + flags: unittests # optional + name: ${{ github.repository }} # optional + fail_ci_if_error: true # optional (default = false): diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml new file mode 100644 index 00000000000..006160c7779 --- /dev/null +++ b/.github/workflows/coverity.yml @@ -0,0 +1,41 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: Coverity + +on: + schedule: + - cron: "0 0 * * *" + +permissions: + contents: read + +jobs: + scan: + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'cppcheck-opensource' }} + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Install missing software on ubuntu + run: | + sudo apt-get update + sudo apt-get install qtbase5-dev qttools5-dev libqt5charts5-dev libboost-container-dev + - name: Download Coverity build tool + run: | + wget -c -N https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=cppcheck" -O coverity_tool.tar.gz + mkdir coverity_tool + tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool + - name: Build with Coverity build tool + run: | + export PATH=`pwd`/coverity_tool/bin:$PATH + cov-build --dir cov-int make CPPCHK_GLIBCXX_DEBUG= + - name: Submit build result to Coverity Scan + run: | + tar czvf cov.tar.gz cov-int + curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \ + --form email=daniel.marjamaki@gmail.com \ + --form file=@cov.tar.gz \ + --form version="Commit $GITHUB_SHA" \ + --form description="Development" \ + https://scan.coverity.com/builds?project=cppcheck diff --git a/.github/workflows/cppcheck-premium.yml b/.github/workflows/cppcheck-premium.yml new file mode 100644 index 00000000000..ed0f2a1bcd5 --- /dev/null +++ b/.github/workflows/cppcheck-premium.yml @@ -0,0 +1,72 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: cppcheck-premium + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + workflow_dispatch: + inputs: + premium_version: + description: 'Cppcheck Premium version' + +permissions: + contents: read + security-events: write + +jobs: + + build: + runs-on: ubuntu-24.04 # run on the latest image only + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Download cppcheckpremium release + run: | + premium_version=${{ inputs.premium_version }} + if [ -z $premium_version ]; then + premium_version=26.3.0 + #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-24.04/cppcheckpremium-$premium_version-amd64.tar.gz -O cppcheckpremium.tar.gz + fi + tar xzf cppcheckpremium.tar.gz + mv cppcheckpremium-$premium_version cppcheckpremium + + - name: Generate a license file + run: | + echo cppcheck > cppcheck.lic + echo 261231 >> cppcheck.lic + echo 80000 >> cppcheck.lic + echo 4b64673f03fb6230 >> cppcheck.lic + echo path:lib >> cppcheck.lic + + - name: Check + run: | + cppcheckpremium/premiumaddon --check-loc-license cppcheck.lic > cppcheck-premium-loc + cppcheckpremium/cppcheck --premium=safety-off -j$(nproc) -D__GNUC__ -D__CPPCHECK__ --suppressions-list=cppcheckpremium-suppressions --platform=unix64 --enable=style --premium=misra-c++-2023 --premium=cert-c++-2016 --inline-suppr lib --error-exitcode=0 --output-format=sarif 2> results.sarif + + - name: Cat results + run: | + #sed -i 's|"security-severity":.*||' results.sarif + cat results.sarif + + - uses: actions/upload-artifact@v4 + with: + name: results + path: results.sarif + + - name: Upload report + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: results.sarif + category: cppcheckpremium diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 00000000000..fd491c0ec0e --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,55 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: format + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-22.04 + + env: + UNCRUSTIFY_VERSION: 0.80.1 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Cache uncrustify + uses: actions/cache@v4 + id: cache-uncrustify + with: + path: | + ~/uncrustify + key: ${{ runner.os }}-uncrustify-${{ env.UNCRUSTIFY_VERSION }} + + - name: build uncrustify + if: steps.cache-uncrustify.outputs.cache-hit != 'true' + run: | + set -x + wget https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-${{ env.UNCRUSTIFY_VERSION }}.tar.gz + tar xzvf uncrustify-${{ env.UNCRUSTIFY_VERSION }}.tar.gz + cd uncrustify-uncrustify-${{ env.UNCRUSTIFY_VERSION }} + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release + cmake --build build -- -j$(nproc) -s + mkdir ~/uncrustify + cp build/uncrustify ~/uncrustify/ + + - name: Uncrustify check + run: | + UNCRUSTIFY=~/uncrustify/uncrustify ./runformat + git diff + git diff | diff - /dev/null &> /dev/null diff --git a/.github/workflows/iwyu.yml b/.github/workflows/iwyu.yml new file mode 100644 index 00000000000..05d5643bdf7 --- /dev/null +++ b/.github/workflows/iwyu.yml @@ -0,0 +1,267 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: include-what-you-use + +on: + schedule: + - cron: '0 0 * * 0' + workflow_dispatch: + +permissions: + contents: read + +jobs: + iwyu: + + strategy: + matrix: + # "opensuse/tumbleweed:latest" / "fedora:rawhide" / "debian:unstable" / "archlinux:latest" + include: + - os: ubuntu-22.04 + image: "fedora:rawhide" + stdlib: libstdc++ + - os: ubuntu-22.04 + image: "fedora:rawhide" + stdlib: libc++ + - os: macos-26 + image: "" + stdlib: libc++ # no libstdc++ on macOS + mapping_file_opt: '-Xiwyu --mapping_file=$(realpath ./macos.imp)' + fail-fast: false + + runs-on: ${{ matrix.os }} + if: ${{ github.repository_owner == 'cppcheck-opensource' }} + + container: + image: ${{ matrix.image }} + + env: + QT_VERSION: 6.10.0 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install missing software on debian/ubuntu + if: contains(matrix.image, 'debian') + run: | + apt-get update + apt-get install -y cmake clang make libpcre3-dev + apt-get install -y libgl-dev # fixes missing dependency for Qt in CMake + apt-get install -y iwyu + + - name: Install missing software on archlinux + if: contains(matrix.image, 'archlinux') + run: | + set -x + pacman -Sy + pacman -S cmake make clang pcre --noconfirm + pacman -S libglvnd --noconfirm # fixes missing dependency for Qt in CMake + pacman-key --init + pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com + pacman-key --lsign-key 3056513887B78AEB + pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst' --noconfirm + echo "[chaotic-aur]" >> /etc/pacman.conf + echo "Include = /etc/pacman.d/chaotic-mirrorlist" >> /etc/pacman.conf + pacman -Sy + pacman -S include-what-you-use --noconfirm + ln -s iwyu-tool /usr/sbin/iwyu_tool + + - name: Install missing software on Fedora + if: contains(matrix.image, 'fedora') + run: | + dnf install -y cmake clang pcre-devel + dnf install -y libglvnd-devel # fixes missing dependency for Qt in CMake + dnf install -y p7zip-plugins # required as fallback for py7zr in Qt installation + dnf install -y python3-pip # fixes missing pip module in jurplel/install-qt-action + dnf install -y python3-devel # fixes building of wheels for jurplel/install-qt-action + dnf install -y cairo-devel gtk3-devel libcurl-devel lua-devel openssl-devel python3-devel sqlite-devel boost-devel cppunit-devel libsigc++20-devel # for strict cfg checks + dnf install -y iwyu + ln -s iwyu_tool.py /usr/bin/iwyu_tool + + - name: Install missing software on Fedora (libc++) + if: contains(matrix.image, 'fedora') && matrix.stdlib == 'libc++' + run: | + dnf install -y libcxx-devel + + - name: Install missing software on OpenSUSE + if: contains(matrix.image, 'opensuse') + run: | + zypper install -y cmake clang pcre-devel + zypper install -y include-what-you-use-tools + ln -s iwyu_tool.py /usr/bin/iwyu_tool + + # coreutils contains "nproc" + - name: Install missing software on macOS + if: contains(matrix.os, 'macos') + run: | + brew install include-what-you-use pcre coreutils + # on Apple Silicon files are symlinked under /opt/homebrew/bin + ln -s /opt/homebrew/bin/iwyu_tool.py /usr/local/bin/iwyu_tool + + # Fails on OpenSUSE: + # Warning: Failed to restore: Tar failed with error: Unable to locate executable file: tar. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable. + # Also the shell is broken afterwards: + # OCI runtime exec failed: exec failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown + # + # On macos-26 we need to perform the Python setup because the default installation is managed externally managed + - name: Install Qt ${{ env.QT_VERSION }} + uses: jurplel/install-qt-action@v4 + with: + version: ${{ env.QT_VERSION }} + modules: 'qtcharts' + setup-python: ${{ contains(matrix.os, 'macos') }} + install-deps: false + cache: true + + - name: Generate macOS mappings + if: contains(matrix.os, 'macos') + run: | + set -x + + wget https://raw.githubusercontent.com/include-what-you-use/include-what-you-use/master/mapgen/iwyu-mapgen-apple-libc.py + python3 iwyu-mapgen-apple-libc.py $(xcrun --show-sdk-path)/usr/include > macos.imp + + - name: Prepare CMake + run: | + cmake -S . -B cmake.output -Werror=dev -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off -DEXTERNALS_AS_SYSTEM=On -DUSE_LIBCXX=${{ matrix.stdlib == 'libc++' }} + env: + CC: clang + CXX: clang++ + + # Fails on Debian: + # /__w/cppcheck/Qt/6.7.0/gcc_64/libexec/rcc: error while loading shared libraries: libglib-2.0.so.0: cannot open shared object file: No such file or directory + - name: Prepare CMake dependencies + run: | + # make sure the auto-generated GUI sources exist + make -C cmake.output autogen + # make sure the precompiled headers exist + #make -C cmake.output/cli cmake_pch.hxx.pch + #make -C cmake.output/gui cmake_pch.hxx.pch + #make -C cmake.output/lib cmake_pch.hxx.pch + #make -C cmake.output/test cmake_pch.hxx.pch + # make sure the auto-generated GUI dependencies exist + make -C cmake.output gui-build-deps + make -C cmake.output triage-build-ui-deps + + - name: iwyu_tool + run: | + iwyu_tool -p cmake.output -j $(nproc) -- -w -Xiwyu --max_line_length=1024 -Xiwyu --comment_style=long -Xiwyu --quoted_includes_first -Xiwyu --update_comments ${{ matrix.mapping_file_opt }} ${{ matrix.clang_inc }} > iwyu.log + + # TODO: run with all configurations + - name: test/cfg + if: matrix.stdlib == 'libstdc++' + run: | + # TODO: redirect to log + ./test/cfg/runtests.sh + env: + IWYU: include-what-you-use + IWYU_CLANG_INC: ${{ matrix.clang_inc }} + + - uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: Compilation Database (include-what-you-use - ${{ matrix.os }} ${{ matrix.stdlib }}) + path: ./cmake.output/compile_commands.json + + - uses: actions/upload-artifact@v4 + if: ${{ contains(matrix.os, 'macos') && (success() || failure()) }} + with: + name: macOS Mappings + path: | + ./iwyu-mapgen-apple-libc.py + ./macos.imp + + - uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: Logs (include-what-you-use - ${{ matrix.os }} ${{ matrix.stdlib }}) + path: ./*.log + + clang-include-cleaner: + + strategy: + matrix: + stdlib: [libstdc++, libc++] + include: + - stdlib: libstdc++ + use_libcxx: Off + - stdlib: libc++ + use_libcxx: On + fail-fast: false + + runs-on: ubuntu-22.04 + if: ${{ github.repository_owner == 'cppcheck-opensource' }} + + env: + QT_VERSION: 6.10.0 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install missing software + run: | + sudo apt-get update + sudo apt-get install -y cmake make libpcre3-dev + sudo apt-get install -y libgl-dev # missing dependency for using Qt in CMake + + - name: Install clang + run: | + sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14 + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh 22 + sudo apt-get install -y clang-tools-22 + + - name: Install libc++ + if: matrix.stdlib == 'libc++' + run: | + sudo apt-get install -y libc++-22-dev + + - name: Install Qt ${{ env.QT_VERSION }} + uses: jurplel/install-qt-action@v4 + with: + version: ${{ env.QT_VERSION }} + modules: 'qtcharts' + setup-python: 'false' + install-deps: false + cache: true + + - name: Prepare CMake + run: | + cmake -S . -B cmake.output -Werror=dev -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCPPCHK_GLIBCXX_DEBUG=Off -DUSE_MATCHCOMPILER=Off -DEXTERNALS_AS_SYSTEM=On -DUSE_LIBCXX=${{ matrix.use_libcxx }} + env: + CC: clang-22 + CXX: clang++-22 + + - name: Prepare CMake dependencies + run: | + # make sure the auto-generated GUI sources exist + make -C cmake.output autogen + # make sure the precompiled headers exist + #make -C cmake.output/cli cmake_pch.hxx.pch + #make -C cmake.output/gui cmake_pch.hxx.pch + #make -C cmake.output/lib cmake_pch.hxx.pch + #make -C cmake.output/test cmake_pch.hxx.pch + # make sure the auto-generated GUI dependencies exist + make -C cmake.output gui-build-deps + + - name: clang-include-cleaner + run: | + # TODO: run multi-threaded + find $PWD/cli $PWD/lib $PWD/test $PWD/gui -maxdepth 1 -name "*.cpp" | xargs -t -n 1 clang-include-cleaner-22 --print=changes --extra-arg=-w --extra-arg=-stdlib=${{ matrix.stdlib }} -p cmake.output > clang-include-cleaner.log 2>&1 + + - uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: Compilation Database (clang-include-cleaner - ${{ matrix.stdlib }}) + path: ./cmake.output/compile_commands.json + + - uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: Logs (clang-include-cleaner - ${{ matrix.stdlib }}) + path: ./*.log diff --git a/.github/workflows/release-windows-mingw.yml b/.github/workflows/release-windows-mingw.yml new file mode 100644 index 00000000000..3b9b836347f --- /dev/null +++ b/.github/workflows/release-windows-mingw.yml @@ -0,0 +1,69 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: release-windows-mingw + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +defaults: + run: + shell: msys2 {0} + +jobs: + # TODO: add CMake build + build_mingw: + strategy: + matrix: + # only use the latest windows-* as the installed toolchain is identical + os: [windows-2025] + fail-fast: false + + runs-on: ${{ matrix.os }} + + timeout-minutes: 19 # max + 3*std of the last 7K runs + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up MSYS2 + uses: msys2/setup-msys2@v2 + with: + release: false # use pre-installed + # TODO: install mingw-w64-x86_64-make and use mingw32.make instead - currently fails with "Windows Subsystem for Linux has no installed distributions." + install: >- + mingw-w64-x86_64-lld + make + mingw-w64-x86_64-gcc + python + + - name: Build cppcheck + run: | + export PATH="/mingw64/lib/ccache/bin:$PATH" + # set RDYNAMIC to work around broken MinGW detection + make VERBOSE=1 RDYNAMIC=-lshlwapi -j$(nproc) CXXFLAGS=-O2 MATCHCOMPILER=yes cppcheck + + - name: Package + run: | + mkdir cppcheck-mingw + cp cppcheck.exe cppcheck-mingw/ + cp -R cfg platforms cppcheck-mingw/ + cp /mingw64/bin/libgcc_s_seh-1.dll cppcheck-mingw/ + cp /mingw64/bin/libstdc*.dll cppcheck-mingw/ + cp /mingw64/bin/libwinpthread-1.dll cppcheck-mingw/ + + - uses: actions/upload-artifact@v4 + with: + name: cppcheck-mingw + path: cppcheck-mingw diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml new file mode 100644 index 00000000000..bacf32c8eaf --- /dev/null +++ b/.github/workflows/release-windows.yml @@ -0,0 +1,215 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: release-windows + +on: + push: + tags: + - '2.*' + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +permissions: + contents: read + +defaults: + run: + shell: cmd + +jobs: + + build: + + runs-on: windows-2025 + if: ${{ github.repository_owner == 'cppcheck-opensource' }} + + env: + PYTHON_VERSION: 3.14 + # see https://www.pcre.org/original/changelog.txt + PCRE_VERSION: 8.45 + QT_VERSION: 6.10.0 + BOOST_MINOR_VERSION: 89 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + check-latest: true + + - name: Set up Visual Studio environment + uses: ilammy/msvc-dev-cmd@v1 + + - name: Download PCRE + run: | + curl -fsSL https://github.com/pfultz2/pcre/archive/refs/tags/%PCRE_VERSION%.zip -o pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! + + - name: Install PCRE + run: | + @echo on + 7z x pcre-%PCRE_VERSION%.zip || exit /b !errorlevel! + cd pcre-%PCRE_VERSION% || exit /b !errorlevel! + git apply --ignore-space-change ..\externals\pcre.patch || exit /b !errorlevel! + cmake . -A x64 -DPCRE_BUILD_PCRECPP=OFF -DPCRE_BUILD_PCREGREP=OFF -DPCRE_BUILD_TESTS=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel! + msbuild -m PCRE.sln -p:Configuration=Release -p:Platform=x64 || exit /b !errorlevel! + copy pcre.h ..\externals || exit /b !errorlevel! + copy Release\pcre.lib ..\externals\pcre64.lib || exit /b !errorlevel! + + - name: Download Boost + run: | + curl -fsSL https://archives.boost.io/release/1.%BOOST_MINOR_VERSION%.0/source/boost_1_%BOOST_MINOR_VERSION%_0.7z -o boost.zip || exit /b !errorlevel! + + - name: Install Boost + run: | + @echo on + 7z x boost.zip boost_1_%BOOST_MINOR_VERSION%_0/boost || exit /b !errorlevel! + ren boost_1_%BOOST_MINOR_VERSION%_0 boost || exit /b !errorlevel! + + # available modules: https://github.com/miurahr/aqtinstall/blob/master/docs/getting_started.rst#installing-modules + # available tools: https://github.com/miurahr/aqtinstall/blob/master/docs/getting_started.rst#installing-tools + - name: Install Qt + uses: jurplel/install-qt-action@v4 + with: + version: ${{ env.QT_VERSION }} + modules: 'qtcharts' + setup-python: 'false' + tools: 'tools_opensslv3_x64' + + # TODO: build with multiple threads + - name: Build x64 release GUI + run: | + :: TODO: enable rules? + :: specify Release build so matchcompiler is used + cmake -S . -B build -Werror=dev -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=Off -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_ONLINE_HELP=On -DUSE_BOOST=ON -DBOOST_INCLUDEDIR=%GITHUB_WORKSPACE%\boost -DCMAKE_COMPILE_WARNING_AS_ERROR=On || exit /b !errorlevel! + cmake --build build --target cppcheck-gui --config Release || exit /b !errorlevel! + + # TODO: package PDBs + - name: Deploy app + run: | + windeployqt build\bin\Release || exit /b !errorlevel! + del build\bin\Release\cppcheck-gui.ilk || exit /b !errorlevel! + del build\bin\Release\cppcheck-gui.pdb || exit /b !errorlevel! + + - uses: actions/upload-artifact@v4 + with: + name: deploy + path: build\bin\Release + + - name: Matchcompiler + run: python tools\matchcompiler.py --write-dir lib || exit /b !errorlevel! + + # TODO: build with multiple threads + - name: Build CLI x64 release configuration using MSBuild + run: msbuild -m cppcheck.sln -t:cli -p:Configuration=Release-PCRE -p:Platform=x64 -p:HaveBoost=HAVE_BOOST -p:BoostInclude=%GITHUB_WORKSPACE%\boost || exit /b !errorlevel! + env: + _CL_: /WX + + - uses: actions/upload-artifact@v4 + with: + name: bin + path: bin + + - name: Install missing Python packages + run: | + pip install -U pyinstaller || exit /b !errorlevel! + + # TODO: include in installer? + - name: Compile misra.py executable + run: | + cd addons || exit /b !errorlevel! + pyinstaller --hidden-import xml --hidden-import xml.etree --hidden-import xml.etree.ElementTree misra.py || exit /b !errorlevel! + del *.spec || exit /b !errorlevel! + + # TODO: include in installer? + - name: Compile cppcheck-htmlreport executable + run: | + cd htmlreport || exit /b !errorlevel! + pyinstaller cppcheck-htmlreport || exit /b !errorlevel! + del *.spec || exit /b !errorlevel! + + # TODO: test the compiled Python files + + - name: Collect files + run: | + @echo on + move build\bin\Release win_installer\files || exit /b !errorlevel! + copy AUTHORS win_installer\files\authors.txt || exit /b !errorlevel! + copy win_installer\GPLv3.txt win_installer\files\ || exit /b !errorlevel! + copy externals\picojson\LICENSE win_installer\files\picojson-license.txt || exit /b !errorlevel! + copy externals\simplecpp\LICENSE win_installer\files\simplecpp-license.txt || exit /b !errorlevel! + copy externals\tinyxml2\LICENSE win_installer\files\tinyxml2-license.txt || exit /b !errorlevel! + copy addons\dist\misra\*.* win_installer\files\addons || exit /b !errorlevel! + copy bin\cppcheck.exe win_installer\files || exit /b !errorlevel! + copy bin\cppcheck-core.dll win_installer\files || exit /b !errorlevel! + :: mkdir win_installer\files\help || exit /b !errorlevel! + xcopy /s gui\help win_installer\files\help || exit /b !errorlevel! + copy gui\help\online-help.qhc win_installer\files\ || exit /b !errorlevel! + copy gui\help\online-help.qch win_installer\files\ || exit /b !errorlevel! + del win_installer\files\cfg\*.rng || exit /b !errorlevel! + del win_installer\files\platforms\*.rng || exit /b !errorlevel! + del win_installer\files\translations\*.qm || exit /b !errorlevel! + move build\gui\*.qm win_installer\files\translations || exit /b !errorlevel! + copy htmlreport\dist\cppcheck-htmlreport\*.* win_installer\files || exit /b !errorlevel! + :: copy libcrypto-3-x64.dll and libssl-3-x64.dll + copy %RUNNER_WORKSPACE%\Qt\Tools\OpenSSLv3\Win_x64\bin\lib*.dll win_installer\files || exit /b !errorlevel! + + - uses: actions/upload-artifact@v4 + with: + name: collect + path: win_installer\files + + - name: Build Installer + run: | + cd win_installer || exit /b !errorlevel! + :: Read ProductVersion + for /f "tokens=4 delims= " %%a in ('find "ProductVersion" productInfo.wxi') do set PRODUCTVER=%%a + :: Remove double quotes + set PRODUCTVER=%PRODUCTVER:"=% + @echo ProductVersion="%PRODUCTVER%" || exit /b !errorlevel! + msbuild -m cppcheck.wixproj -p:Platform=x64,ProductVersion=%PRODUCTVER%.${{ github.run_number }} || exit /b !errorlevel! + + - uses: actions/upload-artifact@v4 + with: + name: installer + path: win_installer/Build/ + + - name: Clean up deploy + run: | + @echo on + :: del win_installer\files\addons\*.dll || exit /b !errorlevel! + del win_installer\files\addons\*.doxyfile || exit /b !errorlevel! + del win_installer\files\addons\*.md || exit /b !errorlevel! + :: del win_installer\files\addons\*.pyd || exit /b !errorlevel! + :: del win_installer\files\addons\base_library.zip || exit /b !errorlevel! + rmdir /s /q win_installer\files\addons\test || exit /b !errorlevel! + rmdir /s /q win_installer\files\addons\doc || exit /b !errorlevel! + :: rmdir /s /q win_installer\files\bearer || exit /b !errorlevel! + rmdir /s /q win_installer\files\generic || exit /b !errorlevel! + rmdir /s /q win_installer\files\help || exit /b !errorlevel! + rmdir /s /q win_installer\files\iconengines || exit /b !errorlevel! + rmdir /s /q win_installer\files\imageformats || exit /b !errorlevel! + rmdir /s /q win_installer\files\networkinformation || exit /b !errorlevel! + :: rmdir /s /q win_installer\files\printsupport || exit /b !errorlevel! + rmdir /s /q win_installer\files\sqldrivers || exit /b !errorlevel! + rmdir /s /q win_installer\files\tls || exit /b !errorlevel! + ren win_installer\files\translations lang || exit /b !errorlevel! + del win_installer\files\d3dcompiler_47.dll || exit /b !errorlevel! + del win_installer\files\dxcompiler.dll || exit /b !errorlevel! + del win_installer\files\dxil.dll || exit /b !errorlevel! + del win_installer\files\dmake.exe || exit /b !errorlevel! + del win_installer\files\dmake.pdb || exit /b !errorlevel! + :: del win_installer\files\libEGL.dll || exit /b !errorlevel! + :: del win_installer\files\libGLESv2.dll || exit /b !errorlevel! + del win_installer\files\opengl32sw.dll || exit /b !errorlevel! + del win_installer\files\Qt6Svg.dll || exit /b !errorlevel! + del win_installer\files\vc_redist.x64.exe || exit /b !errorlevel! + + - uses: actions/upload-artifact@v4 + with: + name: portable + path: win_installer\files diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml new file mode 100644 index 00000000000..d7ff31939d0 --- /dev/null +++ b/.github/workflows/sanitizers.yml @@ -0,0 +1,168 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: sanitizers + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +jobs: + build: + + strategy: + matrix: + include: + - sanitizer: 'asan' + cmake_opts: '-DANALYZE_ADDRESS=On' + run_ctest: true + inject_executor: 'process' + run_selfcheck: false # TODO: this is currently way too slow (~60 minutes) to enable it + - sanitizer: 'tsan' + cmake_opts: '-DANALYZE_THREAD=On' + run_ctest: false # TODO: test-filelist fails with data race in pthread_cond_destroy + inject_executor: 'thread' + run_selfcheck: false # TODO: disabled for now as it takes around 40 minutes to finish + selfcheck_opts: '--executor=thread --error-exitcode=0' # set --error-exitcode=0 so we only fail on sanitizer issues - since it uses threads for execution it will exit the whole process on the first issue + - sanitizer: 'ubsan' + cmake_opts: '-DANALYZE_UNDEFINED=On' + run_ctest: true + inject_executor: 'process' + run_selfcheck: true + fail-fast: false + + runs-on: ubuntu-22.04 + + env: + QT_VERSION: 6.10.0 + ASAN_OPTIONS: detect_stack_use_after_return=1 + TSAN_OPTIONS: halt_on_error=1 + UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1:report_error_type=1 + # TODO: figure out why there are cache misses with PCH enabled + CCACHE_SLOPPINESS: pch_defines,time_macros + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ github.job }}-${{ matrix.os }}-${{ matrix.sanitizer }} + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.14' + check-latest: true + + - name: Install missing software on ubuntu + run: | + sudo apt-get update + sudo apt-get install -y cmake make libpcre3-dev libboost-container-dev libxml2-utils + sudo apt-get install -y libcups2-dev # required for Qt6PrintSupport in CMake since Qt 6.7.3 + + - name: Install clang + run: | + sudo apt-get purge --auto-remove llvm python3-lldb-14 llvm-14 + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh 22 + + - name: Install Qt ${{ env.QT_VERSION }} + uses: jurplel/install-qt-action@v4 + with: + version: ${{ env.QT_VERSION }} + modules: 'qtcharts' + setup-python: 'false' + cache: true + + - name: Install missing Python packages + run: | + python3 -m pip install pip --upgrade + python3 -m pip install pytest + python3 -m pip install pytest-timeout + python3 -m pip install pytest-xdist + python3 -m pip install psutil + + - name: CMake + run: | + cmake -S . -B cmake.output -Werror=dev -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=On -DWITH_QCHART=On -DBUILD_TRIAGE=On -DUSE_MATCHCOMPILER=Verify ${{ matrix.cmake_opts }} -DENABLE_CHECK_INTERNAL=On -DUSE_BOOST=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_DISABLE_PRECOMPILE_HEADERS=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On -DFILESDIR= -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + env: + CC: clang-22 + CXX: clang++-22 + + - name: Build cppcheck + run: | + cmake --build cmake.output --target cppcheck -- -j $(nproc) + + - name: Build test + run: | + cmake --build cmake.output --target testrunner -- -j $(nproc) + + - name: Build GUI tests + run: | + cmake --build cmake.output --target gui-tests -- -j $(nproc) + + - name: Run tests + run: ./cmake.output/bin/testrunner -t + + - name: Run cfg tests + run: | + cmake --build cmake.output --target checkcfg -- -j $(nproc) + + - name: Run CTest + if: matrix.run_ctest + run: | + ctest --test-dir cmake.output --output-on-failure -j$(nproc) + + - name: Run test/cli + run: | + pwd=$(pwd) + TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv -n auto test/cli + env: + TEST_CPPCHECK_INJECT_EXECUTOR: ${{ matrix.inject_executor }} + + - name: Run test/cli (-j2) + run: | + pwd=$(pwd) + TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv -n auto test/cli + env: + TEST_CPPCHECK_INJECT_J: 2 + + - name: Run test/cli (--clang) + if: false + run: | + pwd=$(pwd) + TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv -n auto test/cli + env: + TEST_CPPCHECK_INJECT_CLANG: clang + + - name: Run test/cli (--cppcheck-build-dir) + run: | + pwd=$(pwd) + TEST_CPPCHECK_EXE_LOOKUP_PATH="$pwd/cmake.output" python3 -m pytest -Werror --strict-markers -vv -n auto test/cli + env: + TEST_CPPCHECK_INJECT_BUILDDIR: injected + + - name: Generate dependencies + if: matrix.run_selfcheck + run: | + # make sure auto-generated GUI files exist + make -C cmake.output autogen + make -C cmake.output gui-build-deps triage-build-ui-deps + + # TODO: only fail the step on sanitizer issues - since we use processes it will only fail the underlying process which will result in an cppcheckError + - name: Self check + if: matrix.run_selfcheck + run: | + ./selfcheck_san.sh ./cmake.output ${{ matrix.selfcheck_opts }} diff --git a/.github/workflows/scriptcheck.yml b/.github/workflows/scriptcheck.yml new file mode 100644 index 00000000000..844b1d5c2f3 --- /dev/null +++ b/.github/workflows/scriptcheck.yml @@ -0,0 +1,222 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: scriptcheck + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ runner.os }} + + - name: Cache Cppcheck + uses: actions/cache@v4 + with: + path: cppcheck + key: ${{ runner.os }}-scriptcheck-cppcheck-${{ github.sha }} + + - name: build cppcheck + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + make -j$(nproc) CXXOPTS="-Werror" + strip -s ./cppcheck + + scriptcheck: + + needs: build + runs-on: ubuntu-22.04 + strategy: + matrix: + python-version: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12', '3.13', '3.14'] + include: + - python-version: '3.14' + python-latest: true + + fail-fast: false + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + # TODO: bailout on error + - name: Restore Cppcheck + uses: actions/cache@v4 + with: + path: cppcheck + key: ${{ runner.os }}-scriptcheck-cppcheck-${{ github.sha }} + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + check-latest: true + + - name: Install missing software on ubuntu + run: | + sudo apt-get update + sudo apt-get install tidy libxml2-utils + + - name: Install missing software on ubuntu (Python 3) + run: | + # shellcheck cannot be installed via pip + # ERROR: Could not find a version that satisfies the requirement shellcheck (from versions: none) + # ERROR: No matching distribution found for shellcheck + sudo apt-get install shellcheck + python -m pip install pip --upgrade + python -m pip install natsort + python -m pip install pexpect + python -m pip install 'pylint<4.1.0' + python -m pip install unittest2 + python -m pip install pytest + python -m pip install pytest-xdist + python -m pip install pygments + python -m pip install requests + python -m pip install psutil + python -m pip install setuptools + + - name: run Shellcheck + if: matrix.python-latest + run: | + find . -name "*.sh" | xargs shellcheck --exclude SC2002,SC2013,SC2034,SC2035,SC2043,SC2046,SC2086,SC2089,SC2090,SC2129,SC2211,SC2231 + + - name: run pylint + if: matrix.python-latest + run: | + shopt -s globstar + pylint --jobs $(nproc) --py-version 3.7 addons/**/*.py htmlreport/cppcheck-htmlreport htmlreport/**/*.py test/**/*.py tools/**/*.py + + - name: check .json files + if: matrix.python-latest + run: | + find . -name '*.json' | xargs -n 1 python -m json.tool > /dev/null + + - name: Validate + if: matrix.python-latest + run: | + make -j$(nproc) validateCFG validatePlatforms validateRules + + - name: check python syntax + run: | + shopt -s globstar + python -m py_compile addons/**/*.py + python -m py_compile htmlreport/cppcheck-htmlreport + python -m py_compile htmlreport/**/*.py + python -m py_compile test/**/*.py + python -m py_compile tools/**/*.py + + - name: compile addons + run: | + python -m compileall ./addons + + - name: test matchcompiler + run: | + python test/tools/test_matchcompiler.py + env: + PYTHONPATH: ./tools + + # TODO: run with "-n auto" when misra_test.py can be run in parallel + # we cannot specify -Werror since xml/etree/ElementTree.py in Python 3.9/3.10 contains an unclosed file + - name: test addons + if: matrix.python-version == '3.9' || matrix.python-version == '3.10' + run: | + python -m pytest --strict-markers -vv -n 1 addons/test + env: + PYTHONPATH: ./addons + + # TODO: run with "-n auto" when misra_test.py can be run in parallel + - name: test addons + if: matrix.python-version != '3.9' && matrix.python-version != '3.10' + run: | + python -m pytest -Werror --strict-markers -vv -n 1 addons/test + env: + PYTHONPATH: ./addons + + - name: test htmlreport (standalone) + run: | + test/tools/htmlreport/test_htmlreport.py + test/tools/htmlreport/check.sh + + - name: test htmlreport (pip) + run: | + python -m venv venv + source venv/bin/activate + python -m pip install -U pip + pip install ./htmlreport/ + which cppcheck-htmlreport + PIP_PACKAGE_TEST=1 test/tools/htmlreport/test_htmlreport.py + # TODO: does not test the pip binary + test/tools/htmlreport/check.sh + + - name: test reduce + run: | + python -m pytest -Werror --strict-markers -vv test/tools/reduce_test.py + env: + PYTHONPATH: ./tools + + - name: test donate_cpu_lib + run: | + python -m pytest -Werror --strict-markers -vv test/tools/donate_cpu_lib_test.py + env: + PYTHONPATH: ./tools + + - name: test donate_cpu_server + run: | + python -m pytest -Werror --strict-markers -vv test/tools/donate_cpu_server_test.py + # TODO: why is this file generated? also should be in a temporary folder if possible + rm -f test/tools/donate-cpu-server.log + env: + PYTHONPATH: ./tools + + - name: Show all ignored files + if: false # TODO: currently lists all the contents of ignored folders - we only need what actually matched + run: | + git ls-files --others --ignored --exclude-standard + + - name: Check for changed and unversioned files + run: | + # TODO: how to do this with a single command? + git status --ignored=no + git status --ignored=no | grep -q 'working tree clean' + + dmake: + strategy: + matrix: + os: [ubuntu-22.04, macos-15, windows-2025] + fail-fast: false + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: run dmake + run: | + make -j3 CXXOPTS="-Werror" run-dmake + + - name: check diff + run: | + git diff --exit-code diff --git a/.github/workflows/selfcheck.yml b/.github/workflows/selfcheck.yml new file mode 100644 index 00000000000..cfd1107e92d --- /dev/null +++ b/.github/workflows/selfcheck.yml @@ -0,0 +1,217 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: selfcheck + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-22.04 + + env: + QT_VERSION: 6.10.0 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ runner.os }} + + - name: Install missing software + run: | + sudo apt-get update + sudo apt-get install clang-14 + sudo apt-get install libboost-container-dev + sudo apt-get install valgrind + sudo apt-get install -y libgl-dev # fixes missing dependency for Qt in CMake + + - name: Install Qt ${{ env.QT_VERSION }} + uses: jurplel/install-qt-action@v4 + with: + version: ${{ env.QT_VERSION }} + modules: 'qtcharts' + setup-python: 'false' + install-deps: false + cache: true + + # TODO: cache this - perform same build as for the other self check + - name: Self check (build) + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + # valgrind cannot handle DWARF 5 yet so force version 4 + # work around performance regression with -inline-deferral + make -j$(nproc) CXXOPTS="-Werror -O2 -gdwarf-4" CPPOPTS="-DHAVE_BOOST -mllvm -inline-deferral" MATCHCOMPILER=yes CPPCHK_GLIBCXX_DEBUG= + env: + CC: clang-14 + CXX: clang++-14 + + # unusedFunction - start + - name: CMake + run: | + cmake -S . -B cmake.output -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=On -DBUILD_GUI=ON -DWITH_QCHART=ON -DBUILD_TRIAGE=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On -DCPPCHK_GLIBCXX_DEBUG=Off + + - name: Generate dependencies + run: | + # make sure auto-generated GUI files exist + make -C cmake.output autogen + # make sure the precompiled headers exist + make -C cmake.output lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx + make -C cmake.output test/CMakeFiles/testrunner.dir/cmake_pch.hxx.cxx + # make sure the auto-generated GUI dependencies exist + make -C cmake.output gui-build-deps + + - name: Self check (unusedFunction) + if: false # TODO: fails with preprocessorErrorDirective - see #10667 + run: | + ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__CPPCHECK__ -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr + env: + DISABLE_VALUEFLOW: 1 + UNUSEDFUNCTION_ONLY: 1 + # unusedFunction - end + + # the following steps are duplicated from above since setting up the build node in a parallel step takes longer than the actual steps + + # unusedFunction notest - start + - name: CMake (no test) + run: | + cmake -S . -B cmake.output.notest -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=Off -DBUILD_GUI=ON -DBUILD_TRIAGE=On -DWITH_QCHART=ON -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On -DCPPCHK_GLIBCXX_DEBUG=Off + + - name: Generate dependencies (no test) + run: | + # make sure auto-generated GUI files exist + make -C cmake.output.notest autogen + # make sure the precompiled headers exist + make -C cmake.output.notest lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx + # make sure the auto-generated GUI dependencies exist + make -C cmake.output.notest gui-build-deps + + - name: Self check (unusedFunction / no test) + run: | + ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__CPPCHECK__ -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output.notest/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr + env: + DISABLE_VALUEFLOW: 1 + UNUSEDFUNCTION_ONLY: 1 + # unusedFunction notest - end + + # unusedFunction notest nogui - start + - name: CMake (no test / no gui) + run: | + cmake -S . -B cmake.output.notest_nogui -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=Off -DENABLE_CHECK_INTERNAL=On -DCPPCHK_GLIBCXX_DEBUG=Off + + - name: Generate dependencies (no test / no gui) + run: | + # make sure the precompiled headers exist + make -C cmake.output.notest_nogui lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx + + - name: Self check (unusedFunction / no test / no gui) + run: | + supprs="--suppress=unusedFunction:lib/errorlogger.h:197 --suppress=unusedFunction:lib/importproject.cpp:1665 --suppress=unusedFunction:lib/importproject.cpp:1689" + ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib -D__CPPCHECK__ -D__GNUC__ --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output.notest_nogui/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr $supprs + env: + DISABLE_VALUEFLOW: 1 + UNUSEDFUNCTION_ONLY: 1 + # unusedFunction notest nogui - end + + # unusedFunction notest nocli - start + - name: CMake (no test / no cli) + run: | + cmake -S . -B cmake.output.notest_nocli -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=Off -DBUILD_CLI=Off -DBUILD_GUI=ON -DWITH_QCHART=ON -DBUILD_TRIAGE=On -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On -DCPPCHK_GLIBCXX_DEBUG=Off + + - name: Generate dependencies (no test / no cli) + run: | + # make sure auto-generated GUI files exist + make -C cmake.output.notest_nocli autogen + # make sure the precompiled headers exist + make -C cmake.output.notest_nocli lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx + # make sure the auto-generated GUI dependencies exist + make -C cmake.output.notest_nocli gui-build-deps + + - name: Self check (unusedFunction / no test / no cli) + if: false # TODO: the findings are currently too intrusive + run: | + ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__CPPCHECK__ -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output.notest_nocli/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr + env: + DISABLE_VALUEFLOW: 1 + UNUSEDFUNCTION_ONLY: 1 + # unusedFunction notest nocli - end + + # unusedFunction notest nocli nogui - start + - name: CMake (no test / no cli / no gui) + run: | + cmake -S . -B cmake.output.notest_nocli_nogui -Werror=dev -DHAVE_RULES=On -DBUILD_TESTING=Off -DBUILD_CLI=Off -DBUILD_GUI=Off -DENABLE_CHECK_INTERNAL=On -DCPPCHK_GLIBCXX_DEBUG=Off + + - name: Generate dependencies (no test / no cli / no gui) + run: | + # make sure the precompiled headers exist + make -C cmake.output.notest_nocli_nogui lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx.cxx + + - name: Self check (unusedFunction / no test / no cli / no gui) + if: false # TODO: the findings are currently too intrusive + run: | + ./cppcheck -q --template=selfcheck --error-exitcode=1 --library=cppcheck-lib --library=qt -D__CPPCHECK__ -D__GNUC__ --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output.notest_nocli_nogui/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr + env: + DISABLE_VALUEFLOW: 1 + UNUSEDFUNCTION_ONLY: 1 + # unusedFunction notest nocli nogui - end + + - name: Fetch corpus + run: | + wget https://github.com/cppcheck-opensource/cppcheck/archive/refs/tags/2.8.tar.gz + tar xvf 2.8.tar.gz + + - name: CMake (corpus / no test) + run: | + cmake -S cppcheck-2.8 -B cmake.output.corpus -DHAVE_RULES=On -DBUILD_TESTING=Off -DBUILD_GUI=ON -DUSE_QT6=On -DWITH_QCHART=ON -DENABLE_CHECK_INTERNAL=On -DCMAKE_GLOBAL_AUTOGEN_TARGET=On -DDISABLE_DMAKE=On -DCPPCHK_GLIBCXX_DEBUG=Off -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + + - name: Generate dependencies (corpus) + run: | + # make sure auto-generated GUI files exist + make -C cmake.output.corpus autogen + # make sure the precompiled headers exist + make -C cmake.output.corpus lib/CMakeFiles/lib_objs.dir/cmake_pch.hxx.cxx + # make sure the auto-generated GUI dependencies exist + make -C cmake.output.corpus gui-build-deps + + - name: Self check (unusedFunction / corpus / no test / callgrind) + run: | + # TODO: fix -rp so the suppressions actually work + valgrind --tool=callgrind ./cppcheck --template=selfcheck --error-exitcode=0 --library=cppcheck-lib --library=qt -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output.corpus/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr 2>callgrind.log || (cat callgrind.log && false) + cat callgrind.log + callgrind_annotate --auto=no > callgrind.annotated.log + head -50 callgrind.annotated.log + env: + DISABLE_VALUEFLOW: 1 + + - uses: actions/upload-artifact@v4 + with: + name: Callgrind Output + path: ./callgrind.* + + - name: Self check (unusedFunction / corpus / no test / memcheck) + run: | + # TODO: fix -rp so the suppressions actually work + valgrind --error-limit=yes --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --gen-suppressions=all --log-fd=9 --error-exitcode=42 ./cppcheck --template=selfcheck --error-exitcode=0 --library=cppcheck-lib --library=qt -D__GNUC__ -DQT_VERSION=0x060000 -DQ_MOC_OUTPUT_REVISION=69 -DQT_CHARTS_LIB -DQT_MOC_HAS_STRINGDATA --enable=unusedFunction,information --exception-handling -rp=. --project=cmake.output.corpus/compile_commands.json --suppressions-list=.selfcheck_unused_suppressions --inline-suppr 9>memcheck.log || (cat memcheck.log && false) + cat memcheck.log + env: + DISABLE_VALUEFLOW: 1 + + - uses: actions/upload-artifact@v4 + with: + name: Memcheck Output + path: ./memcheck.* diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml new file mode 100644 index 00000000000..3e4a02dbb48 --- /dev/null +++ b/.github/workflows/valgrind.yml @@ -0,0 +1,71 @@ +# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners +name: valgrind + +on: + push: + branches: + - 'main' + - 'releases/**' + - '2.*' + tags: + - '2.*' + pull_request: + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }}-${{ runner.os }} + + - name: Install missing software + run: | + sudo apt-get update + sudo apt-get install libxml2-utils + sudo apt-get install valgrind + sudo apt-get install libboost-container-dev + sudo apt-get install debuginfod + + - name: Build cppcheck + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + make -j$(nproc) CXXOPTS="-Werror -O1 -g" CPPOPTS="-DHAVE_BOOST" HAVE_RULES=yes MATCHCOMPILER=yes CPPCHK_GLIBCXX_DEBUG= + + - name: Build test + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + make -j$(nproc) CXXOPTS="-Werror -O1 -g" CPPOPTS="-DHAVE_BOOST" HAVE_RULES=yes MATCHCOMPILER=yes CPPCHK_GLIBCXX_DEBUG= testrunner + + - name: Run valgrind + run: | + ec=0 + # disabled all tests invoking processes because the child processes fail with still reachable memory. + # some of the TestProcessExecutor* tests are also extremely slow. + excluded_tests="TestProcessExecutorFS \ + TestProcessExecutorFiles \ + TestSuppressions::suppressionsSettingsProcessesFiles \ + TestSuppressions::suppressionsSettingsProcessesFS" + valgrind --error-limit=yes --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --suppressions=valgrind/testrunner.supp --gen-suppressions=all -s --log-fd=9 --error-exitcode=42 ./testrunner -t -x $excluded_tests 9>memcheck.log || ec=1 + cat memcheck.log + exit $ec + # TODO: debuginfod.ubuntu.com is currently not responding to any requests causing it to run into a 40(!) minute timeout + #env: + # DEBUGINFOD_URLS: https://debuginfod.ubuntu.com + + - uses: actions/upload-artifact@v4 + if: success() || failure() + with: + name: Logs + path: ./*.log diff --git a/.gitignore b/.gitignore index 6f31b8bfd63..434203fe2a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,56 +1,130 @@ -cppcheck -cppcheck.exe -testrunner -testrunner.exe -*.o *.bak *.gcno -tools/dmake -tools/extracttests -dmake +*.gch +*.o +*.pyc +/cppcheck +/cppcheck.exe +cppcheck-core.dll +/dmake +/dmake.exe +reduce +reduce.exe +tags +/testrunner +/testrunner.exe +tools/daca2*.html tools/errmsg +tools/extracttests +.DS_Store + +# dump files generated by Cppcheck +*.*.dump + +# CTU info files generated by Cppcheck +*.*.ctu-info + # VS generated files -*.obj +*.aps +*.idb *.ncb +*.obj +*.opensdf +*.orig +*.pdb +*.sdf *.suo *.user -*.idb -*.pdb +/.vs/ +UpgradeLog*.htm + # VS build folders +bin/ Build/ BuildTmp/ +/cli/temp/ +ipch/ +/lib/temp/ +/test/temp/ + # XCode build folders and files -build/ -*.pbxuser *.mode[0-9]v[0-9] -# GUI build folders -gui/debug/ -gui/release/ -gui/temp/ +*.pbxuser +build/ + # Other (generated) GUI files -gui/Makefile -gui/Makefile.debug -gui/Makefile.release -gui/gui.sln -gui/gui.vcproj -gui/cppcheck-gui -gui/qrc_gui.cpp -gui/*.qm +/gui/help/online-help.qch +/gui/help/online-help.qhc + # Doxygen output folder doxyoutput/ -# qmake generated # Backup files and stuff from patches -*.orig *.rej *~ # kdevelop 4.x *.kdev4 -*.sdf -ipch -*.opensdf -*.orig +# Common cmake build directories +build**/ -tags +# Temporal files +*.swp + +# Snapcraft build +part +prime +parts +stage +*.snap +/snap/.snapcraft + +# Manual folder +/man/manual.log +/man/manual.tex +/man/*.pdf +/man/*.html + +# CLion +/.idea +/.metadata/ +/cmake-build-* +/.run + +# clang tooling temporary files +/.clangd/ +/.cache/ +/compile_commands.json + +#vs code +/.vscode + +# fuzzing output +/oss-fuzz/corpus +/oss-fuzz/corpus_ +/oss-fuzz/samples + +# Python +/.venv/ +/venv/ +**/*.egg-info/ + +# cppcheck-htmlreport auto files +/htmlreport/cppcheck_htmlreport/run.py + +# GDB configuration +.gdbinit + +# pyinstaller output +/addons/dist +/addons/misra.spec +/htmlreport/cppcheck-htmlreport.spec +/htmlreport/dist + +# ccache folder in CI +/.ccache + +# PCRE Windows files +/externals/pcre.h +/externals/pcre64.lib diff --git a/.mailmap b/.mailmap new file mode 100644 index 00000000000..6f42f4e47d5 --- /dev/null +++ b/.mailmap @@ -0,0 +1,49 @@ +Andreas Bießmann +Andrew Martin acm4me +Ankita Gupta Ankita-gupta +Benjamin Goose +Daniel Marjamäki +Daniel Marjamäki +Daniel Marjamäki Daniel Marjam�ki +Daniel Marjamäki +Daniel Marjamäki +Deepak Gupta deepak gupta +Ettl Martin Martin Ettl +Ettl Martin +Ettl Martin Martin Ettl +Frank Zingsheim +Gianluca Scacco +Gianluca Scacco +Henrik Nilsson +Kimmo Varis Kimmo varis +Kimmo Varis +Kimmo Varis +Kimmo Varis +Kimmo Varis +Kimmo Varis +Kimmo Varis +Leandro Penz Leandro Lisboa Penz +Leandro Penz Leandro Lisboa Penz +makulik unknown +Nicolas Le Cam +Pete Johns +PKEuS Philipp K +PKEuS Philipp Kloke +PKEuS +Reijo Tomperi +Robert Reif +Ryan Pavlik + +Sébastien Debrard seb777 +Sébastien Debrard S�bastien Debrard +Sébastien Debrard Debrard Sébastien + +Stefan Weil +Tim Gerundt +Vesa Pikki +XhmikosR +Zachary Blair +Zachary Blair +Zachary Blair zblair + + diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 00000000000..0ca3480c06f --- /dev/null +++ b/.pylintrc @@ -0,0 +1,65 @@ +[MESSAGES CONTROL] +disable= + # W start + redefined-builtin, + broad-exception-caught, + fixme, + bare-except, + redefined-outer-name, + attribute-defined-outside-init, + unspecified-encoding, + global-statement, + protected-access, + broad-exception-raised, + subprocess-popen-preexec-fn, + logging-not-lazy, + unknown-option-value, + unused-wildcard-import, + wildcard-import, + unused-argument, + pointless-string-statement, + arguments-renamed, + duplicate-string-formatting-argument, + # C start + consider-using-f-string, + invalid-name, + line-too-long, + missing-module-docstring, + missing-function-docstring, + import-outside-toplevel, + missing-class-docstring, + superfluous-parens, + too-many-lines, + trailing-newlines, + missing-final-newline, + use-implicit-booleaness-not-len, + wrong-import-order, + use-implicit-booleaness-not-comparison, + consider-using-enumerate, + unnecessary-lambda-assignment, + consider-using-dict-items, + consider-iterating-dictionary, + # R start + duplicate-code, + consider-using-with, + too-many-statements, + too-many-branches, + too-many-locals, + too-many-arguments, + too-few-public-methods, + too-many-return-statements, + consider-using-in, + too-many-nested-blocks, + too-many-public-methods, + chained-comparison, + too-many-instance-attributes, + too-many-boolean-expressions, + use-a-generator, + too-many-positional-arguments +[REPORTS] +reports=no +[TYPECHECK] +# See https://stackoverflow.com/questions/10300082/how-to-prevent-python-pylint-complaining-about-socket-class-sendall-method +ignored-classes=SQLObject,_socketobject +[MASTER] +init-hook='import sys; sys.path.append("./addons")' diff --git a/.selfcheck_suppressions b/.selfcheck_suppressions new file mode 100644 index 00000000000..1687753c268 --- /dev/null +++ b/.selfcheck_suppressions @@ -0,0 +1,82 @@ +missingIncludeSystem +# should not be reported - see #13387 +checkersReport + +# warnings in Qt generated code we cannot fix +funcArgNamesDifferentUnnamed:*/moc_aboutdialog.cpp +funcArgNamesDifferentUnnamed:*/moc_applicationdialog.cpp +funcArgNamesDifferentUnnamed:*/moc_applicationlist.cpp +funcArgNamesDifferent:*/moc_checkthread.cpp +funcArgNamesDifferentUnnamed:*/moc_checkthread.cpp +funcArgNamesDifferentUnnamed:*/moc_codeeditor.cpp +funcArgNamesDifferent:*/moc_codeeditstylecontrols.cpp +funcArgNamesDifferentUnnamed:*/moc_codeeditstylecontrols.cpp +funcArgNamesDifferentUnnamed:*/moc_compliancereportdialog.cpp +funcArgNamesDifferentUnnamed:*/moc_codeeditstyledialog.cpp +funcArgNamesDifferentUnnamed:*/moc_fileviewdialog.cpp +funcArgNamesDifferentUnnamed:*/moc_helpdialog.cpp +funcArgNamesDifferentUnnamed:*/moc_libraryaddfunctiondialog.cpp +funcArgNamesDifferentUnnamed:*/moc_librarydialog.cpp +funcArgNamesDifferentUnnamed:*/moc_libraryeditargdialog.cpp +funcArgNamesDifferentUnnamed:*/moc_mainwindow.cpp +funcArgNamesDifferentUnnamed:*/moc_newsuppressiondialog.cpp +funcArgNamesDifferentUnnamed:*/moc_platforms.cpp +funcArgNamesDifferentUnnamed:*/moc_projectfile.cpp +funcArgNamesDifferentUnnamed:*/moc_projectfiledialog.cpp +funcArgNamesDifferent:*/moc_resultstree.cpp +funcArgNamesDifferentUnnamed:*/moc_resultstree.cpp +funcArgNamesDifferent:*/moc_resultsview.cpp +funcArgNamesDifferentUnnamed:*/moc_resultsview.cpp +funcArgNamesDifferentUnnamed:*/moc_scratchpad.cpp +funcArgNamesDifferentUnnamed:*/moc_settingsdialog.cpp +funcArgNamesDifferentUnnamed:*/moc_statsdialog.cpp +funcArgNamesDifferentUnnamed:*/moc_testcppchecklibrarydata.cpp +funcArgNamesDifferentUnnamed:*/moc_testfilelist.cpp +funcArgNamesDifferentUnnamed:*/moc_testprojectfile.cpp +funcArgNamesDifferentUnnamed:*/moc_testresultstree.cpp +funcArgNamesDifferentUnnamed:*/moc_testtranslationhandler.cpp +funcArgNamesDifferentUnnamed:*/moc_testxmlreportv2.cpp +funcArgNamesDifferentUnnamed:*/moc_threaddetails.cpp +funcArgNamesDifferent:*/moc_threadhandler.cpp +funcArgNamesDifferentUnnamed:*/moc_threadhandler.cpp +funcArgNamesDifferent:*/moc_threadresult.cpp +funcArgNamesDifferentUnnamed:*/moc_threadresult.cpp +funcArgNamesDifferentUnnamed:*/moc_translationhandler.cpp +funcArgNamesDifferentUnnamed:*/moc_txtreport.cpp +naming-varname:*/gui/ui_*.h +functionStatic:*/gui/ui_*.h + +# --debug-warnings suppressions +valueFlowBailout +valueFlowBailoutIncompleteVar +valueFlowMaxIterations:gui/resultstree.cpp +autoNoType:externals/simplecpp/simplecpp.cpp +autoNoType:cli/*.cpp +autoNoType:lib/*.cpp +autoNoType:lib/library.h +autoNoType:gui/*.cpp +autoNoType:test/*.cpp +autoNoType:tools/triage/mainwindow.cpp +# ticket 11631 +templateInstantiation:test/testutils.cpp + +naming-varname:externals/simplecpp/simplecpp.h +naming-privateMemberVariable:externals/simplecpp/simplecpp.h + +# TODO: these warnings need to be addressed upstream +uninitMemberVar:externals/tinyxml2/tinyxml2.h +noExplicitConstructor:externals/tinyxml2/tinyxml2.h +missingOverride:externals/tinyxml2/tinyxml2.h +invalidPrintfArgType_sint:externals/tinyxml2/tinyxml2.h +naming-privateMemberVariable:externals/tinyxml2/tinyxml2.h +functionStatic:externals/tinyxml2/tinyxml2.cpp +funcArgNamesDifferent:externals/tinyxml2/tinyxml2.cpp +funcArgNamesDifferentUnnamed:externals/tinyxml2/tinyxml2.cpp +funcArgNamesDifferentUnnamed:externals/tinyxml2/tinyxml2.h +nullPointerRedundantCheck:externals/tinyxml2/tinyxml2.cpp +knownConditionTrueFalse:externals/tinyxml2/tinyxml2.cpp +useStlAlgorithm:externals/simplecpp/simplecpp.cpp +funcArgNamesDifferentUnnamed:externals/simplecpp/simplecpp.h +missingMemberCopy:externals/simplecpp/simplecpp.h +shadowFunction:externals/simplecpp/simplecpp.cpp +shadowFunction:externals/simplecpp/simplecpp.h diff --git a/.selfcheck_unused_suppressions b/.selfcheck_unused_suppressions new file mode 100644 index 00000000000..5da7c225dfa --- /dev/null +++ b/.selfcheck_unused_suppressions @@ -0,0 +1,8 @@ +# should not be reported - see #13387 +checkersReport + +# we are not using all methods of their interfaces +unusedFunction:externals/*/* + +# Q_OBJECT functions which are not called in our code +unusedFunction:cmake.output.notest/gui/cppcheck-gui_autogen/*/moc_aboutdialog.cpp diff --git a/.uncrustify.cfg b/.uncrustify.cfg new file mode 100644 index 00000000000..81722ff7249 --- /dev/null +++ b/.uncrustify.cfg @@ -0,0 +1,170 @@ +# Uncrustify-0.80.1_f + +# The original size of tabs in the input. +# +# Default: 8 +input_tab_size = 4 # unsigned number + +# The size of tabs in the output (only used if align_with_tabs=true). +# +# Default: 8 +output_tab_size = 4 # unsigned number + +# Add or remove space between 'while' and '('. +sp_while_paren_open = add # ignore/add/remove/force + +# Add or remove space around boolean operators '&&' and '||'. +sp_bool = force # ignore/add/remove/force + +# Add or remove space inside '(' and ')'. +sp_inside_paren = remove # ignore/add/remove/force + +# Add or remove space between nested parentheses, i.e. '((' vs. ') )'. +sp_paren_paren = remove # ignore/add/remove/force + +# Add or remove space between ')' and '{'. +sp_paren_brace = force # ignore/add/remove/force + +# Add or remove space between pointer stars '*'. +sp_between_ptr_star = remove # ignore/add/remove/force + +# Add or remove space before '<'. +sp_before_angle = remove # ignore/add/remove/force + +# Add or remove space inside '<' and '>'. +sp_inside_angle = remove # ignore/add/remove/force + +# Add or remove space after '>'. +sp_after_angle = add # ignore/add/remove/force + +# Add or remove space between '>' and '(' as found in 'new List(foo);'. +sp_angle_paren = remove # ignore/add/remove/force + +# Add or remove space between '>' and a word as in 'List m;' or +# 'template static ...'. +sp_angle_word = add # ignore/add/remove/force + +# Add or remove space between '>' and '>' in '>>' (template stuff). +# +# Default: add +sp_angle_shift = ignore # ignore/add/remove/force + +# (C++11) Permit removal of the space between '>>' in 'foo >'. Note +# that sp_angle_shift cannot remove the space without this option. +sp_permit_cpp11_shift = true # true/false + +# Add or remove space before '(' of control statements ('if', 'for', 'switch', +# 'while', etc.). +sp_before_sparen = force # ignore/add/remove/force + +# Add or remove space inside '(' and ')' of control statements. +sp_inside_sparen = remove # ignore/add/remove/force + +# Add or remove space after ')' of control statements. +sp_after_sparen = force # ignore/add/remove/force + +# Add or remove space between ')' and '{' of of control statements. +sp_sparen_brace = force # ignore/add/remove/force + +# Add or remove space before ';' in non-empty 'for' statements. +sp_before_semi_for = remove # ignore/add/remove/force + +# Add or remove space after the final semicolon of an empty part of a for +# statement, as in 'for ( ; ; )'. +sp_after_semi_for_empty = remove # ignore/add/remove/force + +# Add or remove space before '[]'. +sp_before_squares = remove # ignore/add/remove/force + +# Add or remove space before C++17 structured bindings. +sp_cpp_before_struct_binding = ignore # ignore/add/remove/force + +# Add or remove space inside a non-empty '[' and ']'. +sp_inside_square = remove # ignore/add/remove/force + +# Add or remove space after class ':'. +sp_after_class_colon = force # ignore/add/remove/force + +# Add or remove space before class ':'. +sp_before_class_colon = force # ignore/add/remove/force + +# Add or remove space inside '{}'. +sp_inside_braces_empty = remove # ignore/add/remove/force + +# Add or remove space between 'else' and '{' if on the same line. +sp_else_brace = force # ignore/add/remove/force + +# Add or remove space between '}' and 'else' if on the same line. +sp_brace_else = force # ignore/add/remove/force + +# Add or remove space before the '{' of a 'catch' statement, if the '{' and +# 'catch' are on the same line, as in 'catch (decl) {'. +sp_catch_brace = force # ignore/add/remove/force + +# Add or remove space between '}' and 'catch' if on the same line. +sp_brace_catch = force # ignore/add/remove/force + +# The number of columns to indent per level. Usually 2, 3, 4, or 8. +# +# Default: 8 +indent_columns = 4 # unsigned number + +# How to use tabs when indenting code. +# +# 0: Spaces only +# 1: Indent with tabs to brace level, align with spaces (default) +# 2: Indent and align with tabs, using spaces when not on a tabstop +# +# Default: 1 +indent_with_tabs = 0 # unsigned number + +# Whether to indent the body of a 'namespace'. +indent_namespace = true # true/false + +# Whether the 'class' body is indented. +indent_class = true # true/false + +# How to indent access specifiers that are followed by a +# colon. +# +# >0: Absolute column where 1 is the leftmost column +# <=0: Subtract from brace indent +# +# Default: 1 +indent_access_spec = -4 # number + +# Whether to collapse empty blocks between '{' and '}' except for functions. +# Use nl_collapse_empty_body_functions to specify how empty function braces +# should be formatted. +nl_collapse_empty_body = true # true/false + +# Whether to collapse empty blocks between '{' and '}' for functions only. +# If true, overrides nl_inside_empty_func. +nl_collapse_empty_body_functions = true # true/false + +# Whether to convert all tabs to spaces in comments. If false, tabs in +# comments are left alone, unless used for indenting. +cmt_convert_tab_to_spaces = true # true/false + +# An offset value that controls the indentation of the body of a multiline #define. +# 'body' refers to all the lines of a multiline #define except the first line. +# Requires 'pp_ignore_define_body = false'. +# +# <0: Absolute column: the body indentation starts off at the specified column +# (ex. -3 ==> the body is indented starting from column 3) +# >=0: Relative to the column of the '#' of '#define' +# (ex. 3 ==> the body is indented starting 3 columns at the right of '#') +# +# Default: 8 +pp_multiline_define_body_indent = 4 # number + +# The value might be used twice: +# - at the assignment +# - at the opening brace +# +# To prevent the double use of the indentation value, use this option with the +# value 'true'. +# +# true: indentation will be used only once +# false: indentation will be used every time (default) +indent_cpp_lambda_only_once = true # true/false diff --git a/AUTHORS b/AUTHORS index be057262f07..04cff0891a9 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,23 +1,451 @@ The cppcheck team, in alphabetical order: +0x41head +Abhijit Sawant +Abhishek Bharadwaj +Abigail Buccaneer +Adam J Richter +Adrien Chardon +Ahti Legonkov +Akhilesh Nema +Akio Idehara +Albert Aribaud +Aleksandr Pikalev +Aleksey Palazhchenko +Alexander Alekseev +Alexander Festini +Alexander Gushchin +Alexander Mai +Alexander Tkachev +Alexandre Chouvellon +Alexey Eryomenko +Alexey Zhikhartsev +Alfi Maulana +Ali Can Demiralp +Allen Winter +Alon Alexander +Alon Liberman +Ameen Ali +Andreas Bacher +Andreas Bießmann +Andreas Grob +Andreas Lutsch +Andreas Pokorny +Andreas Rönnquist +Andreas Vollenweider +Andrei Karas +Andrew C Aitchison +Andrew C. Martin +Andrew D. Bancroft +Andy Holmes +Andy Maloney +Andy Mac Gregor +Aneesh Azhakesan S +Ankita Gupta +anoymouserver +Anton Lindqvist +Antti Tuppurainen +Anurag Garg +Armin Müller +Arpit Chaudhary +Artemis Meursault Gerrard +August Sodora +Ayaz Salikhov +Balázs Tóth +Baris Demiray +Bart vdr. Meulen +Bartlomiej Grzeskowiak +bbennetts +Benjamin Bannier +Benjamin Fovet +Benjamin Goose +Benjamin Kramer +Benjamin Woester +Benjamin Wolsey +Ben T +Bernd Buschinski Bill Egert +Björge Dijkstra +Björn Blissing +booga +Boris Barbulovski +Boris Egorov +Boussaffa Walid +Bo Rydberg +bzgec +Carl Michael Grüner Monzón +Carl Morgan +Carlo Marcelo Arenas Belón +Carlos Gomes Martinho +Carl-Oskar Larsson +Cary Converse +Cary R +Caspar Kielwein +Changkyoon Kim +Chris Lalancette +Christian Ehrlicher +Christian Franke +Christian Göttsche +Christoph Grüninger +Christoph Schmidt +Christoph Strehle +Chuck Larson +Cilyan Olowen +Claus Jensby Madsen +Colomban Wendling +Conrado Gouvea +daisuke-chiba +Daniel Friedrich +David Korczynski Daniel Marjamäki +David Hallas +David Korth +Dávid Slivka +Debrard Sebastien +Deepak Gupta +Degen's Regens +dencat +Devansh Varshney +Diego de las Heras +Dirk Jagdmann +Dirk Mueller +Dmitriy +Dmitry Marakasov +Dmitry-Me +dsamo +Duraffort Edoardo Prezioso +Eivind Tagseth +Elbert Pol +Emmanuel Blot +Eric Lemanissier +Eric Malenfant +Eric Sesterhenn +Erik Hovland +Erik Lax +Ettl Martin +Even Rouault +Evgeny Mandrikov +feelamee +Felipe Pena +Felix Faber +Felix Geyer +Felix Passenberg +Felix Wolff +Florian Mueller +Florin Iucha +flovent +Francesc Elies +François Berder +Frank Winklmeier +Frank Zingsheim +Frederik Schwarzer +fu7mu4 +Gaël Bonithon +Galimov Albert +Garrett Bodily +Gary Leutheuser +gaurav kaushik +Gennady Feldman +Georgi D. Sotirov +Georgy Komarov +Gerbo Engels +Gerhard Zlabinger +Gerik Rhoden +Gianfranco Costamagna Gianluca Scacco +Gleydson Soares +Goncalo Mao-Cheia +Goran Džaferi +Graham Whitted Greg Hewgill +Guillaume A. +Guillaume Chauvel +Guillaume Miossec +Gustav Palmqvist +Günther Makulik +Haowei Hsu +Harald Scheidl +Heiko Bauke +Heiko Eißfeldt +Heinrich Schuchardt +Henrik Nilsson +He Yuqi Hoang Tuan Su +Igor Rondarev +Igor Zhukov +Ilya Shipitsin +Ivan Maidanski +Iván Matellanes +Ivan Ryabov +Ivar Bonsaksen +Jakub Melka +Jan Egil Ruud +Jan Hellwig +János Maros +Jay Sigbrandt +Jedrzej Klocek +Jens Bäckman +Jens Yllman +Jérémy Lefaure +Jes Ramsing +Jesse Boswell +Jim Kuhn +Jim Zhou +jlguardi +Joel Johnson +Johan Bertrand +Johan Crone +Johan Samuelson +John Marshall +John-Paul Ore +John Smits +Jonathan Clohessy +Jonathan Haehne +Jonathan Neuschäfer +Jonathan Thackray +José Martins +Jose Roquette +Joshua Beck +Joshua Rogers +Julian Santander +Julien Marrec +Julien Peyregne +Jure Menart +Jussi Lehtola +Jørgen Kvalsvik +Kamil Dudka +Kartik Bajaj +Kefu Chai +keinflue +Ken-Patrick Lehrmann +Ketil Skjerve +Kevin Christian +Kevin Kendzia Kimmo Varis -Leandro Penz +Kitsios Konstantinos +Kleber Tarcísio +Konrad Grochowski +Konrad Windszus +Kumar Ashwani +Kushal Chandar +Kyle Chisholm +Lars Even Almaas +larudwer +Lau bakman +Lauri Nurmi +Leander Schulten +Leandro Lisboa Penz +Leila F. Rahman +Lena Herscheid +Leon De Andrade +Lieven de Cock +lioncash +Lionel Gimbert +Lucas Manuel Rodriguez +Ludvig Gunne Lindström +Luis Díaz Más +Luís Pereira +Lukas Grützmacher +Lukas Hiesmayr +Lukasz Czajczyk +Łukasz Jankowski +Luxon Jean-Pierre +Maarten van der Schrieck +Maksim Derbasov +Malcolm Parsons +Marc-Antoine Perennou +Marcel Petrick +Marcel Raad +Marco Trevisan +Marek Zmysłowski +Marian Klymov +Mark de Wever +Mark Hermeling +Markus Elfring +Martin Delille Martin Ettl +Martin Exner +Martin Güthle +Martin Herren +Márton Csordás +Masafumi Koba +Massimo Paladin +Mateusz Michalak +Mateusz Patyk +Mateusz Pusz +Mathias De Maré +Mathias Schmid +Matthias Krüger +Matthias Kuhn +Matthias Schmieder +Matt Johnson +Maurice Gilden +Mavik +Melroy van den Berg +Michael Drake +Michael Løiten +Miika-Petteri Matikainen +Mika Attila +Mike Tzou +Milhan Kim +Mil Tolstoy +Mischa Aster Alff +Mohit Mate +Monika Lukow +Moritz Barsnick +Moritz Lipp +Moshe Kaplan +ms +Neszt Tibor Nguyen Duong Tuan +Ni2c2k +Nick Ridgway +Nicolás Alvarez Nicolas Le Cam +Nilesh Kumar +Ogawa KenIchi +Ola Söder +Oleksandr Labetskyi +Oleksandr Redko +Oliver Schode +Oliver Stöneberg +Olivier Croquette +Patrick Oppenlander +Paul Aitken +Paul Bersee +Paul Fultz II +Pavel Bibergal +Pavel Pimenov +Pavel Roschin +Pavel Skipenes +Pavel Šimovec +Pavol Misik +Pete Johns +Peter Pentchev +Peter Schops +Philip Chimento +Philipp Kloke +Pierre Schweitzer +Pieter Duchi +Pino Toscano +Pranav Khanna +Radek Jarecki +Rainer Wiesenfarth +Ramzan Bekbulatov +Raphael Geissert +Razvan Ioan Alexe Reijo Tomperi +Reshma V Kumar +Rainer Wiesenfarth +Riccardo Ghetta +Richard A. Smith +Richard Quirk +Rick van der Sluijs +Rikard Falkeborn +rivdsl +Robert Habrich +Robert Morin +Roberto Martelloni Robert Reif +Robin Getz +rofl0r +Roman Zaytsev Borisovich +Ronald Hiemstra +root +Rosen Penev +Rudi Danner +Rudolf Grauberger +Ryan M. Lederman +Ryan Pavlik +Samir Aguiar +Sam Truscott +Samuel Degrande +Samuel Poláček +Sandeep Dutta +Savvas Etairidis +Scott Ehlert +Scott Furry +Seafarix Ltd. +Sebastian Held +Sebastian Matuschka Sébastien Debrard +Sergei Chernykh +Sergei Trofimovich +Sergey Burgsdorf +Shane Tapp +Shohei YOSHIDA +Simon Cornell +Simon Kagstrom +Simon Large +Simon Martin +Simon Shanks Slava Semushin -vBm +Stas Cymbalov +Stefan Beller +Stefan Hagen +Stefan Naewe +Stefan van Kessel +Stefan Weil +Stéphane Michel +Steve Browne +Steve Duan +Steve Mokris +Steven Cook +Steven Myint +Sune Stolborg Vuorela +Susi Lehtola +Sven Wienand +Swasti Shrivastava +Sylvain Joubert +Tam Do Thanh +Teddy Didé +Temuri Doghonadze +Thomas Arnhold +Tomasz Edward Posluszny +Thomas Jarosch +Thomas Niederberger +Thomas Otto +Thomas P. K. Healy +Thomas Sondergaard +Thorsten Sick +Tim Blume +Tim Gerundt +tititiou36 +Tobias Weber +Tobias Weibel +Tomasz Kłoczko +Tom Pollok +Tomo Dote +Tommy Bergman +Toralf Förster +Troshin V.S. +Tyson Nottingham +Usman Majid +Valentin Batz +Valerii Lashmanov +Vasily Maslyukov +Veli-Matti Visuri Vesa Pikki +Ville-Pekka Vahteala +Ville Skyttä +Vincent Le Garrec +Vít Kučera +Vladimir Petrigo +Wang Haoyu +Wang Yang +WenChung Chiu +Wolfgang Stöggl +x29a +XhmikosR +Xuecheng Zhang +Yichen Yan +Yurii Putin Zachary Blair +Zhao Qifa +Zhiyuan Zhang +Zhu Lei +Дмитрий Старцев GUI graphics courtesy of Tango Desktop Project: http://tango.freedesktop.org diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000000..3c037a10b36 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,119 @@ +cmake_minimum_required(VERSION 3.22) +project(Cppcheck VERSION 2.20.99 LANGUAGES CXX) + +include(cmake/options.cmake) + +include(cmake/cxx11.cmake) +use_cxx11() +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +include(GNUInstallDirs) +include(CTest) + +include(cmake/compilerCheck.cmake) +include(cmake/versions.cmake) +include(cmake/findDependencies.cmake) +include(cmake/compileroptions.cmake) +include(cmake/includechecks.cmake) +include(cmake/compilerDefinitions.cmake) +include(cmake/buildFiles.cmake) +if(BUILD_GUI) + include(cmake/qtCompat.cmake) +endif() +include(cmake/printInfo.cmake) + + +file(GLOB addons_py "addons/*.py") +file(GLOB addons_json "addons/*.json") +file(GLOB cfgs "cfg/*.cfg") +file(GLOB platforms "platforms/*.xml") + +if(LIBXML2_XMLLINT_EXECUTABLE) + add_custom_target(validateCFG DEPENDS validateCFG-cmd) + add_custom_command(OUTPUT validateCFG-cmd + COMMAND ${LIBXML2_XMLLINT_EXECUTABLE} --noout ${CMAKE_SOURCE_DIR}/cfg/cppcheck-cfg.rng) + foreach(cfg ${cfgs}) + add_custom_command(OUTPUT validateCFG-cmd APPEND + COMMAND ${LIBXML2_XMLLINT_EXECUTABLE} --noout --relaxng ${CMAKE_SOURCE_DIR}/cfg/cppcheck-cfg.rng ${cfg}) + endforeach() + # this is a symbolic name for a build rule and not an output file + set_source_files_properties(validateCFG-cmd PROPERTIES SYMBOLIC "true") + + add_custom_target(validatePlatforms ${LIBXML2_XMLLINT_EXECUTABLE} --noout ${CMAKE_SOURCE_DIR}/platforms/cppcheck-platforms.rng) + foreach(platform ${platforms}) + get_filename_component(platformname ${platform} NAME_WE) + add_custom_target(validatePlatforms-${platformname} ${LIBXML2_XMLLINT_EXECUTABLE} --noout --relaxng ${CMAKE_SOURCE_DIR}/platforms/cppcheck-platforms.rng ${platform}) + add_dependencies(validatePlatforms validatePlatforms-${platformname}) + endforeach() + + if(TARGET cppcheck) + add_custom_target(errorlist-xml $ --errorlist > ${CMAKE_BINARY_DIR}/errorlist.xml + DEPENDS cppcheck) + + add_custom_target(example-xml $ --xml --enable=all --inconclusive --max-configs=1 ${CMAKE_SOURCE_DIR}/samples 2> ${CMAKE_BINARY_DIR}/example.xml + DEPENDS cppcheck) + endif() + + add_custom_target(createXMLExamples DEPENDS errorlist-xml example-xml) + + if(Python_EXECUTABLE) + add_custom_target(checkCWEEntries ${Python_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/listErrorsWithoutCWE.py -F ${CMAKE_BINARY_DIR}/errorlist.xml + DEPENDS errorlist-xml) + endif() + + add_custom_target(validateXML ${LIBXML2_XMLLINT_EXECUTABLE} --noout ${CMAKE_SOURCE_DIR}/cppcheck-errors.rng + COMMAND ${LIBXML2_XMLLINT_EXECUTABLE} --noout --relaxng ${CMAKE_SOURCE_DIR}/cppcheck-errors.rng ${CMAKE_BINARY_DIR}/errorlist.xml + COMMAND ${LIBXML2_XMLLINT_EXECUTABLE} --noout --relaxng ${CMAKE_SOURCE_DIR}/cppcheck-errors.rng ${CMAKE_BINARY_DIR}/example.xml + DEPENDS createXMLExamples + ) + + add_custom_target(validateRules ${LIBXML2_XMLLINT_EXECUTABLE} --noout ${CMAKE_SOURCE_DIR}/rules/*.xml) +endif() + +# TODO: add the following Makefile features: +# - "man/cppcheck.1" target +# - "tags" target +# - Cygwin handling +# - MinGW handling + +add_custom_target(copy_cfg ALL + ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/cfg" + "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/cfg" + COMMENT "Copying cfg files to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}") + +# TODO: copy *.py and *.json only +add_custom_target(copy_addons ALL + ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/addons" + "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/addons" + COMMENT "Copying addons files to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}") + +add_custom_target(remove_unsigned_platforms ALL + ${CMAKE_COMMAND} -E remove -f + "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/platforms/unix32-unsigned.xml" + "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/platforms/unix64-unsigned.xml" + COMMENT "Removing unsigned platforms files from ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}") + +add_custom_target(copy_platforms ALL + ${CMAKE_COMMAND} -E copy_directory "${PROJECT_SOURCE_DIR}/platforms" + "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/platforms" + DEPENDS remove_unsigned_platforms + COMMENT "Copying platforms files to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}") + +if(USE_BUNDLED_TINYXML2) + message(STATUS "Using bundled version of tinyxml2") + add_subdirectory(externals/tinyxml2) +endif() +add_subdirectory(externals/simplecpp) +add_subdirectory(externals/picojson) +add_subdirectory(lib) # CppCheck Library +add_subdirectory(frontend) +add_subdirectory(cli) # Client application +add_subdirectory(test) # Tests +add_subdirectory(gui) # Graphical application +add_subdirectory(tools) +add_subdirectory(man) + +include(cmake/clang_tidy.cmake) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000000..09e88f021e2 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,67 @@ +# Contributing To Cppcheck + +These are some guidelines *any* contributor should follow. They will help to make for better contributions which will most likely allow for them to be processed. + +(TODO: move daca@home section here?) + +## Code Changes + +Code contributions are handled via GitHub pull requests: https://github.com/cppcheck-opensource/cppcheck/pulls. + +If you file a pull request you might not get a reply immediately. We are a very small team and it might not fit in the current scope or time. + +Any kind of contribution is welcome but we might reject it. In that case we usually provide an explanation for the reasons but everything is always open to discussion. + +Changes in the `externals` folder need to be submitted to the respective upstream projects and will be pulled downstream with their next stable release (`picojson` is an exception because it is no longer maintained - the handling of such changes is not yet determined - see also https://trac.cppcheck.net/ticket/12233). + +Also after you filed a pull request please be ready to reply to questions and feedback. If you just "dump and leave" it might lower the chances of your change being accepted. This also applies after the PR was successfully merged as it might cause issues which were not exposed by the CI. + +Please do not be discouraged if your change was rejected or if the review process might not have been as smooth as it could have been. + +Each change should be accompanied with a unit ([C++](https://github.com/cppcheck-opensource/cppcheck/tree/main/test)) or integration ([Python](https://github.com/cppcheck-opensource/cppcheck/tree/main/test/cli)) test to ensure that it doesn't regress with future changes. Negative tests (testing the opposite behavior) would be favorable but might not be required or might already exist depending on the change. Tests which introduce `TODO_ASSERT_` or `@pytest.mark.skip`/`@pytest.mark.xfail` should have tickets filed. + +If the change is modifying existing behavior (i.e. adding a feature or fixing a bug) it should be accompanied by an issue in the [tracker](https://trac.cppcheck.net) (if you do not have access we can assist with that). Depending on the change it might also warrant an entry in `releasenotes.txt`. + +The CI is already doing a lot of work but there are certain parts it cannot ensure. + +(TODO: mention test_pr.py) + +The CI has an "always green" approach which means that failing tests are not allowed. Flakey tests might be acceptable depending on the frequency of their failures but they should be accompanied by ticket so they are being tracked. If introduce a test which is expected to fail you should use the `TODO_*` macros (C++) or `@pytest.mark.xfail(strict=False)` annotations. + +Note: Usually you can run the CI on your own fork to verify that it passes before even open an PR. Unfortunately some changes to avoid duplicated builds in our CI disabled this (TODO: file a ticket about this). + +### Targets + +Cppcheck is tracking its issues at https://trac.cppcheck.net. + +The tickets are not really prioritized (except for non-synthetic crashing issues) but of most interest are the following types of tickets. + +[False Positives](https://trac.cppcheck.net/query?status=accepted&status=assigned&status=new&status=reopened&component=False+positive&col=id&col=summary&col=status&col=component&col=type&col=priority&col=milestone&order=priority) + +Since Cppcheck aims to be low on false positives, these kind of issues are obviously of the highest priority. + +[Detection Regressions](https://trac.cppcheck.net/query?status=accepted&status=assigned&status=new&status=reopened&keywords=~regression&component=Improve+check&col=id&col=summary&col=status&col=type&col=priority&col=milestone&col=component&order=priority) + +Changes might lead to fewer findings being reported. In very few cases this might be intentional but we should not regress in what findings are being reported. + +[Other Defects](https://trac.cppcheck.net/query?status=accepted&status=assigned&status=new&status=reopened&type=defect&component=!False+positive&col=id&col=summary&col=type&col=status&col=component&col=priority&col=milestone&order=priority) + +Note: If you start working on ticket, please assign yourself or request to be. + +## Source TODOs + +There are also various source-level TODOs. These might be related to already tracked issues (even if not explicitly noted) but may also be just exist exploratively, have even been added overzealously or might even be outdated. + +So if you start spending a lot of time on these, you might want to get into touch before proceeding further. + +## simplecpp + +At its core Cppcheck is relying on the `simplecpp` library which is a preprocessor implementation which was spun off into its [separate project](https://github.com/cppcheck-opensource/simplecpp) with its own [bug tracker](https://github.com/cppcheck-opensource/simplecpp/issues). This is also maintained by the Cppcheck developers and contributions to it are also welcome. + +## Translations + +We are also maintaining various translations for `cppcheck-gui`. + +Several of these are not complete or might be out-of-date so contributions are welcome. We will also accept additional languages but such contributions should be complete. + +(TODO: provide more details) diff --git a/Changelog b/Changelog deleted file mode 100644 index 9afc94cff86..00000000000 --- a/Changelog +++ /dev/null @@ -1,37710 +0,0 @@ -2011-12-10 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, lib/cppcheck.cpp, - man/manual.docbook, win_installer/productInfo.wxi: 1.52: Updated - version - -2011-12-10 PKEuS - - * lib/checkmemoryleak.cpp, lib/checkstl.cpp: Memory leaks: Code - cleanups - -2011-12-10 Daniel Marjamäki - - * : Merge pull request #67 from makulik/master Fixed ticket #3389 '-U option doesn't supress include file handling - for #include statements inside #ifdef code paths' - -2011-12-09 Edoardo Prezioso - - * lib/checkbufferoverrun.cpp: - CheckBufferOverrun::checkInsecureCmdLineArgs(): Remove recently - unused variable 'pattern'. - -2011-12-09 PKEuS - - * lib/checkbufferoverrun.cpp, lib/checknullpointer.cpp, - lib/checkother.cpp, lib/checkstl.cpp, test/teststl.cpp: Take symbol - database into use or improve its usage in some checks. - -2011-12-09 makulik - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed ticket - #3389 '-U option doesn't supress include file handling for #include - statements inside #ifdef code paths' Signed-off-by: makulik - - -2011-12-09 PKEuS - - * lib/checkassignif.cpp, test/test64bit.cpp, test/testassignif.cpp, - test/testautovariables.cpp, test/testcharvar.cpp, - test/testmemleak.cpp, test/testnonreentrantfunctions.cpp, - test/testobsoletefunctions.cpp, test/testother.cpp, - test/testpostfixoperator.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Code cleanup - -2011-12-09 Edoardo Prezioso - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp, - test/testtokenize.cpp: 1)Fixed ticket #3184 (Improve Tokenizer: - improve simplifyMulAnd to simplify weirder code); 2)Fix a test case - inside TestSimplifyTokens::flowControl. - -2011-12-09 PKEuS - - * lib/checkexceptionsafety.cpp, test/testexceptionsafety.cpp: - Exception safety: refactorings, use the symbol database - -2011-12-08 Daniel Marjamäki - - * lib/tokenize.cpp: C++ Builder : Fixed compiler error - -2011-12-08 Daniel Marjamäki - - * lib/preprocessor.cpp: C++ Builder: Fixed compiler errors - -2011-12-08 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Use const_iterator instead of - iterator where possible - -2011-12-08 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: C++ Builder: Fixed compiler error - -2011-12-08 PKEuS - - * cli/filelister.cpp, lib/checkbufferoverrun.cpp, - lib/checkclass.cpp, lib/checkmemoryleak.cpp, lib/checkstl.cpp, - lib/checkunusedvar.cpp, lib/mathlib.cpp, lib/preprocessor.cpp, - lib/tokenize.cpp, test/testexceptionsafety.cpp, - test/testpreprocessor.cpp, test/teststl.cpp, test/testtokenize.cpp: - Various code cleanups - -2011-12-08 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #3394 - (False positive: possible null pointer dereference) - -2011-12-08 PKEuS - - * lib/cppcheck.cpp, lib/tokenize.cpp, lib/tokenize.h, - test/testautovariables.cpp, test/testbufferoverrun.cpp, - test/testmemleak.cpp, test/testnonreentrantfunctions.cpp, - test/testobsoletefunctions.cpp, test/testpostfixoperator.cpp: - Tokenizer: Code cleanups - -2011-12-08 Edoardo Prezioso - - * lib/tokenize.cpp: Add more kind of code to process for - 'removeExceptionSpecifications' (unions, anonymous unions and - structs). - -2011-12-08 Edoardo Prezioso - - * lib/checkmemoryleak.cpp, lib/preprocessor.cpp, lib/token.cpp, - lib/token.h, lib/tokenize.cpp: 1)Remove newly copy of 'eraseTokens' - and replace every occurrence with 'deleteNext' with right parameter. - 2)General improvements to code. - -2011-12-07 Edoardo Prezioso - - * AUTHORS, lib/token.cpp, lib/token.h: Extend 'Token::deleteNext' by - introducing a new parameter which determines how many tokens should - be deleted. It's still not used, though. - -2011-12-07 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: reverted last change. see - comments on github. - -2011-12-07 PKEuS - - * lib/token.cpp, lib/token.h, lib/tokenize.cpp, - test/testsimplifytokens.cpp, test/testtokenize.cpp: Tokenizer: - Refactorings and improvements. Better handling of [] - -2011-12-07 PKEuS - - * lib/checkother.cpp, test/testother.cpp: Fixed #3381 (false - positive: (style) Statements following return, break, continue, goto - or throw will never be executed) - -2011-12-07 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: python 3 compatibility - updates - -2011-12-07 Edoardo Prezioso - - * lib/checkmemoryleak.cpp, lib/preprocessor.cpp, lib/token.cpp, - lib/token.h, lib/tokenize.cpp: 1)Implement another declaration of - 'Token::eraseTokens' with parameters: the starting token and the - number of times needed to call 'deleteNext'. 2)Use the overloaded - 'eraseTokens' where needed instead of using consecutively - 'deleteNext'. 3)Tokenizer: general optimizations about the deletion - of some tokens. 4)Run astyle. - -2011-12-06 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Add 'exit' and - 'abort' to the flow control list in order to simplify code after - them. - -2011-12-06 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: Partial fix ticket #3385 - ('throw' isn't removed if the argument of the function is type - 'struct|class'). - -2011-12-06 Ettl Martin - - * test/testbufferoverrun.cpp: sanity check for ticket #3387 ( buffer - access out of bounds) - -2011-12-06 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Remove some redundant parenthesis - part 9 - -2011-12-05 Edoardo Prezioso - - * lib/tokenize.cpp: Tokenizer: use more 'deleteNext' instead of - 'eraseTokens' where possible. - -2011-12-05 Edoardo Prezioso - - * lib/checkmemoryleak.cpp: CheckMemoryLeakInFunction::simplifycode : - use properly 'deleteNext' instead of 'deleteThis' or 'eraseTokens' - and remove redundant conversion to 'std::string'. - -2011-12-05 Edoardo Prezioso - - * lib/tokenize.cpp: Oops. I should eventually keep ';', not - 'typedef'. - -2011-12-05 Edoardo Prezioso - - * lib/tokenize.cpp: Tokenizer: use 'deleteNext()' or, even better, - 'eraseTokens' instead of 'deleteThis()' where possible. - -2011-12-04 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: create output folders if - they dont exist - -2011-12-04 PKEuS - - * lib/checkother.cpp: Optimize checkother.cpp by taking - symbolDatabase into use. - -2011-12-04 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Remove some - redundant semicolons - part 8 - -2011-12-04 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Remove some - redundant semicolons - part 7 - -2011-12-04 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Remove some - redundant semicolons - part 6 - -2011-12-04 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Remove some redundant semicolons - part 5 - -2011-12-04 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer::simplifyConst - : handle also '%type% const' when the 'type' token is the first one - in the list. - -2011-12-04 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: 1) Remove some redundant semicolons - part 4 ('typedef' != - _tokens.str()); 2) Tokenizer: Use Token::eraseTokens instead of using the same - instructions as the ones inside such function. - -2011-12-04 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3359 (False - positive: array[idx++] += val triggers unexpected 'Array index out - of bounds' error) - -2011-12-04 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: improved - handling of inner templates. Partial fix for #3226 - -2011-12-03 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: - Tokenizer::simplifyFlowControl: 1) remove consecutive 'break' or - 'continue', since they don't influence the CheckOther results; 2) - improve the code speed where possible; Tokenizer::eraseDeadCode: - Ditto. - -2011-12-03 Thomas Jarosch - - * lib/tokenize.cpp: The usual astyle run - -2011-12-03 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #3350 - (Analysis failed) - -2011-12-03 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #3358 - (False null pointer dereference positive with ternary ?: operator) - -2011-12-03 Daniel Marjamäki - - * lib/checkunusedfunctions.cpp, lib/checkunusedfunctions.h, - test/testunusedfunctions.cpp: Fixed #3336 (False positive: Member - function is not used (used by template function)) - -2011-12-03 PKEuS - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #3375 (Improve check: Detect unreachable code) - -2011-12-03 Daniel Marjamäki - - * lib/checkother.cpp: Fixed gcc compiler warnings - -2011-12-03 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #3267 (False - positive: resource leak in vdr-xinelib) - -2011-12-03 Edoardo Prezioso - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: Add - 'throw' to the flow control statements list for simplification of - dead code. - -2011-12-02 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Remove some redundant semicolons - part 3 - -2011-12-02 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: Remove some redundant - semicolons - part 2 - -2011-12-02 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: Remove some redundant - semicolons - part 1 - -2011-12-02 Daniel Marjamäki - - * tools/extracttests.py: extractpython.py: cleanup - -2011-12-02 Daniel Marjamäki - - * tools/extracttests.py: extracttests: refactorings. dont include - dynamic strings in the listing - -2011-12-02 Daniel Marjamäki - - * lib/checknullpointer.cpp, lib/checkother.cpp, - test/testnullpointer.cpp, test/testother.cpp: Fixed #3373 (False - posititive: incorrect %* handling in sscanf) - -2011-12-02 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #3345 - (false positive: possible null pointer dereference (guarded by &&)) - -2011-12-01 Richard Quirk - - * lib/checkother.cpp: Fix possible null pointer dereference - -2011-12-01 Richard Quirk - - * lib/checkother.cpp, test/testother.cpp: Fix false positive with - non-const function calls - -2011-12-01 Richard Quirk - - * lib/checkother.cpp: Refactor the same expression check Work out if a function is inconclusive when creating the entry in - the Expressions class instead of when checking the counts at the - end. Store the result in a new bool flag in the ExpressionTokens - helper struct. The pointer to symbol database and ref to list of const functions - are temporarily stored in the Expressions helper class to avoid - passing them in too on every endExpr(tok) call. Use a const reference to ExpressionTokens in the check loop to avoid - repeating the it->second several times, which clarifies what that - code does. - -2011-12-01 PKEuS - - * lib/checkother.cpp: Coding fixes and refactorings - -2011-12-01 Daniel Marjamäki - - * lib/checkassignif.cpp, lib/checkassignif.h: Fixed Visual Studio - compiler warnings - -2011-12-01 Daniel Marjamäki - - * lib/checkother.cpp: Fixed Visual Studio compiler warnings - -2011-12-01 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #3354 (Incorrect - both sides of '||' expression match when using increment in - expression.) - -2011-12-01 Daniel Marjamäki - - * lib/checkother.cpp: checkDuplicateExpressions: validate tokens - instead of string. Fix for my previous commit. - -2011-12-01 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #3334 (Test for same - expression on both sides of '&' reports false positive) - -2011-12-01 Edoardo Prezioso - - * lib/checkautovariables.cpp, lib/checkclass.cpp, - lib/checkmemoryleak.cpp, lib/checknullpointer.cpp, - lib/checkother.cpp, lib/checkuninitvar.cpp, lib/preprocessor.cpp, - lib/tokenize.cpp: 1)internal check found a 'findmatch' with simple - string argument; 2)Style: uniform 'while (...)' when inside it - there's an assignment; 3)Replace '0' with 'NULL' where there's - comparison with a pointer. - -2011-11-30 Daniel Marjamäki - - * : Merge pull request #66 from makulik/master Fixed preprocessor testcases - -2011-11-30 makulik - - * test/testpreprocessor.cpp: Removed int cast from undef - preprocessor testcases Signed-off-by: makulik - -2011-11-30 makulik - - * test/testpreprocessor.cpp: Fixed preprocessor testcases Signed-off-by: makulik - -2011-11-30 Daniel Marjamäki - - * : Merge pull request #65 from makulik/master Solution for ticket #3353 'Allow explicit undef's for configuration' - -2011-11-30 Edoardo Prezioso - - * lib/checkmemoryleak.cpp, lib/tokenize.cpp: 1) Shut up GCC compiler for 'missing braces around assignment'; 2) Tokenizer::simplifyGoto: Code refactoring in order to skip code - inside '()|[]' parentheses without counting. - -2011-11-30 makulik - - * cli/cmdlineparser.cpp: Run astyle Signed-off-by: makulik - -2011-11-30 makulik - - * cli/cmdlineparser.cpp, lib/preprocessor.cpp, lib/settings.h, - man/cppcheck.1.xml, test/testcmdlineparser.cpp, - test/testpreprocessor.cpp: Solution for ticket #3353 'Allow explicit - undef's for configuration' Signed-off-by: makulik - -2011-11-30 PKEuS - - * lib/checknullpointer.cpp, lib/checkother.cpp, - test/testnullpointer.cpp, test/testother.cpp: Fixed #3364 (Crash in - printf parsing) - -2011-11-30 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #3268 (False - positive: resource leak in vdr-xineliboutput) - -2011-11-30 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp, test/testthreadexecutor.cpp: Fixed #3267 - (False positive (experimental): resource leak in vdr-xinelib) - -2011-11-30 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testsuppressions.cpp, - test/testuninitvar.cpp: Uninitvar: Reactivated the checking - -2011-11-29 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py : improved errors.txt - output - -2011-11-29 Daniel Marjamäki - - * lib/checkother.cpp: astyle formatting - -2011-11-29 Akio Idehara - - * Makefile, tools/dmake.cpp: Fixed #3346 (cygwin detection for - _GLIBCXX_DEBUG in Makefile) - -2011-11-29 Edoardo Prezioso - - * lib/checkother.cpp: Fixed ticket #3366 (Build breakage) - -2011-11-29 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #3356 (false - positive: (warning) Comparison of a boolean with integer that is - neither 1 nor 0) - -2011-11-29 Daniel Marjamäki - - * : Merge pull request #61 from richq/sameexpr Fix for #3317 - same expression on both side of '&&' false positives - -2011-11-29 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: minor code fixes of --code - handling - -2011-11-28 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: added option to output - test files - -2011-11-28 PKEuS - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Improvements - to Nullpointer dereference on function call check: printf format - string parser improved (similar to my recent patch on the argument - counter), frexp/modf supported (#1572), Code cleanup - -2011-11-28 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #3303 (false - positive: memory leak (reference count)) - -2011-11-27 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: sizeof for numeric - constant : disabled check. see ticket #3179 - -2011-11-27 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: improved command line - parser - -2011-11-27 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: cleaned up the code for - parsing of command line - -2011-11-27 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: exit if wrong command line - is given - -2011-11-27 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: reduce line lengths - -2011-11-27 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: close input file - -2011-11-27 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: renamed 'str' to 'string' - -2011-11-27 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: added docstrings. added - navigation links. - -2011-11-27 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: allow user to see 'error - cases only' - -2011-11-27 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: added function 'trimname' - -2011-11-27 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: Added a little help info - -2011-11-27 Daniel Marjamäki - - * tools/extracttests.py: extracttests.py: Added tool for extracting - test information - -2011-11-27 Marek Zmysłowski - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #909 - (improve check: out of bounds of memchr function and out of bounds - check) - -2011-11-27 PKEuS - - * lib/checknullpointer.cpp: code refactoring - -2011-11-27 PKEuS - - * lib/checkbufferoverrun.cpp, lib/checkother.cpp, lib/checkother.h, - test/testother.cpp: Fixed #3311, #3313 and #3339 (printf format - string false positives) - -2011-11-26 PKEuS - - * lib/check64bit.cpp, lib/checkother.cpp, test/testnullpointer.cpp: - code cleanups and refactorings - -2011-11-26 PKEuS - - * lib/checkbufferoverrun.cpp, lib/checkclass.cpp, - lib/checkmemoryleak.cpp, lib/checknullpointer.cpp, lib/path.cpp, - lib/path.h, lib/preprocessor.cpp, lib/tokenize.cpp: code cleanups - and refactorings - -2011-11-25 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: memory leaks: Made leak checking inconclusive - instead of experimental - -2011-11-25 Marek Zmysłowski - - * gui/mainwindow.cpp: Fixed #3216 (GUI: Crash when cancel is clicked - in the New Project dialog) - -2011-11-25 Marek Zmysłowski - - * test/teststl.cpp: Fixed #1841 (STL: false negative for invalidated - iterator after erase) - -2011-11-25 Marek Zmysłowski - - * lib/tokenize.cpp, test/testmemleak.cpp, test/testtokenize.cpp: - Fixed #3212 (Simplify the double pointer cast) - -2011-11-24 Thomas Jarosch - - * lib/tokenize.cpp: Use Token::simpleMatch instead of Token::Match "--enable=internal" reported: [lib/tokenize.cpp:3563]: (warning) - Found simple pattern inside Token::Match() call: ") ;" - -2011-11-24 Thomas Jarosch - - * test/testclass.cpp: Run astyle - -2011-11-10 Richard Quirk - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fix - ticket #3317 (same expression false positives) Add a check for function calls that have no side effects. That means - known const methods and a list including strcmp, strlen, etc. If the function is not known to be side effect-free then no style - warning is given. Add test cases for the duplicate expressions. - -2011-11-12 Richard Quirk - - * lib/checkother.cpp, test/testother.cpp: Remove false positives for - nested logic - -2011-11-23 Richard Quirk - - * lib/checkclass.cpp, test/testclass.cpp: Fix ticket #2233 (unused - private static function) - -2011-11-23 Richard Quirk - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fix false - positives for null pointer on exit - -2011-11-22 Daniel Marjamäki - - * lib/checkbufferoverrun.h, lib/checkother.cpp, - lib/symboldatabase.h, lib/token.cpp, lib/token.h: DJGPP: Fixed a few - compiler errors by using std::size_t instead of size_t - -2011-11-22 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: removed unused include - -2011-11-22 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp, test/testconstructors.cpp: - Fixed #3196 (False positive: member variable not initialized in - constructor (union)) - -2011-11-22 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #3352 (False - positive: member variable not initialized (3D array)) - -2011-11-21 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer::setVarId: - Fixed problem with class declarations with inheritance. skip them. - -2011-11-21 Daniel Marjamäki - - * lib/cppcheck.cpp: Fixed #3347 (False positive: unused function - (taking address)) - -2011-11-21 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer::setVarId: - fixed 'using' bug - -2011-11-21 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: operator= should return - reference: Made check inconclusive. See ticket #3296 - -2011-11-21 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: - Mismatching format string parameters. Made check experimental. See - tickets #3311, #3313 and #3339 - -2011-11-21 Reijo Tomperi - - * lib/cppcheck.cpp, lib/token.cpp, test/testtoken.cpp: "Internal - error. Token::Match called with varid 0." didn't work when error was - in a header file. Fixed that. - -2011-11-21 Reijo Tomperi - - * lib/cppcheck.cpp: Make --debug-fp work with new exception also. - -2011-11-20 Reijo Tomperi - - * lib/cppcheck.cpp, lib/token.cpp, test/testtoken.cpp: astyle fix - -2011-11-20 Reijo Tomperi - - * lib/cppcheck.cpp, lib/token.cpp, test/testtoken.cpp: "Internal - error. Token::Match called with varid 0." will now cause check to - abort and write a proper error log with filename. Previously - filename was empty and format was always xml. - -2011-11-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3281 - (Tokenizer::simplifyKnownVariables : static constant value is not - used) - -2011-11-20 Marek Zmysłowski - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: Fixed #3255 - (Error message for std::string::c_str() is not descriptive) - -2011-11-20 Edoardo Prezioso - - * lib/checkclass.cpp, lib/tokenize.cpp, lib/tokenize.h: 1) Run runastyle; 2) Clarify some comments in 'Tokenizer::simplifyFlowControl' and in - 'Tokenizer::eraseDeadCode'; 3) Add some 'const' variables inside 'Tokenizer::eraseDeadCode'. - -2011-11-20 Edoardo Prezioso - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Completed ticket #3230 (Refactoring: add function to remove tokens - when a label is found.) and fixed ticket #3264 (False positive: - Variable is assigned a value that is never used). - -2011-11-20 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Class checking: made - 'technically function x can be const' inconclusive - -2011-11-20 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testtokenize.cpp: astyle - formatting - -2011-11-14 Richard Quirk - - * lib/checkother.cpp, test/testother.cpp: Fix false positives for %[ - in scanf - -2011-11-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3316 (Cppcheck - reporting internal errors - code compiles cleanly) - -2011-11-20 Edoardo Prezioso - - * lib/checkautovariables.cpp, lib/checkboost.cpp, - lib/checkbufferoverrun.cpp, lib/checkclass.cpp, - lib/checkmemoryleak.cpp, lib/checkobsoletefunctions.cpp, - lib/checkother.cpp, lib/checkunusedfunctions.cpp: Change every - 'tokAt(1)' to 'next()' and every 'tokAt(-1)' to 'previous()'. Added - a safety check to ensure that a 'previous()' call doesn't crash (not - sure if it's needed or not). - -2011-11-20 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testsuppressions.cpp, - test/testuninitvar.cpp: Uninitvar: Made checking experimental - -2011-11-20 Edoardo Prezioso - - * lib/check64bit.cpp, lib/checkautovariables.cpp, - lib/checkbufferoverrun.cpp, lib/checkclass.cpp, - lib/checkmemoryleak.cpp, lib/checkother.cpp, lib/checkstl.cpp, - test/testsymboldatabase.cpp: Change every 'tokAt(1)->' to 'next()->' - because 'tokAt(1) == 0' is equivalent to 'next() == 0', hence the - equivalent cppcheck crash. - -2011-11-20 Edoardo Prezioso - - * lib/checkassignif.cpp, lib/checkautovariables.cpp, - lib/checkbufferoverrun.cpp, lib/checkclass.cpp, - lib/checkmemoryleak.cpp, lib/checknullpointer.cpp, - lib/checkother.cpp, lib/checkstl.cpp, lib/checkuninitvar.cpp, - lib/checkunusedvar.cpp, lib/executionpath.cpp, - lib/symboldatabase.cpp, lib/tokenize.cpp, test/testtokenize.cpp: - Change every 'tokAt(..)->link()' to 'linkAt(..)'. - -2011-11-20 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp, - test/testthreadexecutor.cpp: Memory leaks: Made - CheckMemoryLeakInFunction experimental - -2011-11-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3280 (False - positive: assigned value that is never used) - -2011-11-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3340 (Internal - error. Token::Match called with varid 0... union is causing - problems) - -2011-11-19 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Fixed #3328 (False negative: out of - bounds) - -2011-11-19 Daniel Marjamäki - - * lib/check.h: Reverted previous commit. There are testrunner - problems when the code is removed. - -2011-11-19 Daniel Marjamäki - - * lib/check.h: removed cleanup code that will crash in some - environments. it's somewhat redundant. - -2011-11-19 Daniel Marjamäki - - * lib/check.h: Fixed #3329 (cppcheck core dump on Sun machine) - -2011-11-19 Edoardo Prezioso - - * : commit ccdb18f21363e6351da7d753df975b59c9f298c3 Author: Edoardo - Prezioso Date: Sat Nov 19 13:34:36 2011 +0100 - -2011-11-19 Daniel Marjamäki - - * lib/checkassignif.cpp, test/testassignif.cpp: Fixed #3332 - (mismatching comparison: Hard to understand) - -2011-11-18 Edoardo Prezioso - - * test/testsimplifytokens.cpp: Add more tests for flow control - simplification. - -2011-11-18 Edoardo Prezioso - - * test/testsimplifytokens.cpp: Add test for the consecutive braces - simplification, thanks to thomasjfox's example. - -2011-11-18 Daniel Marjamäki - - * lib/checkassignif.cpp, lib/checkassignif.h, test/testassignif.cpp: - improved error message 'mismatching comparison' - -2011-11-17 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - better handling of #define A 0 => #if A==0. ticket #3331 - -2011-11-17 Marek Zmysłowski - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #886 (new check: wrong value passed to isgraph function) - -2011-11-13 Stefan Weil - - * lib/preprocessor.cpp: Preprocessor: Fix comments (backspace -> - backslash) Signed-off-by: Stefan Weil - -2011-11-12 Stefan Weil - - * lib/settings.cpp: support any number of --append= options If one or more append files are given on the command line, they are - simply concatenated. Signed-off-by: Stefan Weil - -2011-11-13 Stefan Weil - - * lib/cppcheck.cpp, lib/settings.cpp, lib/settings.h: Optimize - handling of --append= option (execution time, memory) Whitespace was removed from the append data for every configuration - and every file: n(configuration) * n(files). Removing whitespace immediately after the append data was read can - significantly reduce the execution time and memory usage. It also - allows further improvement because copies to the temporary object - appendCode are no longer needed. Signed-off-by: Stefan Weil - -2011-11-12 Stefan Weil - - * cli/cmdlineparser.cpp, lib/settings.cpp, lib/settings.h: - cmdlineparser: terminate with error message if --append= - fails Signed-off-by: Stefan Weil - -2011-11-14 Thomas Jarosch - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Run astyle - -2011-11-14 Thomas Jarosch - - * lib/token.cpp, lib/token.h: Adapt Token::strAt() to return a const - reference like Token::str() does Saves us a complete conversion from string.c_str() back to - std::string. - -2011-11-13 Richard Quirk - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fix false - positives for delete of known nulls - -2011-11-13 Edoardo Prezioso - - * lib/checkbufferoverrun.cpp, lib/checkclass.cpp, - lib/checkexceptionsafety.cpp, lib/checkmemoryleak.cpp, - lib/checknullpointer.cpp, lib/checkother.cpp, lib/checkstl.cpp, - lib/checkuninitvar.cpp, lib/checkunusedvar.cpp, - lib/symboldatabase.cpp, lib/tokenize.cpp: Change every - 'tokAt(...)->str()' to 'strAt(...)'. - -2011-11-12 Edoardo Prezioso - - * lib/checkobsoletefunctions.cpp, lib/checkpostfixoperator.cpp, - lib/checkstl.cpp, lib/checkunusedvar.cpp, lib/symboldatabase.cpp, - lib/tokenize.cpp: Change: 'next()->next()'->'tokAt(2)', - 'previous()->previous()'->'tokAt(-2)'. - -2011-11-12 Edoardo Prezioso - - * lib/tokenize.cpp: Add simplification of the consecutive braces - before the end of 'tokenize()' function. - -2011-11-12 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Add removal of consecutive braces, i.e.: '{ { - ... } }'->'{ ... }'. Changed a little bit the dead code tests. - -2011-11-11 Edoardo Prezioso - - * lib/token.cpp, lib/token.h: 1)Add 'Token' function 'linkAt', which - simplifies the writing 'tokAt(i)->link()' to 'linkAt(i)'. It's - still unused, though. 2)Fix one grammatical mistake inside token.h - 3)Style change to token.cpp: remove the whitespace between '!' and - 'begin'. - -2011-11-11 Thomas Jarosch - - * lib/token.h: Remove check for "this" inside Token class The check hides real memory problems and is also useless in most - cases. - -2011-11-11 Daniel Marjamäki - - * lib/tokenize.cpp: added todo comment - -2011-11-11 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3314 (cppcheck - incorrectly reporting Syntax error.) - -2011-11-11 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #3290 - (False positive: Null pointer dereference (typeid)) - -2011-11-11 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp: Fix #3277 (Other: attempt to - copy-construct an iterator from a singular iterator) - -2011-11-11 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: Fixed - false positive for 'char *p = strcpy(malloc(10),str);' - -2011-11-11 Reijo Tomperi - - * cli/cmdlineparser.cpp, man/cppcheck.1.xml, man/manual.docbook: Fix - #3324 (Change "--template ''" into "--template=''") - http://sourceforge.net/apps/trac/cppcheck/ticket/3324 - https://sourceforge.net/apps/trac/cppcheck/wiki/DesignDecisions - -2011-11-10 Reijo Tomperi - - * test/testtokenize.cpp: Astyle fix - -2011-11-10 Stefan Weil - - * cli/cmdlineparser.cpp: cmdlineparser: add support for --template= The GNU standard for long command line options is --option=value. - All other long options of cppcheck support this, so add it for the - template option, too. --template xxx can be made obsolete later. Should the documentation and tests also be changed now? Signed-off-by: Stefan Weil - -2011-11-10 Reijo Tomperi - - * readme.txt: Fix readme.txt to match current HAVE_RULES behaviour. - -2011-11-09 Daniel Marjamäki - - * : Merge pull request #60 from richq/varid0 Fix varid 0 with function pointer and virtual methods - -2011-11-09 Reijo Tomperi - - * cli/threadexecutor.cpp: Improve error logging in ThreadExecutor - -2011-11-09 Thomas Jarosch - - * test/teststl.cpp: Add negative test for .c_str() unit test and - TODO_ASSERT_EQUALS (#3266) - -2011-11-09 Richard Quirk - - * lib/tokenize.cpp, test/testtokenize.cpp: Fix varid 0 with function - pointer and virtual methods - -2011-11-09 Thomas Jarosch - - * lib/checkother.cpp: Run astyle - -2011-11-09 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3279 (Token::Match - called with varid 0) - -2011-11-08 Daniel Marjamäki - - * : Merge pull request #59 from richq/sameexpr Improved same expression check for ticket #3274 - -2011-11-09 Reijo Tomperi - - * lib/checkother.cpp, test/testother.cpp: Fix #3307 (Invalid format - string/parameter mismatch warning) - http://sourceforge.net/apps/trac/cppcheck/ticket/3307 - -2011-11-08 Edoardo Prezioso - - * test/testtokenize.cpp: Oops. - -2011-11-08 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #3309 (false - positive: (style) Boolean result is used in bitwise operation. - Clarify expression with parentheses) - -2011-11-08 Richard Quirk - - * lib/mathlib.cpp: Remove duplicate expressions on both sides of || - -2011-11-08 Richard Quirk - - * lib/checkother.cpp, test/testother.cpp: Fix for same expression - separated by commas The code branch tested by the previous check for && is now - different, so I've changed the test to use == instead. There was - also a missing case when the expression was followed by a comma - instead of being preceded by one. - -2011-11-08 Richard Quirk - - * lib/checkother.cpp, test/testother.cpp: Improved %or% and & checks - -2011-11-08 Richard Quirk - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Improved - same expression check for ticket #3274 Expand the logic for the check for the same expression on both sides - of the || and && operators. Now expressions can be more complex, - with the "alt" variable helping to fudge operator precedence to - avoid false positives. - -2011-11-08 Edoardo Prezioso - - * test/testtoken.cpp: Add test for Token::eraseTokens. - -2011-11-08 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed tokenizer: don't - change '*(str+num)' if '*' means a product with a previous variable - or number. Ditto for '&str[num]' (still commented). - -2011-11-08 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed ticket #3310 - (segmentation fault of cppcheck) - -2011-11-08 Edoardo Prezioso - - * test/testsimplifytokens.cpp: Refactoring: unify same dead code - tests with a list. - -2011-11-07 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: Improve tokenizer: remove - more redundant parenthesis and add a prototype code for: - '&str[num]'=>'(str+num)' with reporting non obvious test failures. - -2011-11-07 Marek Zmysłowski - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fix #70 (Locate - memory leaks when alloc happens in function parameter) - http://sourceforge.net/apps/trac/cppcheck/ticket/70 - -2011-11-07 Reijo Tomperi - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fix #3278 (FP: - Possible null pointer dereference with for loop) - http://sourceforge.net/apps/trac/cppcheck/ticket/3278 Bail out if - token "for" is encountered. - -2011-11-07 Edoardo Prezioso - - * lib/checkinternal.cpp: Conforming style: always use 'std::' - namespace where needed. This removes the mixing style inside the - code. - -2011-11-06 Thomas Jarosch - - * lib/token.cpp, test/testtoken.cpp: Fix false positive of %or% - match in alternative pattern match code %or% triggered on code using "|=" or "||". - -2011-11-06 Richard Quirk - - * lib/checkstl.cpp, test/teststl.cpp: Fix namespaced types for - auto_ptr new[] errors This fixes false negatives for code such as: std::auto_ptr p(new foo::bar[10]); The idea is to find a "new", search for the end token ";", then see - if the declaration ends in a closing square bracket. Also fixes - other cases that checked for "new %type% [" so that they work with - namespaces. - -2011-11-06 Thomas Jarosch - - * test/testtoken.cpp: Extended isOp() tests to do proper negative - testing against other operators - -2011-11-06 Thomas Jarosch - - * test/testtoken.cpp: Unit test for Token::isArithmeticalOp() and - Token::isStandardType() - -2011-11-06 Thomas Jarosch - - * test/testtoken.cpp: Unit test for %varid% match Also run astyle. - -2011-11-06 Thomas Jarosch - - * test/testtoken.cpp: Unit test for %type% and %str% matches - -2011-11-06 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #3233 (false positive: (style) Checking if unsigned variable 'i' is - less than zero.) - -2011-11-06 Thomas Jarosch - - * test/testtoken.cpp: Unit test for Token::isExtendedOp() and - Token::isAssignmentOp() - -2011-11-06 Thomas Jarosch - - * lib/token.cpp, test/testtoken.cpp: Fix single %op% operator not - working at all When parsing the Token::Match pattern, we accesed the wrong - character in the pattern and never executed the %op% check. In addition the unit test function for %op% wasn't registered in the - test suite. Ups. All fixed now and also provide a complete check for all operators - %op% supports. - -2011-11-06 Edoardo Prezioso - - * lib/checkother.cpp, lib/tokenize.cpp, test/testother.cpp, - test/testtokenize.cpp: Improve same expression check: remove '%op%' - pattern and add ',' for the same expressions as an argument inside a - function. Improve compound assignment simplification: use already - defined 'isAssignmentOp' and extend the adding parenthesis to a - generic operator, not only to the arithmetical ones. See: - http://en.cppreference.com/w/cpp/language/operator_precedence - -2011-11-06 Daniel Marjamäki - - * lib/checkother.cpp, test/testcharvar.cpp: Fixed #3282 (Invalid - report that an array index is of type char.) - -2011-11-06 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp, lib/settings.cpp, - test/testpreprocessor.cpp: Fixed #3275 (Missing includes always - reported) - -2011-11-06 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #3265 (false - positive: comparison of bool with nonzero integer) - -2011-11-05 Edoardo Prezioso - - * lib/checkother.cpp, test/testother.cpp: Improve same expression - check: take count of operations and assignments before the same - expression and add missing 'return' pattern to the struct member - variable part of the check. - -2011-11-05 Daniel Marjamäki - - * lib/checkother.cpp, test/testincompletestatement.cpp: Fixed #3251 - (Redundant code: Found a statement that begins with numeric - constant) - -2011-11-05 Daniel Marjamäki - - * lib/token.cpp: astyle formatting - -2011-11-05 Daniel Marjamäki - - * lib/token.cpp: Token: assert that multicompare patterns don't - begin with some %% command - -2011-11-05 Daniel Marjamäki - - * lib/token.cpp, lib/token.h, lib/tokenize.cpp, test/testtoken.cpp: - Fixed #3294 (Token::Match multi compare false negative) - -2011-11-05 Daniel Marjamäki - - * : Merge pull request #55 from richq/sameexpr Improve for same expression on both sides of operator - -2011-11-05 Zhiyuan Zhang - - * cli/cppcheckexecutor.cpp: Fixed #3292 (Error in - --suppressions-list silently ignores all subsequent command line - options) - -2011-11-05 Reijo Tomperi - - * cli/cppcheckexecutor.cpp: Fix typo "Cpppcheck" - -2011-11-05 Richard Quirk - - * lib/checkother.cpp, test/testother.cpp: Improve for same - expression on both sides of operator - -2011-11-05 Richard Quirk - - * lib/checkstl.cpp, test/teststl.cpp: Extra check for auto_ptr new[] This fixes cases like this: auto_ptr bar(new foo[10]); which previously did not work correctly. - -2011-11-05 Thomas Jarosch - - * test/testtoken.cpp: Test case to demonstrate #3294 - -2011-11-05 Daniel Marjamaki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsymboldatabase.cpp, - test/testtokenize.cpp: Fixed #3188 (Function parser false positive) - -2011-11-05 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3117 - (Tokenizer::simplifyKnownVariables : Don't simplify static variable - that is changed) - -2011-11-05 Daniel Marjamäki - - * lib/checkother.h: fixed --doc output - -2011-11-05 PKEuS - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #3089 (New Check: Detect wrong usage of printf/scanf) - -2011-11-04 Daniel Marjamäki - - * : Merge pull request #54 from gansb/master Testcases for #3287 and #3290 - -2011-11-04 Benjamin Goose - - * test/testnullpointer.cpp, test/testuninitvar.cpp: Add tests for - various bugs. False positive: uninitialized variable (ticket #3287). False - positive: null pointer dereference in typeid (ticket #3290). - -2011-11-03 Reijo Tomperi - - * lib/token.cpp: Improve internal error print out, print line number - with the error message. - -2011-11-03 Daniel Marjamäki - - * lib/tokenize.cpp, test/testpreprocessor.cpp: Fixed #3248 - (Tokenizer: better handling of char constants that are compared with - numeric constants) - -2011-11-03 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #3285 - (wrong #elif behaviour) - -2011-11-02 Daniel Marjamaki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Fixed failed - unit test - -2011-11-02 Daniel Marjamaki - - * test/testpreprocessor.cpp: Removed old test case for missing - includes. There is better testing in - TestPreprocessor::def_missingInclude - -2011-11-02 Daniel Marjamaki - - * test/testpreprocessor.cpp: Preprocessor: Unit test handling of - missing includes in 'normal' preprocessing - -2011-11-02 Daniel Marjamaki - - * lib/preprocessor.cpp: Preprocessor: Don't warn about missing - system headers during 'normal' preprocessing - -2011-11-02 Daniel Marjamaki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3279 (Token::Match - called with varid 0) - -2011-11-02 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h, test/testconstructors.cpp: - removed 'explicit constructors' check. see comments in pull request - #51 for the reasons. - -2011-11-01 Daniel Marjamaki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3272 (Internal - error) - -2011-11-01 Edoardo Prezioso - - * cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h, - gui/gui.cppcheck, lib/checkclass.cpp, lib/symboldatabase.h, - lib/tokenize.cpp: Fix some complainted choices made in my older - commits. Note: probably you should do 'make clean' before using - 'make' to rebuild it again. Maybe it's me but 'make' reports various - errors when linking. - -2011-11-01 Ettl Martin - - * test/testbufferoverrun.cpp: added testcase for ticket #3273 - -2011-11-01 Edoardo Prezioso - - * cppcheck.cppcheck: Fixed: some gui/temp headers reported missing - includes from gui/ folder. - -2011-10-31 Ettl Martin - - * cli/cmdlineparser.h, cli/pathmatch.h: cli: added - 'explicit'-keyword in CmdLineParser and PathMatch ctor - -2011-10-31 Daniel Marjamäki - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: STL: updated - error messages for 'useless call to find/swap/substr'. Ticket: #3258 - -2011-10-31 Daniel Marjamäki - - * : Merge pull request #53 from gansb/master Add missing newline - -2011-10-31 Benjamin Goose - - * lib/standards.h: Add newline at end of file! - -2011-10-31 Edoardo Prezioso - - * lib/checkother.cpp: Fixed ticket #3269 (Regression, I think it's - somehow related to symbol database) - -2011-10-31 Edoardo Prezioso - - * lib/checkbufferoverrun.cpp, lib/checkother.cpp, lib/tokenize.cpp: - General code tweaking, nothing strange. - -2011-10-30 makulik - - * cli/cmdlineparser.cpp, man/cppcheck.1.xml: Small fixes for -I and - --includes-file help texts - -2011-10-30 Daniel Marjamaki - - * lib/preprocessor.cpp, lib/preprocessor.h: Preprocessor: Bailout - #include if it is recursive - -2011-10-30 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Enable 'normal' preprocessing - whenever any defines are given. The special define CPPCHECK-TEST - isn't needed anymore. - -2011-10-30 Edoardo Prezioso - - * cli/cppcheckexecutor.cpp, lib/checkbufferoverrun.cpp, - lib/checkclass.cpp, lib/checkinternal.cpp, lib/checkstl.cpp, - lib/tokenize.cpp, tools/dmake.cpp: Fix some GCC warnings regarding - the sign conversion. - -2011-10-30 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #3231 (False - positive: uninitialized variable '({...})') - -2011-10-30 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #3228 - (false positive: possible null pointer dereference) - -2011-10-30 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testconstructors.cpp: astyle - formatting - -2011-10-30 Daniel Marjamaki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #3222 (false - positive: Uninitialized variable with function pointer) - -2011-10-30 Edoardo Prezioso - - * test/testclass.cpp, test/testother.cpp: Fix all the test failures - caused by my previous commit. - -2011-10-30 Edoardo Prezioso - - * test/testclass.cpp, test/testother.cpp: Fixed lots of test - failures caused by my previous commit. There are still some which I - don't know how to fix. - -2011-10-30 Edoardo Prezioso - - * lib/checkclass.cpp, lib/checkother.cpp: Fixed: with checkConst and - checkVariableScope wanted still required "information" settings - instead of "style". - -2011-10-30 Daniel Marjamaki - - * lib/checkclass.h: CheckClass: Added classInfo about explicit - checking - -2011-10-30 Daniel Marjamaki - - * lib/checkunusedfunctions.cpp: Visual Studio: Fixed compiler error - -2011-10-30 Daniel Marjamäki - - * : Merge pull request #51 from richq/explicit Explicit constructors - -2011-10-29 Edoardo Prezioso - - * cli/cmdlineparser.cpp, test/testcmdlineparser.cpp: Little - improvements with cli messages and added new '--template' mode: - 'edit'. This option makes it possible opening correctly some - editors like 'gedit' or 'vim' by copy-pasting the filename and the - line to the command sequence. - -2011-10-29 Edoardo Prezioso - - * lib/tokenize.cpp: Tokenizer: Change 'var++|--;' into '++|--var;' - and remove redundant 'tokAt(0)'. - -2011-10-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3092 - (Tokenizer::setVarId : shadow variable in member function gets the - wrong varid) - -2011-10-29 Daniel Marjamäki - - * test/testbufferoverrun.cpp: astyle formatting - -2011-10-29 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #3221 (FP: Array 'arr[2147483648]' index 0 out of bounds in loop - when size unknown to cppcheck) - -2011-10-29 Daniel Marjamäki - - * lib/checkunusedfunctions.cpp, test/testunusedfunctions.cpp: Fixed - #3195 (operator() from a functor-struct is never used) - -2011-10-29 Thomas Jarosch - - * cli/filelister.cpp, cli/filelister.h: FileLister (linux): Refactor - code to keep only one list of seen directory entries The list contains filenames and directories now and is only used for - duplicate detection. - -2011-10-29 Daniel Marjamäki - - * lib/tokenize.cpp: astyle formatting - -2011-10-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #3152 - (Tokenizer: template constructor is removed) - -2011-10-29 Thomas Jarosch - - * cli/filelister.cpp, cli/filelister.h: FileLister (linux): Handle - cyclic symbolic links Keep a list of already seen directories. The "udev" project f.e. has a directory with a subdirectory that - contains a symbolic link back to the parent directory. - -2011-10-29 Thomas Jarosch - - * cli/filelister.cpp, cli/filelister.h, test/testfilelister.cpp: - FileLister (linux): Move absolute path determination to own function Cleans up the #ifdef hell in the code. Provide unit test for it. - -2011-10-29 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #3245 (False - positive: Dangerous usage of 'string' (strncpy doesn't always - 0-terminate it)) - -2011-10-28 Richard Quirk - - * lib/check.h, lib/checkbufferoverrun.cpp, - lib/checknullpointer.cpp, lib/checkuninitvar.cpp, - lib/preprocessor.cpp, lib/token.h: Ensure single-argument - constructors are explicit - -2011-10-28 Richard Quirk - - * lib/checkclass.cpp, lib/checkclass.h, test/testconstructors.cpp: - Add checks for explicit constructors Single-argument constructors should be explicit. Constructors with - multiple arguments should not be marked explicit. - -2011-10-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Make sure that - friend classes don't get varid. Ticket: #2962 - -2011-10-28 Richard Quirk - - * test/testclass.cpp, test/testconstructors.cpp: Make - single-argument test constructors explicit - -2011-10-29 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointer: - Added inconclusive error message when calling member function of - NULL object. - -2011-10-29 Daniel Marjamäki - - * lib/checkother.cpp: use reportInconclusiveError instead of - reportError if checking is inconclusive - -2011-10-29 Reijo Tomperi - - * lib/checknullpointer.cpp: Fix related to previously fixed #3256 - (Null pointer dereference not detected) Use - reportInconclusiveError() instead of reportError(). - -2011-10-29 Daniel Marjamäki - - * lib/checkinternal.cpp: astyle formatting - -2011-10-29 Daniel Marjamäki - - * lib/checkother.cpp: updated comment. removed a inconclusive - condition, I don't think it's needed. - -2011-10-29 Thomas Jarosch - - * lib/checkinternal.cpp, lib/settings.cpp, - test/testcmdlineparser.cpp, test/testinternal.cpp: Disable internal - checks if NDEBUG is defined (release build) - -2011-10-29 Daniel Marjamäki - - * lib/checkother.cpp: strncmp sizeof: tweaked the check. - -2011-10-29 Thomas Jarosch - - * lib/checkinternal.cpp, lib/checkinternal.h, test/testinternal.cpp: - Add internal check that searches Token::Match() patterns for missing - % end charaters Example: "%type" or "foo %var bar" - -2011-10-29 Daniel Marjamäki - - * test/testother.cpp: fix unit test failure - -2011-10-29 Daniel Marjamäki - - * : Merge pull request #50 from richq/strncmp Improved strncmp checks * strings are always the same * inconclusive: using sizeof(char *) as size parameter - -2011-10-29 Richard Quirk - - * lib/checkother.cpp: Only run sizeof(char*) check if inconclusive - is set - -2011-10-29 Richard Quirk - - * lib/checkother.cpp: Move string comparison out of the report - function - -2011-10-29 Reijo Tomperi - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fix #3256 - (Null pointer dereference not detected) - http://sourceforge.net/apps/trac/cppcheck/ticket/3256 It is now - detected if --inconclusive command line argument is given (the - argument is unofficial currently) - -2011-10-29 Marek Zmysłowski - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #3261 (Function 'find' - useless call. The variable 'str' is using function 'find' against - itself) - -2011-10-29 Edoardo Prezioso - - * lib/tokenize.cpp: Tokenizer time improvements (time says real: -1 - second) 1)change tokAt(1|-1) with next()|previous() with conditions - where necessary; 2)change strAt(1|-1) with next()|previous()->str() - with conditions where necessary; 3)change tokAt(n)->str(), with n != - -1,1, to strat(n); 4)change simplifyFuncInWhile implementation - because it was too slow and stupid. - -2011-10-29 Edoardo Prezioso - - * lib/checkother.cpp, lib/tokenize.cpp: Definitely check correctly - 'sizeof %num%' when '%num%' has '-' sign. - -2011-10-28 Thomas Jarosch - - * lib/checkunusedvar.cpp: Fix logic glitch Reported by Pc-Lint 9.x :o) The code was working before as the AND operation also matched in - that specific case. I verified that code is in use by commenting it out and checked how - many tests failed. - -2011-10-28 Thomas Jarosch - - * .gitignore: Update .gitignore * KDE text editor backup files * stuff from broken patches * kdevelop 4.x files - -2011-10-28 Thomas Jarosch - - * Makefile, lib/checkinternal.cpp, lib/checkinternal.h, - lib/lib.pri, lib/settings.cpp, test/testcmdlineparser.cpp, - test/testinternal.cpp: Add check for cppcheck's internal API usage - (#3263) First checks: - Simple pattern used inside Token::Match() - Complex pattern used inside Token::simpleMatch() The checks get enabled by passing "--enable=internal". It's not - included in "--enable=all". If you see something that needs further tweaking, just go for it! - -2011-10-28 Thomas Jarosch - - * test/testnullpointer.cpp: Run astyle - -2011-10-28 Thomas Jarosch - - * gui/test/data/benchmark/simple.cpp, test/testmemleak.cpp, - test/testtoken.cpp: Use Token::simpleMatch() / - Token::findsimplematch() where possible - -2011-10-28 Richard Quirk - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Warn - when sizeof is used in strncmp ticket #2095 This checks for the case where the user thought sizeof(buf) gave the - size in bytes of 'buf' in code like the following: const char *buf = "Hello World"; strncmp(buf, other, sizeof(buf)); - -2011-10-28 Richard Quirk - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Add - check for comparison of identical string variables - -2011-10-28 Richard Quirk - - * lib/checkother.cpp, test/testother.cpp: Add strncmp to the list of - static string comparison functions - -2011-10-28 Ville Skyttä - - * Makefile, tools/dmake.cpp: Makefile: Use pcre-config to get - include/lib paths etc - -2011-10-28 Edoardo Prezioso - - * lib/token.cpp: Improve nextArgument by returning 0 if there's an - unexpected ';'. - -2011-10-28 Thomas Jarosch - - * lib/tokenize.cpp: Use new findsimplematch API for simple patterns - -2011-10-28 Edoardo Prezioso - - * lib/tokenize.cpp: Complete todo: convert 'for' into 'while'. It's - not possible to enable this code because of the disaster it will be - created for all the checks with the 'for' pattern. - -2011-10-27 Ettl Martin - - * test/testnullpointer.cpp: added unittest for ticket #1780 - -2011-10-27 PKEuS - - * test/testsimplifytokens.cpp, test/testtokenize.cpp: Fixes false - positives in test suite, adds unit test for void-simplification - -2011-10-27 PKEuS - - * lib/tokenize.cpp: Tokenizer: Simplify 'foo(void)' to 'foo()' - -2011-10-27 PKEuS - - * lib/tokenize.h: Improved isJavaOrCSharp, isC and isCPP. Fixed isC - for files with includes. - -2011-10-27 Thomas Jarosch - - * lib/tokenize.cpp: Bugfix: Use Token::Match instead of - Token::simpleMatch because it's a complex pattern This bug was in here before my recent refactoring. (And yes, I wrote a check for cppcheck's Token::Match invocation ;)) - -2011-10-27 Thomas Jarosch - - * lib/checkbufferoverrun.cpp, lib/checkclass.cpp, - lib/checkmemoryleak.cpp, lib/checkother.cpp, lib/executionpath.cpp, - lib/preprocessor.cpp, lib/token.cpp, lib/token.h, lib/tokenize.cpp: - Implement Token::findsimplematch und use it for simple patterns - -2011-10-27 Thomas Jarosch - - * lib/checkautovariables.cpp, lib/checkbufferoverrun.cpp, - lib/checkclass.cpp, lib/checkmemoryleak.cpp, lib/checkother.cpp, - lib/checkstl.cpp, lib/checkunusedvar.cpp, lib/symboldatabase.cpp, - lib/tokenize.cpp: Use Token::simpleMatch instead of Token::Match for - simple patterns - -2011-10-27 Daniel Marjamaki - - * lib/checkassignif.h, lib/checkother.h: minor formatting updates of - --doc output - -2011-10-27 Edoardo Prezioso - - * lib/tokenize.cpp: Added code for simplification of 'for ( a; b; - c;); -> '{ a; for (; b; c;) ; }'. It's not enabled because it fails - many tests with testrunner. - -2011-10-27 Edoardo Prezioso - - * lib/tokenize.cpp: Move the simplification of 'strlen' in - simplifyTokenList. This way it's possible to omit the call to - simplifyKnownVariables before 'strlen'. - -2011-10-26 seb777 - - * lib/tokenize.h: fix isC method (.C files are C code files) - -2011-10-26 Thomas Jarosch - - * lib/checkstl.cpp, test/teststl.cpp: STL check: Detect return of - implict string conversion + .c_str() Examples are: std::string msg; return ("ERROR: " + msg).c_str(); or return ("ERROR: " + std::string("crash me")).c_str(); - -2011-10-26 Thomas Jarosch - - * lib/checkstl.cpp, test/teststl.cpp: STL check: Check if someone - tries to return std::string(crash_me).c_str() - -2011-10-26 Thomas Jarosch - - * lib/tokenize.h: Run astyle - -2011-10-26 Thomas Jarosch - - * lib/checkstl.cpp, test/teststl.cpp: STL check: Look for - string.c_str() / stringstream.str().c_str() "return" usage (object - is destroyed on return) - -2011-10-26 seb777 - - * lib/checkother.cpp, lib/tokenize.h: Fixed Ticket 2144 (false - negatives: Old Style Pointer Cast apply only on .cpp files) - -2011-10-25 seb777 - - * : commit 1a6706005f204c3ccf62651a3671b772d0037e32 Author: seb777 - Date: Tue Oct 25 22:38:23 2011 +0200 - -2011-10-25 Daniel Marjamäki - - * : Merge pull request #46 from rpavlik/patch-1 Use forward slashes in resource file to support cross-building. - -2011-10-25 Daniel Marjamaki - - * lib/preprocessor.cpp: Preprocessor: Report missing includes during - 'normal' preprocessing. Ticket: #2131 - -2011-10-24 Daniel Marjamäki - - * : Merge pull request #47 from rpavlik/patch-2 Remove 'help' from qmake profile - -2011-10-24 Marek Zmysłowski - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: Fixed #3174 - (New check: Useless calls of STL functions) - -2011-10-24 Daniel Marjamäki - - * : commit d3ede39d24c7986dc42a32edfa53209eb5d91022 Author: Ryan - Pavlik Date: Mon Oct 24 15:41:21 2011 -0500 - -2011-10-24 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: astyle formatting - -2011-10-24 Daniel Marjamäki - - * test/testpreprocessor.cpp: Preprocessor: updated tests - -2011-10-24 Thomas Jarosch - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Refactor readlink() buffer check to also - handle readlinkat() - -2011-10-24 Daniel Marjamaki - - * lib/preprocessor.cpp: Preprocessor: Make it possible to use the - 'normal' preprocessor by using special command -DCPPCHECK-TEST. - Ticket: #2131 - -2011-10-24 Daniel Marjamaki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - handle '#undef' better. Ticket: #2131 - -2011-10-24 Daniel Marjamaki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - Improved 'normal' preprocessing. better handling of multiple #elif - and #else blocks - -2011-10-24 Daniel Marjamaki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - Better 'normal' preprocessing. Simple handling of '#elif' - -2011-10-24 Daniel Marjamäki - - * webreport.sh: webreport: updated scp command - -2011-10-24 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: dmake: disabled -Wunreachable-code - because there was too many warnings - -2011-10-24 Edoardo Prezioso - - * Makefile, lib/token.cpp, lib/token.h, lib/tokenize.cpp, - lib/tokenize.h, tools/dmake.cpp: Add new warning option to check for - dead code and change the order of some struct members to reduce - structure padding. - -2011-10-24 Reijo Tomperi - - * test/testnullpointer.cpp: Improve null pointer dereference test - coverage - -2011-10-23 Thomas Jarosch - - * lib/token.h: Clarify Token::concatStr() documentation - -2011-10-23 Reijo Tomperi - - * cppcheck.cbp: Update codeblocks project file - -2011-10-23 Thomas Jarosch - - * lib/token.h, test/testtoken.cpp: Document and test - Token::concatStr() - -2011-10-23 Thomas Jarosch - - * lib/token.cpp, lib/token.h, test/testtoken.cpp: Bugfix: Update - token properties on string changes - -2011-10-23 Daniel Marjamäki - - * webreport.sh: webreport: minor updates - -2011-10-23 Daniel Marjamaki - - * lib/preprocessor.cpp, lib/preprocessor.h, - test/testpreprocessor.cpp: Preprocessor: updates to 'normal' - preprocessing - -2011-10-23 PKEuS - - * lib/checkbufferoverrun.cpp: Make checkSprintfCall using - nextArguments() - -2011-10-23 Daniel Marjamäki - - * test/test.pro: test/test.pro: indentation update - -2011-10-23 Daniel Marjamaki - - * cli/cppcheck.vcxproj, cli/cppcheck.vcxproj.filters, - cppcheck_vs2010.sln, test/test.pro, test/testrunner.vcproj, - test/testrunner.vcxproj, test/testrunner.vcxproj.filters: Visual - Studio: auto generated new visual studio project files - -2011-10-23 PKEuS - - * lib/checknullpointer.cpp: Bugfix: checknullpointer worked - incorrect for complex first - -2011-10-23 Thomas Jarosch - - * Makefile, lib/checkboost.cpp, lib/checkboost.h, lib/lib.pri, - lib/preprocessor.cpp, lib/tokenize.cpp, test/testboost.cpp: Fixed - #3232 (Check if container is modified inside BOOST_FOREACH) - -2011-10-23 Daniel Marjamäki - - * : Merge pull request #44 from makulik/master #3244 'Get include pathes from file' - -2011-10-23 Thomas Jarosch - - * test/testother.cpp: Fixed #3187 (Remove code duplication in - 'other' unit test) - -2011-10-23 PKEuS - - * lib/checknullpointer.cpp, lib/token.cpp, lib/token.h, - test/testtoken.cpp: Added Token::nextArgument() - -2011-10-23 makulik - - * cli/cmdlineparser.cpp, test/testcmdlineparser.cpp: Signed-off-by: - Günther Makulik - -2011-10-23 unknown - - * cli/cmdlineparser.cpp, man/cppcheck.1.xml: Signed-off-by: Günther - Makulik - -2011-10-23 Erik Lax - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #3237 (Bug in - parser of class operator functions) - -2011-10-23 Daniel Marjamäki - - * test/testcmdlineparser.cpp: Test: Fixed testing - -2011-10-23 Daniel Marjamäki - - * cli/cmdlineparser.cpp, test/testcmdlineparser.cpp: astyle - formatting - -2011-10-23 Daniel Marjamäki - - * : Merge pull request #43 from makulik/master #3244 'Get include pathes from file' - -2011-10-22 Reijo Tomperi - - * lib/checkstl.cpp: Added support for C++11's - cend/crend/cbegin/crbegin functions in some STL checks Patch from: - PKEuS - -2011-10-22 Reijo Tomperi - - * lib/checkother.cpp, test/testother.cpp: Improved memset with 0 - bytes check. TODO done (unit test). Patch from: PKEuS - - -2011-10-22 unknown - - * cli/cmdlineparser.cpp, test/testcmdlineparser.cpp: #3244 'Get - include pathes from file' Signed-off-by: Günther Makulik - -2011-10-22 Edoardo Prezioso - - * lib/checkother.cpp, test/testother.cpp: Improve fix of #934 (be - careful of macros code). - -2011-10-22 PKEuS - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #934 (new check: missuse of std::cout) - -2011-10-22 Tim Gerundt - - * htdocs/index.php: Web: Update download to version 1.51 - -2011-10-22 Edoardo Prezioso - - * Makefile, lib/executionpath.h, lib/symboldatabase.cpp, - tools/dmake.cpp: Add more warnings and fix the ones reported by - them. - -2011-10-22 Johan Samuelson - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #3123 ([False - Positive] Shadowed enum) - -2011-10-22 Edoardo Prezioso - - * Makefile: Run tools/dmake. - -2011-10-22 Daniel Marjamäki - - * lib/tokenize.cpp: made 'variableHidingTypedef' inconclusive. See - ticket #3199 - -2011-10-22 Erik Lax - - * lib/checkobsoletefunctions.cpp, test/testobsoletefunctions.cpp: - Fixed #3238 (Crash in obsolete functions check.) - -2011-10-22 PKEuS - - * lib/checknonreentrantfunctions.cpp, lib/checkother.cpp: - checkMathFunctions: Refactoring the check - -2011-10-22 Thomas Jarosch - - * lib/checknonreentrantfunctions.cpp, - lib/checknonreentrantfunctions.h, - test/testnonreentrantfunctions.cpp: Fix #3243 (Improve non reentrant - function check) - Use std::map instead of linear std::list walk and run fast tests like tok->isName() first. Global speed up is 4.8% (profiled with google-perftools) - Catch function invocations in global namespace and ignore other namespaces except "std". std::localtime() and others are also non-thread safe on POSIX. Note: The check matches f.e. also on "std::getrpcbyname()", but that would result in a compile error anyway. No need to have an extra "std::xxxxx" whitelist. - Remove double listed "rand" and "getrpcbyname" function names - -2011-10-22 Daniel Marjamäki - - * cli/cmdlineparser.cpp, lib/settings.h, test/testcmdlineparser.cpp: - astyle formatting - -2011-10-22 Marek Zmysłowski - - * lib/standards.h: Fixed #3204 (Refactor standards support in - Settings) - -2011-10-22 Daniel Marjamäki - - * : Merge pull request #41 from gansb/master std::istream used but not declared. - -2011-10-22 Marek Zmysłowski - - * cli/cmdlineparser.cpp, lib/checkbufferoverrun.cpp, - lib/checknonreentrantfunctions.cpp, lib/checkobsoletefunctions.cpp, - lib/settings.cpp, lib/settings.h, lib/tokenize.cpp, - test/testbufferoverrun.cpp, test/testcmdlineparser.cpp, - test/testnonreentrantfunctions.cpp, test/testnullpointer.cpp, - test/testobsoletefunctions.cpp: Fixed #3204 (Refactor standards - support in Settings) - -2011-10-20 Edoardo Prezioso - - * test/testother.cpp: Nitpicky fix of the missing ';' after the - memset command inside the test case. - -2011-10-20 Benjamin Goose - - * lib/symboldatabase.cpp: Qualify fill_n properly. Relying on ADL isn't a good idea as it's not always well - implemented. - -2011-10-20 Benjamin Goose - - * lib/path.cpp: Add condition for HP-UX. - -2011-10-20 Benjamin Goose - - * lib/tokenize.h: Include for std::istream. - -2011-10-19 seb777 - - * lib/checkobsoletefunctions.cpp, test/testobsoletefunctions.cpp: - Fixed ticket #3133 (Improve Check: Found obsolete function) - add check for std::gets - improve check when multiple obsolete functions are used - remove false positive (declared functions) - -2011-10-19 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Improve tokenizer: - don't confuse between a label and the case/default statements. - -2011-10-19 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Improve tokenizing - of "do{ ... } while(0)". The simplification will be the same for - every combination, except for the 'continue' and the 'break'. In - that case, keep the block braces. - -2011-10-19 Edoardo Prezioso - - * lib/pcrerules.pri: Complete 'disable the rules by default' for - other platforms. - -2011-10-19 Edoardo Prezioso - - * lib/tokenize.cpp: Runastyle + removal of useless conditions after - previous commit. - -2011-10-19 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #3227 - (Improve tokenizer: labels are not handled correctly after a case or - another label instruction) Moved the labels simplification after - combining the tokens and moved the case/default simplification - inside the labels. - -2011-10-05 Joshua Beck - - * cli/cmdlineparser.cpp, lib/cppcheck.cpp, lib/settings.cpp, - lib/settings.h, man/cppcheck.1.xml, test/testcmdlineparser.cpp: Add - option to set #ifdef configuration check limit - -2011-10-18 Edoardo Prezioso - - * lib/mathlib.cpp, lib/tokenize.cpp, test/testsimplifytokens.cpp: - Fixed ticket #3229 (Segfault with goto): Don't handle labels, gotos, - returns and indentations inside the round braces. This is applied - not only for simplifyGoto, but also to simplifyFlowControl. Rewrite - enum badly handled by astyle inside mathlib.cpp and move - simplifyFlowControl at the end of the simplifyTokenList in order to - catch more dead code, not related to the ticket. - -2011-10-18 PKEuS - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #3223 (Improve check: - Check more STL algorithms for missmatching containers check) - -2011-10-18 PKEuS - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #3225 (Boolean comparison with string literals) - -2011-10-18 Daniel Marjamäki - - * lib/check.h, lib/checknullpointer.cpp, test/testnullpointer.cpp: - Fixed #3220 (False positive: possible null pointer dereference: - 'SwDoc *pDoc = NULL; pDoc->do_something();') - -2011-10-17 Daniel Marjamäki - - * lib/preprocessor.cpp: gcc: fixed compiler warnings/errors - -2011-10-17 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: Makefile: Disable rules by default - -2011-10-17 Daniel Marjamaki - - * lib/preprocessor.cpp, lib/preprocessor.h, - test/testpreprocessor.cpp: Preprocessor: Started working on new - preprocessing that uses -D information better. Ticket: #2131 - -2011-10-17 Edoardo Prezioso - - * lib/tokenize.cpp: Remove redundant function findmatch inside - tokenize.cpp. There's Token::findmatch which is already used inside - other Tokenizer functions. - -2011-10-17 Edoardo Prezioso - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed mispelled function name; changed variable name inside - simplifyFlowControl for consistency; improved simplifyFlowControl to - handle better this kind of code: "return; { { } { label : ; ok ( ) ; - } }"->"return ; { { label: ok ( ) ; } }". - -2011-10-16 Edoardo Prezioso - - * test/testmemleak.cpp: Removed redundant test, which was related to - the Tokenizer, not to the memory leak checker. - -2011-10-16 Daniel Marjamäki - - * gui/filelist.h, gui/translationhandler.h, lib/symboldatabase.h: - fixed a few doxygen warnings - -2011-10-16 Daniel Marjamäki - - * cli/cmdlineparser.cpp: cli: updated help text for --std option - -2011-10-16 Ettl Martin - - * lib/tokenize.cpp: fixed regression on linux due to missing include - -2011-10-16 PKEuS - - * cli/cmdlineparser.cpp, lib/settings.cpp, lib/settings.h, - lib/tokenize.cpp, test/testcmdlineparser.cpp, - test/testnullpointer.cpp: Fixed #2470 (False negative: Possible null - pointer dereference (C++0x keyword 'nullptr')) - -2011-10-16 Daniel Marjamäki - - * lib/token.h: Token: Updated comments - -2011-10-16 Thomas Jarosch - - * lib/checkother.cpp, lib/checkother.h, lib/tokenize.cpp, - lib/tokenize.h, test/testbufferoverrun.cpp, test/testtokenize.cpp: - Fix #3208 (Simplify pointer to standard type, C only) The symbol database is unavailable during token simplification and - &data[0] might return something completely different for C++. Moved code_is_c() from checkOther to Tokenizer. - -2011-10-16 Daniel Marjamäki - - * cli/filelister.cpp, cli/pathmatch.cpp, lib/preprocessor.cpp, - lib/symboldatabase.cpp: Borland: Fixed compiler errors - -2011-10-16 Daniel Marjamäki - - * lib/checknullpointer.cpp: astyle formatting - -2011-10-16 PKEuS - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed ##3211 - (Crash in gitHEAD when arglist count is smaller than format string) - -2011-10-15 Edoardo Prezioso - - * lib/tokenize.cpp, lib/tokenize.h: Changed the name of the removal - of dead code after flow control statements for consistency - (simplifyDeadCode is too generalized as name) - -2011-10-15 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed ticket #3138 - (Tokenizer: remove unreachable code below goto inside a - namespace|class|struct block) - -2011-10-15 Edoardo Prezioso - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed ticket #3113 (complete simplification of dead code after - control flow statements) - -2011-10-14 Thomas Jarosch - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #3210 (STL check: Add - support for reverse iterator) - -2011-10-14 Thomas Jarosch - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Fixed #3198 (Add check for readlink()) - -2011-10-13 Daniel Marjamäki - - * : Merge pull request #39 from neuschaefer/codespell.v2 codespell v2 - -2011-10-13 Daniel Marjamäki - - * cli/cmdlineparser.cpp, cli/cmdlineparser.h, - cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h, - cli/filelister.cpp, cli/filelister.h, cli/pathmatch.cpp, - cli/pathmatch.h, cli/threadexecutor.cpp, cli/threadexecutor.h, - gui/aboutdialog.cpp, gui/aboutdialog.h, gui/application.h, - gui/applicationdialog.cpp, gui/applicationdialog.h, - gui/applicationlist.cpp, gui/applicationlist.h, - gui/checkstatistics.cpp, gui/checkstatistics.h, - gui/checkthread.cpp, gui/checkthread.h, gui/csvreport.cpp, - gui/csvreport.h, gui/erroritem.cpp, gui/erroritem.h, - gui/filelist.cpp, gui/filelist.h, gui/fileviewdialog.cpp, - gui/fileviewdialog.h, gui/logview.cpp, gui/logview.h, gui/main.cpp, - gui/mainwindow.cpp, gui/mainwindow.h, gui/platforms.cpp, - gui/platforms.h, gui/project.cpp, gui/project.h, - gui/projectfile.cpp, gui/projectfile.h, gui/projectfiledialog.cpp, - gui/projectfiledialog.h, gui/report.cpp, gui/report.h, - gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.cpp, - gui/resultsview.h, gui/settingsdialog.cpp, gui/settingsdialog.h, - gui/showtypes.cpp, gui/showtypes.h, gui/statsdialog.cpp, - gui/statsdialog.h, gui/test/benchmark/simple/benchmarksimple.cpp, - gui/test/benchmark/simple/benchmarksimple.h, - gui/test/data/benchmark/simple.cpp, - gui/test/filelist/testfilelist.h, - gui/test/projectfile/testprojectfile.h, - gui/test/translationhandler/testtranslationhandler.h, - gui/test/xmlreport/testxmlreport.h, - gui/test/xmlreportv1/testxmlreportv1.h, - gui/test/xmlreportv2/testxmlreportv2.h, gui/threadhandler.cpp, - gui/threadhandler.h, gui/threadresult.cpp, gui/threadresult.h, - gui/translationhandler.cpp, gui/translationhandler.h, - gui/txtreport.cpp, gui/txtreport.h, gui/xmlreport.cpp, - gui/xmlreport.h, gui/xmlreportv1.cpp, gui/xmlreportv1.h, - gui/xmlreportv2.cpp, gui/xmlreportv2.h, lib/check.h, - lib/check64bit.cpp, lib/check64bit.h, lib/checkassignif.cpp, - lib/checkassignif.h, lib/checkautovariables.cpp, - lib/checkautovariables.h, lib/checkbufferoverrun.cpp, - lib/checkbufferoverrun.h, lib/checkclass.cpp, lib/checkclass.h, - lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h, - lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - lib/checknonreentrantfunctions.cpp, - lib/checknonreentrantfunctions.h, lib/checknullpointer.cpp, - lib/checknullpointer.h, lib/checkobsoletefunctions.cpp, - lib/checkobsoletefunctions.h, lib/checkother.cpp, lib/checkother.h, - lib/checkpostfixoperator.cpp, lib/checkpostfixoperator.h, - lib/checkstl.cpp, lib/checkstl.h, lib/checkuninitvar.cpp, - lib/checkuninitvar.h, lib/checkunusedfunctions.cpp, - lib/checkunusedfunctions.h, lib/checkunusedvar.cpp, - lib/checkunusedvar.h, lib/cppcheck.cpp, lib/cppcheck.h, - lib/errorlogger.cpp, lib/errorlogger.h, lib/executionpath.cpp, - lib/executionpath.h, lib/mathlib.cpp, lib/mathlib.h, lib/path.cpp, - lib/path.h, lib/preprocessor.cpp, lib/preprocessor.h, - lib/settings.cpp, lib/settings.h, lib/suppressions.cpp, - lib/suppressions.h, lib/symboldatabase.cpp, lib/symboldatabase.h, - lib/timer.cpp, lib/timer.h, lib/token.cpp, lib/token.h, - lib/tokenize.cpp, lib/tokenize.h, runastyle, runastyle.bat, - test/options.cpp, test/options.h, test/redirect.h, - test/test64bit.cpp, test/testassignif.cpp, - test/testautovariables.cpp, test/testbufferoverrun.cpp, - test/testcharvar.cpp, test/testclass.cpp, - test/testcmdlineparser.cpp, test/testconstructors.cpp, - test/testcppcheck.cpp, test/testdivision.cpp, - test/testerrorlogger.cpp, test/testexceptionsafety.cpp, - test/testfilelister.cpp, test/testincompletestatement.cpp, - test/testmathlib.cpp, test/testmemleak.cpp, - test/testnonreentrantfunctions.cpp, test/testnullpointer.cpp, - test/testobsoletefunctions.cpp, test/testoptions.cpp, - test/testother.cpp, test/testpath.cpp, test/testpathmatch.cpp, - test/testpostfixoperator.cpp, test/testpreprocessor.cpp, - test/testsimplifytokens.cpp, test/teststl.cpp, test/testsuite.cpp, - test/testsuite.h, test/testsuppressions.cpp, - test/testsymboldatabase.cpp, test/testthreadexecutor.cpp, - test/testtoken.cpp, test/testtokenize.cpp, test/testuninitvar.cpp, - test/testunusedfunctions.cpp, test/testunusedprivfunc.cpp, - test/testunusedvar.cpp, test/testutils.h, tools/dmake.cpp, - tools/extracttests.cpp: changed the astyle formatting flags - -2011-10-13 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fix ticket 3140 and - 3137 (Improve Tokenizer: Remove dead for loop - simplify while(0) - better. Note: it doesn't remove dead code if there's a label - inside. Will be improved in another ticket. - -2011-10-13 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Remove redundant simplifyDeadCode call inside - the Tokenizer::tokenize and move the relative tests in the file - 'testsimplifytokens.cpp'. - -2011-10-13 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #2627 (switch case fall through: redundant strcpy) - -2011-10-12 PKEuS - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #3180 - (New check: Detect nullpointers given to printf via variable - argument list) - -2011-10-12 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: astyle formatting - -2011-10-12 Kimmo Varis - - * gui/erroritem.cpp, gui/erroritem.h, gui/resultstree.cpp, - gui/test/xmlreportv1/testxmlreportv1.cpp, - gui/test/xmlreportv2/testxmlreportv2.cpp, gui/threadresult.cpp, - gui/xmlreportv1.cpp, gui/xmlreportv2.cpp: GUI: Rename ErrorItem::id - to ErrorItem::errorId. - -2011-10-12 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #3163 (Out of bounds pointer arithmetic not reset) - -2011-10-12 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: - Tokenizer::removeMacrosInGlobalScope: Don't remove C/C++ keywords - namespace/struct/etc. Ticket: #3193 - -2011-10-12 Daniel Marjamäki - - * lib/check64bit.cpp, test/test64bit.cpp: Fixed #3150 (Invalid - warning when pointer difference is not adjacent) - -2011-10-12 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #3194 (Parsing glitch - causes false 'can be const' error for an 'if' statement) - -2011-10-12 Robert Reif - - * lib/checkother.cpp: run astyle - -2011-10-11 Marek Zmysłowski - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: improved realloc - checking '*p = realloc(*p,..'. Ticket: #1791 - -2011-10-11 Kimmo Varis - - * gui/checkstatistics.cpp, gui/checkstatistics.h, gui/common.h, - gui/gui.pro, gui/mainwindow.cpp, gui/resultstree.cpp, - gui/resultstree.h, gui/resultsview.cpp, gui/resultsview.h, - gui/showtypes.cpp, gui/showtypes.h, gui/statsdialog.cpp: GUI: Move - ShowTypes enum to own class and file. We are using ShowTypes around the GUI codebase so it makes sense to - have it in its own class. And the class also contains related helper - functions instead of scattering them around different classes. ShowTypes also contains the visibility settings for all the GUI - severities. Implementation in this commit makes ShowTypes class to - load the visibility settings when it is created. And save the - settings when it is destroyed. - -2011-10-11 Thomas Jarosch - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: [PATCH] - Detect suspicious use of semicolon after 'if/for/while' statements - if they are followed by a {..} block. Examples are: for (int i = 0; i < 10; ++i); { printf("i)"; } or if (i == 100); { die("Wrong argument"); } This new check is active if you enable inconclusive checks. - -2011-10-10 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #2955 (New check: Using && instead of &) - -2011-10-10 Edoardo Prezioso - - * lib/tokenize.cpp: Fixed some simple errors in some old commits. - -2011-10-10 Edoardo Prezioso - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed ticket #3140 - (Improve Tokenizer: Remove dead for loop 'for (int i = 0; i < 0; - ++i)') - -2011-10-09 PKEuS - - * lib/checkother.cpp, test/testother.cpp: Fixed #2115 (new check: - endless loop (unsigned comparison that is always true)) - -2011-10-09 Reijo Tomperi - - * cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h: Fix compiling on - VC++ after previous commit - -2011-10-09 Reijo Tomperi - - * cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h: Filter out - duplicate error messages in cli. - -2011-10-09 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3183 (False - positive: (error) syntax error) - -2011-10-09 Daniel Marjamäki - - * lib/checknullpointer.cpp, lib/checknullpointer.h, - test/testnullpointer.cpp: Null pointer: improved inconclusive - checking in CheckNullPointer::nullPointerAfterLoop - -2011-10-09 seb777 - - * lib/checkobsoletefunctions.cpp, test/testobsoletefunctions.cpp: - Fixed 3133 (Improve Check: Found obsolete function) - add check for std::gets - improve check when multiple obsolete functions are used - remove false positive (declared functions) - -2011-10-08 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: More fixes to the label - simplifier (related to ticket 3176): 1)Simplify the labels if there - are combinations of the symbols '*','&','{' and '(' after a '%var% - :' and before another '%var%'; 2)but do not simplify the label if - it's inside an unpreprocessed macro code. - -2011-10-08 Daniel Marjamäki - - * man/manual.docbook: manual: removed appendix. That info are - available in separate articles. - -2011-10-08 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointers: - fixed false negatives when there are '(p && ..' - -2011-10-08 Thomas Jarosch - - * test/testother.cpp, test/testthreadexecutor.cpp: Fixed #3181 (Add - missing return statements) - -2011-10-08 Stefan Weil - - * lib/settings.cpp: Settings: add missing initialisation for member - variable c99 (reported by Valgrind) - -2011-10-08 Daniel Marjamäki - - * createrelease: createrelease: added info about how scp is used to - upload files to release system - -2011-10-08 Daniel Marjamäki - - * Makefile: Makefile: Set debug mode - -2011-10-08 Daniel Marjamäki - - * Makefile: 1.51: Updated Makefile for release - -2011-10-08 Daniel Marjamäki - - * Changelog: 1.51: Updated Changelog - -2011-10-08 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, lib/cppcheck.cpp, - win_installer/productInfo.wxi: 1.51: Updated versions - -2011-10-08 Daniel Marjamäki - - * lib/checknullpointer.cpp: Added todo comments to fix false - negatives caused by my fix for #3128 - -2011-10-07 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #3128 - (False positive: null pointer dereference check does not handle - complex boolean logic properly) - -2011-10-07 Daniel Marjamäki - - * man/manual.docbook: Fixed #3115 (note windows limitation to - threading in the manual) - -2011-10-07 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_es.ts, - gui/cppcheck_fi.ts, gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_sr.ts, gui/cppcheck_sv.ts: GUI: Update translation - files. - -2011-10-07 Robert Reif - - * lib/symboldatabase.cpp, lib/tokenize.cpp: fix tokenizer and symbol - database to not mistake goto statement for variable declaration - -2011-10-06 Robert Reif - - * lib/tokenize.h: run astyle - -2011-10-07 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #3176 - (cppcheck reports wrong unused variable) Label simplification didn't - take count of the '(' parenthesis or the '&' and '*' operators - inside or outside the parenthesis after the colon. - -2011-10-06 Edoardo Prezioso - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: Renamed - the function 'removeRedundantCodeAfterReturn' with - 'simplifyDeadCode'. This is a preparation in order to add new - features to this function (see the @todo in the tokenize header - file, ticket #3113 and #3175 for details). - -2011-10-06 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Readded - CheckOther::bitwiseOnBoolean as inconclusive check - -2011-10-06 Marek Zmysłowski - - * cli/cmdlineparser.cpp, lib/checkobsoletefunctions.cpp, - lib/checkobsoletefunctions.h, lib/settings.h, - test/testcmdlineparser.cpp, test/testobsoletefunctions.cpp: Fixed - #3072 (improve check: deprecated function alloca) - -2011-10-05 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Removed - CheckOther::bitwiseOnBoolean check. The reasons can be seen in my - comments in ticket #3062. - -2011-10-05 PKEuS - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #1877 (Be more strict about int vs. bool, part II) - -2011-10-05 Thomas Jarosch - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Fixed #3161 (Show buffers size info for - snprintf() buffer overruns) - -2011-10-05 Edoardo Prezioso - - * : commit 3cfe7ca1a7176690174ed6fccb0d929d68eceef1 Author: Kimmo - Varis Date: Wed Oct 5 20:44:00 2011 +0300 - -2011-10-05 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #3148 - (Analysis failed on "Modules/mathmodule.c") Fix: Do not handle code - when 'return' is inside a macro. This is valid also for 'switch' - code inside a macro. - -2011-10-05 Kimmo Varis - - * gui/platforms.cpp: GUI: Rename default platform to "Build-in". "default" as platform name/definition doesn't tell much and would - only confuse users. "Build-in" is not perfect either but it is best - I've can come with before the release. Ticket: #3156 (GUI: "default" platform needs proper name) - -2011-10-05 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Fix enabling/disabling visibilities of - errors When GUI was started not all the categories visibility statuses were - not preserved. I.e. Ticket: #3087 (GUI does not show all reported files until a filter - button state is changed) - -2011-10-04 Reijo Tomperi - - * man/cppcheck.1.xml: Update man page - -2011-10-04 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3146 "Analysis - failed" error on softmagic.c: -Fixed: the code didn't check the - rightness of the switch syntax if it was inside another switch; - -Tweaked: removed the two bool variables, so now the conditions take - count of indentation unsigned variables. - -2011-10-03 Edoardo Prezioso - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3132 (Analysis - failed. If the code is valid then please report this failure.) - -2011-10-03 Kimmo Varis - - * gui/platforms.cpp: GUI: Fix endless loop in previous commit. The iterator was not advanced in the loop. So the code worked when I - ran it in Linux as the first item was matching. Thanks for Robert for spotting and reporting it. - -2011-10-02 Kimmo Varis - - * gui/mainwindow.cpp: GUI: In Windows platforms default to Win32 - ANSI. When running in Windows platforms, set the GUI's checked platform - initially to Windows 32-bit ANSI. Other platforms are set initially - to default/unspecified which means the type sizes are from the - platform GUI was compiled on. This was suggested by Rober in ticket #3119. - -2011-10-02 Kimmo Varis - - * gui/gui.pro, gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h, - gui/platforms.cpp, gui/platforms.h: GUI: Make platforms in GUI more - dynamic. We have now one list for checked platforms, menu items are created - dynamically based on that list. This makes it much easier to alter - the platforms list later on. - -2011-10-02 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #3159 - (Uninitialized variable false positive) - -2011-10-02 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #3125 - (FP: Possible null pointer dereference in conditional operator) - -2011-10-02 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #3126 - (false positive: Null pointer dereference) - -2011-10-02 Kimmo Varis - - * cli/cppcheckexecutor.cpp: CLI: case-insensitive ignorepath - matching in Windows. - -2011-10-02 Kimmo Varis - - * cli/pathmatch.cpp, cli/pathmatch.h, test/testpathmatch.cpp: CLI: - Add support for ignoring case in PathMatch. In Windows (or in Windows code?) we want to ignore case in the - paths. This patch implements the case ignore for the PathMatch- - class. - -2011-10-01 Stefan Weil - - * htdocs/site/simplepie/simplepie.inc: htdocs: fix typo in error - messages and php code (writeable -> writable) - -2011-09-30 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: fix #3153 - (false positive buffer access out-of-bounds) - -2011-09-30 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: another variation of false - negative from #3149 - -2011-09-30 Stefan Weil - - * lib/settings.cpp: test _WIN64 before _WIN32 (64-bit compiler - defines both macros) - -2011-09-30 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: really fix #3149 (false - negative: Technically the member function 'A::f' can be const.) - -2011-09-30 Kimmo Varis - - * test/testcmdlineparser.cpp: Disable fileListStdin test from - testcmdlineparser. That test hangs the test run. - -2011-09-29 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #3149 (false negative: - Technically the member function 'A::f' can be const.) - -2011-09-29 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #3151 (missing - portability warning for extra qualifier on destructor) - -2011-09-29 Robert Reif - - * test/testcmdlineparser.cpp: run astyle - -2011-09-29 Kimmo Varis - - * gui/common.h, gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h: - GUI: Add menu-selection for the checked platform. This is quick and dirty patch to add the platform selection for the - GUI. It is simple menu selection in Check-menu. It always defaults - to "Default" at startup. And it forget the selection when the - application is closed. Ticket: #3119 (GUI: add ability to specify platform type) - -2011-09-29 Kimmo Varis - - * : Merge pull request #37 from joshbeck/master Added support for reading file lists from stdin, correctly this time - -2011-09-28 Reijo Tomperi - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fix #2813 (False - negative: Uninitialized variable not found for realloc) - http://sourceforge.net/apps/trac/cppcheck/ticket/2813 Patch provided - by: marekzmyslowski - -2011-09-28 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h: refactor last commit to move - unknown type output to seperate function - -2011-09-27 Robert Reif - - * lib/tokenize.cpp: show unknown variable types when debug-messages - flag is set - -2011-09-27 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: fix - #3008 (New check: Order of initialisation list) - -2011-09-27 Joshua Beck - - * : Merge remote-tracking branch 'upstream/master' - -2011-09-27 Joshua Beck - - * cli/cmdlineparser.cpp, test/testcmdlineparser.cpp: Fix test and - add info to -h output. - -2011-09-26 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: add support for Microsoft - TCHAR character constants - -2011-09-26 Joshua Beck - - * man/cppcheck.1.xml, test/testcmdlineparser.cpp: Updated manual and - added test for reading file list from stdin. - -2011-09-26 Robert Reif - - * lib/checkother.cpp, test/testother.cpp: reduce false negatives for - checking for CheckOther::checkSignOfUnsignedVariable() - -2011-09-26 Joshua Beck - - * cli/cmdlineparser.cpp: Added support for reading file lists from - stdin - -2011-09-26 Kimmo Varis - - * cppcheck.sln, cppcheck_vs2010.sln: Update VS solution files for - test project name change. - -2011-09-26 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_es.ts, - gui/cppcheck_fi.ts, gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_sr.ts, gui/cppcheck_sv.ts: GUI: Update translation - files. - -2011-09-26 Kimmo Varis - - * gui/statsdialog.cpp: GUI: Make statistics dialog text - translatable. Refactor the code formatting statistics dialog content so that the - strings are easier to translate. Old formatting with embedded HTML - was practically impossible for translators to translate. New code - isn't very beautiful either but at least translating is now - possible. Ticket: #2726 (GUI: HTML-formatted statistics report text hard to - translate) - -2011-09-25 Kimmo Varis - - * gui/project.cpp, gui/projectfile.ui, gui/projectfiledialog.cpp, - gui/projectfiledialog.h: GUI: Rename functions related to excluding. - -2011-09-25 Kimmo Varis - - * gui/test/projectfile/testprojectfile.cpp: GUITESTS: Rename - variable for consistency. - -2011-09-25 Kimmo Varis - - * gui/test/data/benchmark/simple.cpp: GUITESTS: Remove include lines - from test data. The included files aren't found anyway so the lines are useless and - can add more variance (filesystem access) to the results. - -2011-09-25 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: add some Windows TCHAR - scanf and printf conversions - -2011-09-24 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: start adding Windows wide - character support - -2011-09-24 Robert Reif - - * cli/cmdlineparser.cpp, lib/settings.cpp, lib/settings.h, - lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp, - test/testtokenize.cpp: start adding Windows ASCII TCHAR conversion - support - -2011-09-24 seb777 - - * lib/checkobsoletefunctions.cpp, test/testobsoletefunctions.cpp: - fix #3121 ([False Positive] Incorrect obsoleted functions) - -2011-09-23 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: add operator - support to ertra qualification check - -2011-09-22 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: fix for - loop false positives when zero length arrays present - -2011-09-22 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp, - test/testtokenize.cpp: add Microsoft memory function conversions to - standard cstring functions - -2011-09-21 Robert Reif - - * lib/checkunusedfunctions.cpp, test/testunusedfunctions.cpp: fix - #3127 ([False positive] _tmain function i VS 2010 project) - -2011-09-21 Robert Reif - - * test/testuninitvar.cpp: fix typo in last commit - -2011-09-21 Robert Reif - - * test/testuninitvar.cpp: add test case for false negatives - introduced by fix for 3106 - -2011-09-20 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: add some more windows - type conversions - -2011-09-20 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #3106 (False - positive: Uninitialized variable check has inconsistent behavior - with ternary operator) - -2011-09-20 Johan Samuelson - - * lib/token.cpp: Fixed #3118 (Tokenizer: str*cmp() in hot spot code) - -2011-09-20 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: only simplify Microsoft - MFC code when Windows platform is selected - -2011-09-19 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: add some common windows - pointer type conversions to standard types - -2011-09-19 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: fix #3124 - (FP: Buffer access out-of-bounds when memset two dimension array - (a[5][6])) - -2011-09-19 Robert Reif - - * cli/cmdlineparser.cpp: fix width of platform help text - -2011-09-18 Robert Reif - - * lib/settings.cpp: set windows platform type to type executable was - compiled on - -2011-09-18 Robert Reif - - * lib/settings.cpp, lib/settings.h, lib/tokenize.cpp, - test/testtokenize.cpp: start adding conversions from common Windows - types to standard types - -2011-09-18 Robert Reif - - * lib/checkunusedfunctions.cpp: run astyle - -2011-09-18 Daniel Marjamäki - - * : Merge pull request #35 from simartin/ticket_3059 Ticket 3059: Report the correct line number in unused functions - warnings - -2011-09-18 Robert Reif - - * lib/settings.cpp, test/testtokenize.cpp: fix sizeof long double - for unix64 for #2888 (Allow defining sizes of base types) - -2011-09-18 Kimmo Varis - - * gui/test/benchmark/simple/benchmarksimple.cpp, - gui/test/benchmark/simple/benchmarksimple.h: GUITESTS: Add benchmark - for tokenize + simplify. - -2011-09-18 Simon Martin - - * lib/checkunusedfunctions.cpp, lib/checkunusedfunctions.h, - test/testunusedfunctions.cpp: Ticket 3059: Report the correct line - number in unused functions warnings - -2011-09-17 Robert Reif - - * cli/cmdlineparser.cpp, lib/settings.cpp, lib/settings.h, - lib/tokenize.cpp, test/testtokenize.cpp: fix #2888 (Allow defining - sizes of base types) - -2011-09-17 Kimmo Varis - - * : Merge pull request #34 from simartin/clang_build Make the build warning clean with clang++ - -2011-09-17 Simon Martin - - * test/testcmdlineparser.cpp: Make the build warning clean with - clang++ - -2011-09-16 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix wrong information - about constness of function - -2011-09-16 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix a problem with Qt - slots immediately followed by signals - -2011-09-14 Robert Reif - - * lib/checkclass.cpp: better fix for #3114 (infinite recursion when - operator= is overloaded) - -2011-09-14 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: quick fix for #3114 - (infinite recursion when operator= is overloaded) - -2011-09-13 Kimmo Varis - - * test/testcmdlineparser.cpp: Tests: Add more commandlineparser - tests. Add commandlineparser tests for giving two suppressions. Giving two - suppressions in one parameter is not yet supported so it is - todo-test. - -2011-09-13 Edoardo Prezioso - - * lib/tokenize.cpp, lib/tokenize.h, test/testclass.cpp, - test/testmemleak.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Fixed #3075 (False positive => Improve - tokenizer: remove redundant code after a 'return' state) - -2011-09-12 Robert Reif - - * test/testother.cpp: add test for #3110 (false positve: style) - Boolean result is used in bitwise operation. Clarify expression with - parentheses) - -2011-09-12 seb777 - - * test/testtokenize.cpp: Remove invalid test case. The code does - not compile. In addition, it's a "todo test case". - -2011-09-12 Robert Reif - - * lib/checkother.cpp: fix #3110 (false positve: style) Boolean - result is used in bitwise operation. Clarify expression with - parentheses) - -2011-09-11 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: partial - fix for #2960 (false negative: buffer access out of bounds) - -2011-09-11 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/symboldatabase.cpp, - test/testbufferoverrun.cpp: add multi-dimension array support to - second checkScope and use it for member arrays - -2011-09-11 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: use correct checkScope function in - CheckBufferOverrun for single dimension member arrays - -2011-09-11 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: refactor - to unify functionally identical code in - CheckBufferOverrun::checkScope() - -2011-09-11 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h: refactor - CheckBufferOverrun to only use multi-dimension array error messages - and remove single dimension array message - -2011-09-11 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #3086 (false - positive: Boolean result is used in bitwise operation.) - -2011-09-11 Daniel Marjamäki - - * lib/tokenize.cpp, test/testunusedvar.cpp: Fixed #3104 (unread - despite modified and used in IF statement) - -2011-09-11 Daniel Marjamäki - - * lib/checkunusedvar.cpp: unused var: use 'else if' instead of 'if' - -2011-09-11 seb777 - - * lib/tokenize.cpp, test/testtokenize.cpp: Revert "The case - statement requires constant-expression (C, C++, C# and Java." This reverts commit 5879fe419d72328d77ab9d6f717ffa81e4ab6e68. - -2011-09-10 seb777 - - * lib/tokenize.cpp, test/testtokenize.cpp: The case statement - requires constant-expression (C, C++, C# and Java. Needless to - simplify the calculation of a piece of code that can not compile. - -2011-09-10 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h: refactor - CheckBufferOverrun::checkScope to take an ArrayInfo parameter - -2011-09-10 Robert Reif - - * : commit 547a79d4feac46b7d3ba04a091838669618a9b20 Author: Robert - Reif Date: Sat Sep 10 10:14:32 2011 -0400 - -2011-09-10 Philipp Kloke - - * lib/checkother.cpp, test/testother.cpp: Fixed #1740 (Undefined - Behavior: Divide by zero) - -2011-09-10 seb777 - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #3093 (Simplify code - (math expression) with keywords 'return' and 'case') - -2011-09-09 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: better - detection of variable sized structure in - CheckBufferOverrun::checkStructVariable() - -2011-09-09 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: fix some - CheckBufferOverrun::checkStructVariable() flase negatives for - possible variable length structs - -2011-09-09 Robert Reif - - * : commit 16924c7c7ad77a53b41e90f17cfe2ff75411f3f3 Author: Robert - Reif Date: Fri Sep 9 07:16:39 2011 -0400 - -2011-09-09 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #3096 (false - negative: memory leak not found when passing string to strtok) - -2011-09-08 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: fix one of - the TODO testcases added for #3094 (Buffer access out-of-bounds in - struct variable) - -2011-09-08 Robert Reif - - * test/testbufferoverrun.cpp: add soem test cases for #3094 (Buffer - access out-of-bounds in struct variable) - -2011-09-08 Daniel Marjamäki - - * lib/checkmemoryleak.h, lib/path.h: fixed a few doxygen warnings - -2011-09-08 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h: updated comments - -2011-09-06 seb777 - - * lib/checkother.cpp, test/testother.cpp: fix #195 Unusual shift - operation - check this kind of code return x >> ! y ? 8 : 2; - -2011-09-05 Robert Reif - - * lib/checkbufferoverrun.cpp: fix some -Wconversion - -Wsign-conversion warnings in checkbufferoverrun.cpp - -2011-09-05 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: warn when buffer is not zero terminated - after memmove - -2011-09-05 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: warn when buffer is not zero terminated - after memcpy - -2011-09-05 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: warn when buffer is not zero terminated - after strncpy - -2011-09-05 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testuninitvar.cpp: Uninitialized - vars: handle printf a little better. Ticket: #3050 - -2011-09-05 Daniel Marjamäki - - * lib/checkuninitvar.cpp, lib/checkuninitvar.h, - test/testuninitvar.cpp: uninitstring: fix false negatives when - non-zero memset is used. Ticket: #3050 - -2011-09-05 Robert Reif - - * lib/checkother.cpp: really fix #3079 (Spelling error in unsigned - variable check 'never alwayw') - -2011-09-05 Robert Reif - - * lib/checkother.cpp: fix #3079 (Spelling error in unsigned variable - check 'never alwayw') - -2011-09-04 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: fix #2528 - (false negative: buffer access out of bounds) - -2011-09-04 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: fix #2889 - (false negative: buffer access out of bounds on local struct member) - -2011-09-04 Daniel Marjamäki - - * lib/checkunusedvar.cpp, test/testunusedvar.cpp: Fixed #3078 - (vector::at using int causes false positive) - -2011-09-04 Kimmo Varis - - * test/testcmdlineparser.cpp: Tests: Add tests for new --enable - flags. Adding tests for new --enable flafgs (performance, portability) to - CommandLineParser tests. - -2011-09-04 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Enable performance- and portability - checks. The CLI/LIB change earlier added own enable-flag for performance- - and portability-checks. This commit updates GUI to also enable those - new enable-flags. - -2011-09-04 Robert Reif - - * test/testbufferoverrun.cpp: add some variable length array tests - -2011-09-04 Daniel Marjamäki - - * lib/check64bit.cpp, test/test64bit.cpp: Fixed #3073 (False - positive: Assigning an integer (int/long/etc) to a pointer is not - portable) - -2011-09-04 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #3060 (False - positive: Uninitialized variable: fresh) - -2011-09-03 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: final fix - for #3063 (false negative: multi dimensional arrays not well - supported) - -2011-09-03 seb777 - - * : commit 5c7ed46e0cb6ffeee17a9185d1ccaa9d9781b560 Author: seb777 - Date: Sat Sep 3 23:10:16 2011 +0200 - -2011-09-03 seb777 - - * lib/checkother.cpp, lib/tokenize.cpp, test/testother.cpp, - test/testtokenize.cpp: Replace the keyword C99 _Bool the bool - keyword in the process of tokenization See - - https://github.com/danmar/cppcheck/commit/f29b7f9f087779d789e8bdc24745930623f314ca - -2011-09-03 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #3069 (False positive: Memory leak: data) - -2011-09-03 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #3065 - (False positive: possible null pointer dereference: vi) - -2011-09-03 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #3058 (False - positive: Uninitialized variable: data) - -2011-09-03 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/symboldatabase.cpp: move member - variable lookup code from a check to the symbol database so it can - be reused by other checks - -2011-09-03 Daniel Marjamäki - - * cli/cmdlineparser.cpp: CLI: --enable=style has always been the - same as --enable=style,portability,performance so keep it that way. - Ticket #3074 - -2011-09-03 Daniel Marjamäki - - * cli/cmdlineparser.cpp, lib/check64bit.cpp, - lib/checkbufferoverrun.cpp, lib/checknonreentrantfunctions.cpp, - lib/checkother.cpp, lib/checkpostfixoperator.cpp, lib/checkstl.cpp, - lib/settings.cpp, lib/tokenize.cpp, test/test64bit.cpp, - test/testbufferoverrun.cpp, test/testnonreentrantfunctions.cpp, - test/testother.cpp, test/testpostfixoperator.cpp, - test/testsimplifytokens.cpp, test/teststl.cpp: enable: break out - 'performance' and 'portability' from the 'style' id. Ticket: #3074 - -2011-09-03 Daniel Marjamäki - - * man/manual.docbook: manual: document the 'portability' severity. - Ticket #3074 - -2011-09-02 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/symboldatabase.cpp, - lib/symboldatabase.h, test/testbufferoverrun.cpp: another partial - fix for #3063 (false negative: multi dimensional arrays not well - supported) - -2011-09-02 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: partial - fix for #3063 (false negative: multi dimensional arrays not well - supported) - -2011-09-02 Robert Reif - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: fix - #3062 (false negative: Boolean variable is used in bitwise - operation) - -2011-09-02 Robert Reif - - * lib/checkautovariables.cpp, test/testautovariables.cpp: fix false - positive introduced by previous false negative fix commit - -2011-09-01 Robert Reif - - * lib/checkautovariables.cpp, test/testautovariables.cpp: fix #3066 - (False positive: Inconclusive: Assigning address of local - auto-variable to a function parameter.) - -2011-09-01 Robert Reif - - * lib/checkautovariables.cpp, test/testautovariables.cpp: fix line - number in messagex for CheckAutoVariables::autoVariables - -2011-09-01 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #3070 (Other: - failed to parse a typedef string. Check continues anyway.) - -2011-09-01 Robert Reif - - * lib/checkautovariables.cpp, test/testautovariables.cpp: fix again - #3064 (false negative: returning address of stack variable) - -2011-09-01 Robert Reif - - * lib/checkautovariables.cpp: better error message for #3064 (false - negative: returning address of stack variable) - -2011-08-31 Robert Reif - - * lib/checkautovariables.cpp, lib/checkautovariables.h, - test/testautovariables.cpp: fix #3064 (false negative: returning - address of stack variable) - -2011-08-31 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3058 (False - positive: Uninitialized variable: data) - -2011-08-31 Robert Reif - - * lib/checkunusedvar.cpp, test/testunusedvar.cpp: add new (nothrow) - support to CheckUnusedVar::checkFunctionVariableUsage - -2011-08-30 Robert Reif - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: add support for - deallocating memory with realloc - -2011-08-30 Daniel Marjamäki - - * htmlreport/cppcheck-htmlreport: Fixed #3057 (cppcheck-htmlreport - fails since 1.50) - -2011-08-30 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3058 (False - positive: Uninitialized variable: data) - -2011-08-29 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #3034 (Cppcheck crash on specific file (truecrypt).) - -2011-08-28 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h, - test/testsymboldatabase.cpp: really fix multi-dimensional arrays - with undefined size - -2011-08-28 Daniel Marjamäki - - * lib/tokenize.cpp, test/testpreprocessor.cpp: Fixed #3016 - (Preprocessor has incorrect precedence(?) for &&) - -2011-08-28 Robert Reif - - * lib/symboldatabase.cpp, test/testbufferoverrun.cpp: fix #3044 - (Symbol database: handle multidim array with unknown dimension 'char - a[][4]') - -2011-08-28 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #3051 (False positive: - operator= should return reference (when function takes pointer - argument)) - -2011-08-28 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #3052 (False Positive - - Technically the member function 'Example::Clear' can be const.) - -2011-08-28 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: better - message for strncpy zero-terminated check - -2011-08-28 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #3039 (False - Positive: Memory Leak 'p = pop(p);') - -2011-08-27 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: refactor CheckBufferOverrun::checkScope - strncpy check and change experimental to inconclusive - -2011-08-26 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #3038 (False - Positive - memory leak (struct member passed to subfunction)) - -2011-08-26 unknown - - * gui/mainwindow.cpp: GUI: Fix order of project/global include - directories. Per project include directories must be added to the list before the - global include directories. Include directories are searched in - listed order. So placing per project include directories first we - ensure per project include file is found instead of the global - include file if same file exist in both. - -2011-08-25 Robert Reif - - * lib/checkbufferoverrun.cpp: partial fix for #3050 (strncpy zero - termination check behaving flaky) - -2011-08-25 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #3043 (False Positive - - Member variable 'ProgramRecPriorityInfo::profile' is not assigned - a value in 'ProgramRecPriorityInfo::operator=') - -2011-08-25 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: add support for - simplifying Qt emit in tokenizer - -2011-08-25 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: fix #3049 (False - Positive - Technically the member function - 'VideoOutputNull::SetupDeinterlace' can be const.) - -2011-08-25 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #3038 (False - Positive - memory leak) - -2011-08-24 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Fix extra menu - separator in File-menu. The extra menu separator was added before the MRU menu items. When - updating the (menu) MRU items existing items were first removed and - new items added back. But the added separator was not removed. - -2011-08-24 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h, gui/project.cpp, - gui/project.h: GUI: Check the project after creation. Earlier the GUI (project) went into some weird state after creating - a new project. The project could not be checked in any discoverable - way. This commit fixes the above bug by automatically checking the new - project after the project dialog is closed. I think this is what - most users expect to happen. - -2011-08-24 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h: make all - functions that call reportError names in checkbufferoverrun end in - Error for consisentcy - -2011-08-24 Robert Reif - - * test/testbufferoverrun.cpp: better test for symbol database bug - fixed in last commit - -2011-08-23 Robert Reif - - * lib/symboldatabase.cpp, test/testother.cpp: fix a serious symbol - database bug where parts of a function could be skipped - -2011-08-23 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #3041 (false - positive reported for error with id='deallocuse') - -2011-08-23 Kimmo Varis - - * gui/test/data/projectfiles/simple.cppcheck, - gui/test/data/projectfiles/simple_ignore.cppcheck, - gui/test/filelist/testfilelist.cpp, - gui/test/projectfile/testprojectfile.cpp, - gui/test/projectfile/testprojectfile.h: GUI: Update projectfile - tests. - -2011-08-23 Kimmo Varis - - * gui/projectfile.txt: GUI: Update project file documentation. - -2011-08-23 Kimmo Varis - - * cppcheck.cppcheck, gui/filelist.cpp, gui/filelist.h, - gui/mainwindow.cpp, gui/project.cpp, gui/projectfile.cpp, - gui/projectfile.h, gui/projectfile.ui: GUI: Rename Ignore-feature to - Exclude-feature. Exclude is the correct term to use when removing paths from the list - of checked items. Ignore as a term was a poor choise to begin with. - XML file reading still recognizes and reads the 'ignore' element - but writes 'exclude' element. Ticket: #2995 (GUI: Rename ignore-feature to exclude-feature) - -2011-08-22 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #3040 (False positive - - Technically the member function 'PSIPTable::SetSection' can be - const.) - -2011-08-22 Robert Reif - - * gui/mainwindow.cpp: run astyle - -2011-08-22 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Make few strings const strings. - -2011-08-22 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_es.ts, - gui/cppcheck_fi.ts, gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_sr.ts, gui/cppcheck_sv.ts: GUI: Update translation - files. - -2011-08-22 Kimmo Varis - - * gui/projectfile.ui, gui/projectfiledialog.cpp, - gui/projectfiledialog.h: GUI: Allow reordering includes in project - dialog. Since include dir order is important (Cppcheck uses the first file - it finds) user must be able to edit the order of include paths. - This commit adds "Up" and "Down" buttons to the Project-dialog's - inlude paths-tab. User can use those two buttons to re-order the - include directories. Ticket: #3037 (GUI: Allow reordering include paths in project - dialog) - -2011-08-22 Kimmo Varis - - * gui/projectfile.ui: GUI: Rename Project-label in Projects-dialog. The 'Project' label in Project-dialog is confusing and users think - it is project's name. When it acutually is the root directory of the - project. So rename the lable and move it below the 'Defines'- field - to make it less important looking. Ticket: #2997 (GUI: 'Project'-field in project file-dialog is - confusing) - -2011-08-22 Kimmo Varis - - * lib/suppressions.h: Add doxygen grouping for the new file. - -2011-08-22 Kimmo Varis - - * lib/suppressions.cpp: Compile fix. - -2011-08-22 Kimmo Varis - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cli/cppcheck.vcxproj.filters, test/testrunner.vcproj, - test/testrunner.vcxproj, test/testrunner.vcxproj.filters: Update - VS2008/2010 project files. - -2011-08-22 Kimmo Varis - - * Makefile, lib/errorlogger.cpp, lib/errorlogger.h, lib/lib.pri, - lib/settings.cpp, lib/settings.h, lib/suppressions.cpp, - lib/suppressions.h, test/test.pro, test/testsettings.cpp, - test/testsuppressions.cpp: Move Suppressions class to own source - files. I want to use Suppressions class also in GUI. And that is easier to - do when it is not internal class of Settings class. And in general - is it more natural that Settings class only contains list of - suppressions and implementation is separate. - -2011-08-21 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: improve message for #3035 (false - negative: strcpy(dst, src) where src is bigger than dst) - -2011-08-21 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: partial fix for #3035 (false negative: - strcpy(dst, src) where src is bigger than dst) - -2011-08-21 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #3032 (False - positive: possible null pointer dereference (assignment in - condition)) - -2011-08-20 Robert Reif - - * test/testautovariables.cpp: add another test for #3030 (Improve - check: Returning pointer to local array variable with '&' pointer - operator) - -2011-08-20 Robert Reif - - * lib/checkautovariables.cpp, test/testautovariables.cpp: partial - fix for #3030 (Improve check: Returning pointer to local array - variable with '&' pointer operator) - -2011-08-20 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: allow that 'missingInclude' - messages are suppressed with '--suppress=missingInclude' - -2011-08-20 Daniel Marjamäki - - * lib/cppcheck.cpp: Cppcheck: allow that 'toomanyconfigs' are - suppressed. show these messages by default even though 'information' - hasn't been enabled. - -2011-08-20 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #3023 - (False positive: no possible null pointer dereference here: - 'WARN_ON(!abc || abc->x == 0);') - -2011-08-20 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #3024 (False - positive: memory leak for 'rc.bitmap' when rc is added to linux - kernel list) - -2011-08-19 Daniel Marjamäki - - * lib/cppcheck.cpp, lib/settings.cpp, lib/settings.h: Cppcheck: - Don't show information messages about interrupted checking unless - --enable=information has been given. - -2011-08-19 Kimmo Varis - - * : Merge pull request #32 from rpavlik/qmake-configure-rules Qmake configure rules - -2011-08-19 Kimmo Varis - - * test/test.vcproj, test/test.vcxproj, test/test.vcxproj.filters, - test/testrunner.vcproj, test/testrunner.vcxproj, - test/testrunner.vcxproj.filters: Rename Test VC project files. When the target name of the test runner binary changed to - 'testrunner' also the filenames of the generated project files - changed. - -2011-08-19 Kimmo Varis - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cli/cppcheck.vcxproj.filters: Update VS2008/2010 project files. Ticket: #3025 (Visual Studio projects needs updating for new - lib/checkunusedvar files) - -2011-08-19 Robert Reif - - * Makefile, lib/checkother.cpp, lib/checkother.h, - lib/checkunusedvar.cpp, lib/checkunusedvar.h, lib/lib.pri, - test/testunusedvar.cpp: move unused variable checks from checkother - to checkunusedvar - -2011-08-19 Robert Reif - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: fix - #3011 (new check: when first comparison is true, the 2nd comparison - is always true) - -2011-08-19 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: using boolean result in - bitwise operation. fix false positive for '.. != (char *) &x' - -2011-08-19 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: fixed - false positives for the 'bitwise operator / comparison operator' - check - -2011-08-19 Robert Reif - - * lib/checkother.cpp, lib/checkother.h: refactor checkother to move - error messages to follow check and rename some error functions to - end in Error - -2011-08-19 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: fixed false positive for - 'using bitwise operation on boolean result' - -2011-08-19 Daniel Marjamäki - - * lib/checkassignif.cpp, test/testassignif.cpp: Improve check: - Tweaked the assignAndCompare to handle | also in addition to & - -2011-08-19 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #3018 (false - positive: (style) Suspicious condition (assignment+comparison), it - can be clarified with parentheses) - -2011-08-19 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Improve - check: Clarify condition (using boolean result in bitwise operation) - -2011-08-19 Daniel Marjamäki - - * lib/checkother.cpp: improved comment of previous commit - -2011-08-19 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #3001 (False - Positive: Redundant assignment to itself) - -2011-08-19 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Suspicious condition: - Better handling when rhs is non-numeric - -2011-08-19 Edoardo Prezioso - - * Makefile, tools/dmake.cpp: Fixed #3017 (set HAVE_RULES to yes only - if HAVE_RULES is undefined when executing make.) - -2011-08-19 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: New - check: warn about such suspicious conditions: '(a & b == c)' - -2011-08-18 Daniel Marjamäki - - * cli/cmdlineparser.cpp: cmdlineparser: removed BOM - -2011-08-18 Kimmo Varis - - * : Merge pull request #33 from rpavlik/handle-msvc-qt-cmdline Detect msvc qt command prompt in build.bat - -2011-08-18 Ryan Pavlik - - * build-pcre.txt, build.bat: HAVE_RULES support for build.bat Let - the user's setting of the HAVE_RULES environment variable affect - build.bat's calls to qmake. - -2011-08-18 Ryan Pavlik - - * build-pcre.txt: document the updated qmake/rules interaction - -2011-08-18 Ryan Pavlik - - * lib/lib.pri, lib/pcrerules.pri, tools/dmake.cpp: put the rules - logic in its own .pri file, and allow easier override - -2011-08-18 Ryan Pavlik - - * cli/cli.pro: cli pro doesn't force HAVE_RULES anymore. - -2011-08-18 Ryan Pavlik - - * lib/lib.pri, tools/dmake.cpp: use the qmake config setting - HAVE_RULES to enable/disable pcre rules support, defaulting to on - except on Windows. - -2011-08-17 Daniel Marjamaki - - * cli/cmdlineparser.cpp: --std=posix : simplified help text. might - still need further updates - -2011-08-17 Daniel Marjamäki - - * cli/cmdlineparser.cpp, lib/settings.h, test/testcmdlineparser.cpp: - Command line: Added --std option. Right now only --std=posix is - possible but other options might be added later. - -2011-08-17 Tim Gerundt - - * htdocs/index.php: Web: Update download to version 1.50 - -2011-08-16 Robert Reif - - * lib/symboldatabase.cpp, test/testsymboldatabase.cpp: fix #3013 - (segmentation fault of cppcheck ( struct x : virtual y )) - -2011-08-16 Reijo Tomperi - - * cli/cmdlineparser.cpp, lib/cppcheck.cpp, lib/cppcheck.h, - lib/settings.cpp, lib/settings.h: Add command line option: - --debug-fp ... If used, cppcheck will print out the code generating - error into output stream. This is ment to be used for debugging - false positive errors in Cppcheck. Current implementation tries two - alternatives. Without all headers or with all headers and prints out - the option with less code. In future versions this could try with - individual headers or group of header files. - -2011-08-16 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #3012 (False - Pos Memory Leak with a Macro) - -2011-08-16 Daniel Marjamäki - - * lib/checkother.cpp, test/testincompletestatement.cpp: Fixed #3009 - (Using numeric constants in kernel space code) - -2011-08-15 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #3006 (segmentation - fault of cppcheck ( x < () < )) - -2011-08-15 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #3005 - (segmentation fault of cppcheck ( enum : x )) - -2011-08-15 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #3007 (false - positive: (style) Struct 'Fred' hides typedef with same name) - -2011-08-14 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #3004 (false - positive: (style) Struct 'Fred' hides typedef with same name) - -2011-08-14 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #3003 - (segmentation fault of cppcheck (typedef a x[]; y = x )) - -2011-08-14 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #3000 (false - positive: (style) Struct 'Fred' hides typedef with same name) - -2011-08-14 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: fix - #2999 (false positive: (style) Struct 'Fred' hides typedef with same - name) - -2011-08-14 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: Makefile: Added the -D_GLIBCXX_DEBUG - flag again to get checked stl during debug - -2011-08-14 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Added safety checks in case - the code is corrupt. Related to ticket #2998 - -2011-08-14 Robert Reif - - * lib/checknullpointer.cpp: refactor - CheckNullPointer::nullPointerByDeRefAndChec() to pull variable type - lookup out of loop - -2011-08-14 Robert Reif - - * lib/checkstl.cpp: convert CheckStl::if_find() to use the symbol - database - -2011-08-14 Robert Reif - - * lib/checkother.cpp: convert CheckOther::checkCharVariable() to use - symbol database - -2011-08-14 Robert Reif - - * lib/checkother.cpp: convert - CheckOther::checkSizeofForNumericParameter() to use the symbol - database - -2011-08-14 Robert Reif - - * lib/checkother.cpp: convert CheckOther::checkIncrementBoolean() to - use the symbol database - -2011-08-14 Daniel Marjamäki - - * Makefile: Makefile: Set debug mode - -2011-08-14 Daniel Marjamäki - - * cli/cmdlineparser.cpp, lib/checknonreentrantfunctions.cpp, - lib/checkobsoletefunctions.cpp, lib/settings.cpp, lib/settings.h, - test/testcmdlineparser.cpp, test/testnonreentrantfunctions.cpp, - test/testobsoletefunctions.cpp: Settings: Removed the --enable=posix - option. Ticket: #2949 - -2011-08-14 Daniel Marjamäki - - * Makefile: 1.50: Updated Makefile - -2011-08-14 Daniel Marjamäki - - * Changelog: 1.50: Updated Changelog - -2011-08-14 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, lib/cppcheck.cpp, - man/manual.docbook, win_installer/productInfo.wxi: 1.50: Updated - version - -2011-08-13 Robert Reif - - * lib/tokenize.cpp: fix [tokenize.cpp:6353]: (style) Checking if - unsigned variable 'indentlevel' is less than zero. - -2011-08-12 Kimmo Varis - - * gui/test/data/benchmark/simple.cpp: GUITESTS: Replace benchmark - data file. The benchmark data file had errors when checking with Cppcheck. And - people reported these errors. So replace the file with one that has - no (currently found) errors. - -2011-08-12 Kimmo Varis - - * cppcheck.cppcheck: GUI: Exclude test file from project file. The 'test/test.cxx' is a test file that contains some errors for - testing purposes. Exclude it from the GUI-project file used to check - Cppcheck sources so people don't report errors from it. - -2011-08-12 Robert Reif - - * lib/tokenize.cpp: removed redundant set isNumber flag from - previous commit - -2011-08-11 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: fix #2963 (FP: Typedef names considered - duplicate because __LINE__ not expanded) - -2011-08-11 Robert Reif - - * lib/symboldatabase.cpp, test/testsymboldatabase.cpp: fix #2991 - (segmentation fault of cppcheck ( ::y(){x} )) - -2011-08-12 Kimmo Varis - - * gui/test/readme.txt, gui/test/runtests.py: GUITESTS: Remove the - running script. The script is available in another repository. I don't want to - distribute it with Cppcheck sources for now. Maybe if and when there - is more interest towards GUI tests... - -2011-08-11 Kimmo Varis - - * tools/dmake.cpp: dmake: Fix build in Windows. - -2011-08-11 Kimmo Varis - - * tools/dmake.vcproj: Tools: Update VS project file. - -2011-08-11 Kimmo Varis - - * gui/aboutdialog.cpp, gui/aboutdialog.h, gui/mainwindow.cpp: GUI: - Show extraversion in About-dialog. If the "extra version" is defined (not empty) then it is shown after - the actual version number in the About-dialog. Ticket: #2164 ([GUI] Add revision info to "About" window) - -2011-08-11 Kimmo Varis - - * cli/cppcheckexecutor.cpp, lib/cppcheck.cpp, lib/cppcheck.h: Add - "ExtraVersion" version number information. The "ExtraVersion" can be used for things like Git commit Id, - release tag (version control), release date etc. If the string is - empty, nothing is printed. - -2011-08-11 Kimmo Varis - - * cli/cmdlineparser.cpp: CLI: Fix misalign of "posix" in help text. Ticket: #2992 (Little misalignment of '* posix' by one space in CLI - command help) - -2011-08-11 Kimmo Varis - - * cli/cmdlineparser.cpp: CLI: Fix word-wrapping of the help text. - -2011-08-11 Kimmo Varis - - * cli/cmdlineparser.cpp: CLI: Reword the help text for -i. New help text emphasizes we are ignoring/excluding source files. - The header files (include via source files) are not touched. Ticket: #2965 (CLI: need better description for -i option (applies - only to source files)) - -2011-08-10 Kimmo Varis - - * tools/Makefile: Tools: fix Makefile tools/ Makefile contained errmsg target whose source does not exist - anymore. And it didn't have a target for extracttests. Removed the - errmsg target and added new target for extracttests. Ticket: #2988 (In tools, make error: no rule to make target - `errmsg.cpp', needed by `errmsg'.) - -2011-08-10 Kimmo Varis - - * test/testdivision.cpp: Tests: Re-enable style param for - testdivision. My earlier commit (cfcfa3f0) removed the use of style parameter. - This commit adds it back. Ticket: #2987 (GCC: warning: unused parameter ‘style’ in - test/testdivision.cpp:39:10) - -2011-08-10 Daniel Marjamäki - - * lib/checkautovariables.cpp, lib/tokenize.cpp, - test/testautovariables.cpp: Fixed #2975 (False positive: Return of - the address of an auto-variable) - -2011-08-09 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: fix #2986 - (segmentation fault of cppcheck ( x[y] )) - -2011-08-09 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2983 - (segmentation fault of cppcheck) - -2011-08-09 Daniel Marjamäki - - * lib/checkautovariables.cpp, lib/checkautovariables.h, - test/testautovariables.cpp: Fixed #2969 (False positive: assign - address of auto-var to function parameter, when function parameter - is reassigned later) - -2011-08-09 Daniel Marjamäki - - * lib/checkother.cpp, test/testcharvar.cpp: Fixed #2982 (false - positive: using char type as array index (using string as key)) - -2011-08-08 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2981 (False - positive: struct member leak) - -2011-08-08 Daniel Marjamäki - - * lib/checkother.cpp, test/testcharvar.cpp: Fixed #2979 (Improve - message: using char as array index) - -2011-08-08 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2976 (False positive: array out of bounds) - -2011-08-08 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #2980 (segmentation - fault of cppcheck) - -2011-08-07 Robert Reif - - * : commit 829611b12964cdf8346eae9255d32fbed8b2d520 Author: Robert - Reif Date: Sun Aug 7 16:48:47 2011 -0400 - -2011-08-07 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Buffer - overrun: Fix false negative - -2011-08-07 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointer: - Fixed false positive when condition contains assignment 'if (p==NULL - && (p=malloc(10))!=NULL) *p=0;' - -2011-08-07 Kimmo Varis - - * lib/check64bit.cpp, lib/checkassignif.cpp, - lib/checkbufferoverrun.cpp, lib/checkclass.cpp, - lib/checkexceptionsafety.cpp, lib/checkmemoryleak.cpp, - lib/checknonreentrantfunctions.cpp, lib/checkobsoletefunctions.cpp, - lib/checkother.cpp, lib/checkpostfixoperator.cpp, lib/checkstl.cpp, - lib/preprocessor.cpp, lib/settings.cpp, lib/settings.h, - lib/tokenize.cpp, test/test64bit.cpp, test/testassignif.cpp, - test/testbufferoverrun.cpp, test/testcharvar.cpp, - test/testclass.cpp, test/testcmdlineparser.cpp, - test/testconstructors.cpp, test/testdivision.cpp, - test/testincompletestatement.cpp, test/testmemleak.cpp, - test/testnonreentrantfunctions.cpp, test/testnullpointer.cpp, - test/testobsoletefunctions.cpp, test/testother.cpp, - test/testpostfixoperator.cpp, test/testsimplifytokens.cpp, - test/teststl.cpp, test/testtokenize.cpp, - test/testunusedfunctions.cpp, test/testunusedprivfunc.cpp, - test/testunusedvar.cpp: Use "enabled" list for the style checking. Settings-class currently enables style checking via dedicated - boolean attribute. All other CLI's enable-options are handled - through the enable-list. This commit moves style-check enabling to - use the enable-list. Main advantage is the consistency how options are handled/stored in - the Settings class. Which also unifies using them for the other - code. You need to enable certain type of checks? Use the - addEnabled()-method. You want to check if certain type of checks are - enabled? Use the isEnabled()-method. - -2011-08-06 Robert Reif - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: fix - #2968 (new check: testing if unsigned variable is less than 0) - -2011-08-06 Robert Reif - - * lib/checkmemoryleak.cpp, lib/tokenize.cpp, test/testmemleak.cpp: - fix #2971 (Wrong warning generated) - -2011-08-06 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2970 - (Incorrect report: Class does not have a constructor) - -2011-08-06 Robert Reif - - * test/testtokenize.cpp: run astyle - -2011-08-07 Kimmo Varis - - * cli/filelister.cpp: CLI: Fix problem building in Windows. - -2011-08-06 Kimmo Varis - - * test/testcmdlineparser.cpp: Tests: Disable tests for CLI -i - option. The tests use non-existing relative paths. Currently the code checks - if the paths added to -i exist and hence these tests fail. - -2011-08-06 Daniel Marjamäki - - * cli/cmdlineparser.cpp: help: clarify --suppress a little in the - --help output. Ticket: #2964 - -2011-08-06 Kimmo Varis - - * cli/cppcheckexecutor.cpp, cli/filelister.cpp, lib/path.cpp, - lib/path.h: CLI: Warn if user tries to exclude header files. Filename exclusion (with -i) works only for the source files. Print - a warning if user tries to exclude header file. The warning - instructs user to use --suppress for ignoring warnings from the - header files. - -2011-08-06 Kimmo Varis - - * cli/cmdlineparser.cpp, cli/filelister.cpp, cli/filelister.h: CLI: - Strict check if exclude path is file. Initially I added logic that checked if excluded path was a file we - would accept. This works for source files, but when file with - "unknown" extension was given it was determined as a directory name - and ending slash was added. E.g. -ifile.h would end up having - ignored path file.h/. This commit adds per-platform checks if the path points to the file - and if the file also exists. - -2011-08-06 Simon Martin - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2870 (Tokenizer: - simplify '0 |') - -2011-08-05 Robert Reif - - * lib/checkstl.cpp, test/teststl.cpp: fix #2967 (segmentation fault - of cppcheck ( auto_ptr< x >)) - -2011-08-05 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2966 - (segmentation fault of cppcheck ( enum x : )) - -2011-08-05 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Array - index out of bounds: prevent false positive when a dimension for an - array is unknown - -2011-08-05 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: tweaked - the error message somewhat for id arrayIndexThenCheck - -2011-08-04 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: add support for using - global qualified :: memset on class and class member initialization - -2011-08-04 Robert Reif - - * lib/checkstl.cpp, test/teststl.cpp: fix #2887 (infinit loop with ( - A::A(std::auto_ptr e){} )) - -2011-08-04 Kimmo Varis - - * cli/cmdlineparser.cpp: CLI: Couple of messages missing - cppcheck-prefix. - -2011-08-04 Kimmo Varis - - * cli/cmdlineparser.cpp: CLI print warning for deprecated options. We don't want to keep these deprecated options for ever. So lets - print a clear warning for the users and give also specific release - number when they will be removed. Users have a plenty of time to - update their scripts and environments before removal. Ticket: #2515 (Print warning for deprecated command line options) - -2011-08-04 Edoardo Prezioso - - * test/test.pro: Fixed #2961 (Test executable name differs between - Makefile and test.pro) - -2011-08-04 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Fixed #2956 (False negative: read array - and then immediately check the index 'str[i] && i - - * cli/cppcheckexecutor.cpp, lib/cppcheck.cpp: No unmatched - suppressions list in quiet output. When user wants to see only errors printed (--quiet in CLI) we must - obey that. And not print unmatchedSuppressions list. Ticket: #2895 (Cannot suppress unmatchedSuppression reports) - -2011-08-03 Kimmo Varis - - * test/test.vcproj, test/test.vcxproj, test/test.vcxproj.filters: - Update VS project files. - -2011-08-03 Daniel Marjamäki - - * lib/checkobsoletefunctions.cpp, lib/checkobsoletefunctions.h: - astyle formatting - -2011-08-03 Daniel Marjamäki - - * lib/checkobsoletefunctions.cpp, lib/checkobsoletefunctions.h, - test/testobsoletefunctions.cpp: Obsolete functions: Split up - functions into posix/standard sets. Only check for obsolete posix - functions if --enable=posix has been given. - -2011-08-03 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_es.ts, - gui/cppcheck_fi.ts, gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_sr.ts, gui/cppcheck_sv.ts: GUI: Update translation - files. - -2011-08-03 Kimmo Varis - - * gui/resultsview.cpp: GUI: Don't translate non-translatable - strings. If strings contain only formatting placeholders for the dynamically - formatted text it does not make sense to mark the strings as - translatable. There is nothing translators can translate e.g. in - "%p". - -2011-08-03 Kimmo Varis - - * test/test.pro: Add missing test files to test.pro -project. - -2011-08-03 Kimmo Varis - - * cli/cmdlineparser.cpp, lib/checknonreentrantfunctions.cpp, - lib/settings.cpp, lib/settings.h, test/testcmdlineparser.cpp, - test/testnonreentrantfunctions.cpp: CLI: Rename --posix to - --enable=posix. Ticket: #2949 (new check: (style) finding non-reentrant functions) - Ticket: #2952 (CLI option --posix is wrong) - -2011-08-03 Daniel Marjamäki - - * lib/check64bit.h: corrected a comment - -2011-08-03 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2919 - (Wrong file name reported with #error in header) - -2011-08-02 Reijo Tomperi - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fix: #2942 - (segmentation fault of cppcheck ( #elif (){ )) - http://sourceforge.net/apps/trac/cppcheck/ticket/2942 - -2011-08-02 Daniel Marjamaki - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cli/cppcheck.vcxproj.filters, cppcheck.sln, test/test.vcproj, - test/test.vcxproj, test/test.vcxproj.filters: Visual Studio: Updated - project files - -2011-08-02 Daniel Marjamäki - - * test/testnullpointer.cpp: Null pointer: Added todo test case to - better handle dereference in condition - -2011-08-02 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointer: - reduce false negatives in pointerDerefAndCheck - -2011-08-02 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2954 - (False negative: Null pointer dereference not detected '*p=4; if (p) - { }') - -2011-08-02 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2900 (found - memory leak in kernel p54usb and a false positive reported) - -2011-08-01 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointers: - Fixed false negative when struct is dereferenced in condition - -2011-08-01 Robert Reif - - * test/testtokenize.cpp: add test for #2937 (Scope::checkVariable - found variable 'sMMF' with varid 0.) - -2011-08-01 Daniel Marjamäki - - * lib/checkassignif.cpp, lib/checkassignif.h, test/testassignif.cpp: - AssignIf: detect more problems for 'if' and 'else if' conditions - -2011-08-01 Daniel Marjamäki - - * lib/checkassignif.cpp, lib/checkassignif.h, test/testassignif.cpp: - Fixed #2908 (common logic when using bitwise and) - -2011-08-01 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2789 - (null pointer: problems not detected when pointer is assigned and - checked if it's null in a if statement) - -2011-08-01 Daniel Marjamäki - - * lib/checkassignif.cpp: astyle formatting - -2011-08-01 Daniel Marjamäki - - * lib/checkassignif.cpp, test/testassignif.cpp: AssignIf: Improved - the error message for mismatching comparison - -2011-07-31 Robert Reif - - * lib/tokenize.cpp, test/testuninitvar.cpp: fix #2146 (uninitialized - variable: false negative for 'return x ? 1 : y;') - -2011-07-31 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Memory leaks: fix endless loop for 'if - )'. the check assumed that the link after the 'if' pointed forwards. - Ticket: #2404 - -2011-07-31 Robert Reif - - * lib/token.cpp, test/testtoken.cpp: fix #2911 (Token::Match(tok, - %oror%|&&) doesn't match &&) - -2011-07-31 Moritz Lipp - - * lib/checkother.cpp: Fixed #2793 (SIGABRT on filenames without file - extension) - -2011-07-31 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h: removed the unused - function CheckMemoryLeakInFunction::matchFunctionsThatReturnArg - -2011-07-31 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointer: - fix false negatives when unknown function is called and pointer is - local/argument - -2011-07-31 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointer: - better handling when calling standard functions with possible null - pointer - -2011-07-31 Daniel Marjamäki - - * lib/checkassignif.cpp, test/testassignif.cpp: AssignIf: handle - parantheses. ticket: #2909 - -2011-07-31 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2935 - (possible null pointer dereference when using strcpy etc) - -2011-07-31 Daniel Marjamäki - - * lib/checkassignif.h: astyle formatting - -2011-07-31 Daniel Marjamäki - - * lib/checkassignif.cpp, lib/checkassignif.h, test/testassignif.cpp: - AssignIf: Match lhs and rhs for comparisons. Ticket: #2909 - -2011-07-31 Daniel Marjamäki - - * lib/checkassignif.cpp, lib/checkassignif.h, test/testassignif.cpp: - AssignIf: Detect problem for 'y=x&4; if(y!=3)..'. Ticket: #2909 - -2011-07-30 Daniel Marjamäki - - * Makefile, lib/checkassignif.cpp, lib/checkassignif.h, - lib/lib.pri, test/testassignif.cpp: AssignIf: Added new check. - Ticket: #2909 - -2011-07-30 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2788 - (null pointer: dereference and then check 'if (abc->a == 3) { } if - (!abc) ..') - -2011-07-30 Robert Reif - - * lib/checkclass.cpp: assume all std::*::size() and std::*::empty() - are const in CheckClass::checkConstFunc() - -2011-07-30 Robert Reif - - * lib/tokenize.cpp: fix cppcheck warning in - Tokenizer::duplicateTypedef() - -2011-07-30 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: add std::*.empty() to - possible const functions in CheckClass::checkConstFunc - -2011-07-30 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #1593 (false negative: - the function can be declared as const) - -2011-07-30 Robert Reif - - * lib/checkother.cpp: fix missing else in patch that added support - for unused const local variables - -2011-07-30 Simon Martin - - * lib/checkmemoryleak.cpp: Fixed #2951 (Small code factorization in - checkmemoryleak.cpp) - -2011-07-30 Ettl Martin - - * lib/checknonreentrantfunctions.h: nonreentrant-functions: added - more functions to check - -2011-07-29 Robert Reif - - * lib/checkother.cpp: use simpleMatch where possible in - checkother.cpp - -2011-07-29 Ettl Martin - - * : commit f441a958cd50959f94695cb754fa925611927aa3 Author: Ettl - Martin Date: Fri Jul 29 23:37:40 2011 +0200 - -2011-07-29 Kimmo Varis - - * test/testcmdlineparser.cpp: Tests: add semicolons after - TEST_CASE() - -2011-07-29 Kimmo Varis - - * cli/cmdlineparser.cpp, test/testcmdlineparser.cpp: Add --posix CLI - option. Part of ticket #2949 (new check: (style) finding non-reentrant - functions) - -2011-07-29 Ettl Martin - - * lib/checknonreentrantfunctions.cpp, - lib/checknonreentrantfunctions.h, lib/settings.cpp, lib/settings.h, - test/testnonreentrantfunctions.cpp: added a check to detect - nonreentrant functions and a --posix switch - -2011-07-28 Ettl Martin - - * Makefile, lib/checknonreentrantfunctions.cpp, - lib/checknonreentrantfunctions.h, lib/lib.pri, - test/testnonreentrantfunctions.cpp: Added a new check for finding - non-reentrant functions - -2011-07-27 Zachary Blair - - * gui/common.h, gui/resultsview.cpp, gui/resultsview.h, - gui/threadhandler.cpp, gui/threadresult.cpp, gui/threadresult.h: - Fixed 2915 (GUI: Show files checked in progress bar) - -2011-07-28 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkother.cpp, lib/checkother.h, - lib/checkstl.cpp, lib/checkuninitvar.cpp, test/testother.cpp: Fixed - 'possible null pointer dereference' warning messages - -2011-07-28 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #2821 (New Check : bool pointer null truth assignment) - -2011-07-28 Daniel Marjamäki - - * scripts/comment.pl, scripts/define.pl, scripts/magic-numbers.pl, - scripts/readme.txt, scripts/tabs.pl: removed the 'scripts' folder. I - don't think it belongs in the cppcheck repo. - -2011-07-27 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #2947 (False positive: - member variable is not initialized (a[x::y] = 0;)) - -2011-07-27 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: fix #2943 (Symbol - database: Wrong parsing of std::vector as base class.) - -2011-07-27 Daniel Marjamäki - - * lib/checkautovariables.cpp, test/testautovariables.cpp: Auto - Variables: Reverted fix for #1514 because my idea was wrong. See - ticket: #2944 - -2011-07-27 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2946 (False - positive: Uninitialized buffer variable (init in subfunction)) - -2011-07-26 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2945 (False - positive: Uninitialized variable reading from stream) - -2011-07-25 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointer: - Added check for 'if (fred); return fred->a;' - -2011-07-25 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2812 - (false negative: null pointer dereference when returning struct - member) - -2011-07-25 Daniel Marjamäki - - * lib/executionpath.cpp, test/testuninitvar.cpp: Fixed #2796 - (uninitialized and leaving scope) - -2011-07-25 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2681 - (False negative: Possible null pointer dereference) - -2011-07-25 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp, lib/cppcheck.cpp, lib/cppcheck.h: Fixed - #2941 (False positive: unused function (individual checking of - files)) - -2011-07-24 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Uninitialized - variables: Fixed false positive if there is assignment in return - statement - -2011-07-24 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2938 - (Uninitialized variable not detected when part of expression) - -2011-07-24 Simon Martin - - * lib/mathlib.cpp: Fix GCC warning about float comparison. Ticket: - #2936 - -2011-07-24 Kimmo Varis - - * gui/test/readme.txt: GUITESTS: Add simple readme.txt. - -2011-07-24 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: add support for unused - const local variables - -2011-07-24 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2921 (False - positive: Memory leak with static pointer) - -2011-07-24 Daniel Marjamäki - - * Makefile: Makefile: auto-update by dmake - -2011-07-24 Daniel Marjamäki - - * lib/tokenize.cpp, test/testpostfixoperator.cpp: astyle formatting - -2011-07-24 Simon Martin - - * test/testpostfixoperator.cpp: Added testcases for #2933 (Postfix - operator check fails to warn for structs) - -2011-07-24 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed #2817 (valgrind errors in simplifyTemplate - when running tests) - -2011-07-24 Simon Martin - - * lib/checkother.cpp, test/testdivision.cpp: Fixed #2932 - (segmentation fault of cppcheck ( i / i )) - -2011-07-24 Simon Martin - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: Fix - #if0 #elif todo test case. Ticket: #2619 - -2011-07-23 Robert Reif - - * lib/checkpostfixoperator.cpp: convert - CheckPostfixOperator::postfixOperator() to use the symbol database - -2011-07-23 Robert Reif - - * lib/symboldatabase.cpp: add support for local variables with - constructors to the symbol database - -2011-07-22 Robert Reif - - * : commit 527c1aae3319a70e03e0215081746c3c24a37347 Author: Robert - Reif Date: Fri Jul 22 08:31:31 2011 -0400 - -2011-07-22 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: - Tokenizer::simplifyFunctionPointer: don't simplify function call. - Ticket: #2873 - -2011-07-21 Robert Reif - - * lib/checkautovariables.cpp, test/testautovariables.cpp: fix #1514 - (Improve CheckAutoVariables: assign autovariable address to - effective parameter) - -2011-07-21 Robert Reif - - * lib/checkautovariables.cpp, test/testautovariables.cpp: fix #2926 - (false negative in auto variables checking when function parameter - is a struct) - -2011-07-21 Robert Reif - - * Makefile: fix some development stuff that snuck in by mistake - -2011-07-21 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: fix #2929 (Additional - Unused variable check) - -2011-07-21 Robert Reif - - * Makefile, lib/checkautovariables.cpp, test/testautovariables.cpp: - fix #2928 (False positive (static variable misinterpreted as auto - variable)) - -2011-07-21 Kimmo Varis - - * gui/resultstree.cpp: GUI: Simplify condition. With current code we always have both filename and linenumber for - each error. - -2011-07-21 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2885 (crash - of cppcheck while checking gcc-testsuite) - -2011-07-21 Daniel Marjamäki - - * lib/checkautovariables.cpp, lib/checkautovariables.h: Fixed #2856 - (--errorlist not printing all auto-variable errors) - -2011-07-21 Kimmo Varis - - * gui/checkthread.h, gui/resultsview.h, gui/threadhandler.h, - gui/threadresult.h: GUI: Don't use relative paths for include files. - -2011-07-21 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2848 (False - positive: Memory leak when assigning and freeing from another - struct) - -2011-07-21 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2897 (out of - bounds false positive, using reinterpret_cast) - -2011-07-21 Daniel Marjamäki - - * man/manual.docbook: Fixed #2850 (Inline suppressions not - documented in manual) - -2011-07-20 Robert Reif - - * lib/checkautovariables.cpp, test/testautovariables.cpp: fix #2925 - (False negative: auto variables - assigning address of array to - function parameter) - -2011-07-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testpreprocessor.cpp: Fixed #2794 (Improper - hanling of preprocessor directives #if defined) - -2011-07-20 Daniel Marjamäki - - * : Merge pull request #28 from bwy/master Fix "auto_ptr assignment" false positive - -2011-07-20 Daniel Marjamäki - - * cli/cmdlineparser.cpp: cmdlineparser: changed unusedFunctions to - unusedFunction to make it work - -2011-07-20 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_es.ts, - gui/cppcheck_fi.ts, gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_sr.ts, gui/cppcheck_sv.ts: GUI: Update translation - files. - -2011-07-20 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Filter toolbar menu items not in synch. When Filter-toolbar was enabled/disabled from the View-menu its - state was not updated to the context menu. And vice versa. Ticket: #2923 (GUI: Filter toolbar menu items not synchronized) - -2011-07-20 Kimmo Varis - - * gui/main.ui: GUI: Filter toolbar didn't have a title. Ticket: #2922 (GUI: Filter toolbar does not have a title) - -2011-07-20 Daniel Marjamäki - - * lib/cppcheck.cpp: Fixed #2924 (Unable to turn on unused function - detection from command line) - -2011-07-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Better - handling of constants. Related with #2920 - -2011-07-20 Benjamin Wolsey - - * test/teststl.cpp: Test false auto_ptr positive. Assignments after a function returning an auto_ptr is declared are - detected as auto_ptr assignments! - -2011-07-20 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2920 (False positive: Array 'arr[0]' index 0 out of bounds (array - size and index are unknown)) - -2011-07-20 Daniel Marjamäki - - * cli/cmdlineparser.cpp: Cmdlineparser: Removed deprecated flag - --unused-functions - -2011-07-19 Ettl Martin - - * test/testmathlib.cpp: testmathlib: improved testcoverage of - mathlib - -2011-07-18 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2917 - (Problem with || in #if) - -2011-07-18 Robert Reif - - * lib/checkother.cpp: simplify - CheckOther::checkIncorrectLogicOperator() by using more pattern - matching - -2011-07-17 Robert Reif - - * lib/checkother.cpp, test/testother.cpp: made #2827 fix more - generic by adding more ops and using pattern matching rather than - string matching - -2011-07-17 Kimmo Varis - - * gui/resultstree.cpp: GUI: Fix always false condition. Ticket: #2827 (false negative: gui/resultstree.cpp:271 condition - always false) - -2011-07-17 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_es.ts, - gui/cppcheck_fi.ts, gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_sr.ts, gui/cppcheck_sv.ts: GUI: Update translation - files. - -2011-07-17 Kimmo Varis - - * gui/resultstree.cpp: GUI: Show error if no default editor - configured. There always should be default editor if there is editor application - configured. But it is possible in some cases that default - application is "lost". So check that we have default application - configured before trying to use it. And inform user to configure - default application instead of silently failing to open the - application (and the file) for the user. - -2011-07-17 Kimmo Varis - - * gui/resultstree.cpp: GUI: Fix separators when opening file to - editor. Ticket: #2916 (Wrong slashes in file path passed to the Windows-text - editors) - -2011-07-17 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: - CheckBufferOverrun: Detect overflows when buffer is allocated with - alloca - -2011-07-17 Daniel Marjamäki - - * test/testsimplifytokens.cpp: TestSimplifyTokens: removed - copy/pasted comment - -2011-07-16 Robert Reif - - * lib/checkother.cpp, lib/mathlib.cpp, lib/mathlib.h, - test/testother.cpp: fix #2827 to use numeric comparisons - -2011-07-16 Robert Reif - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: fix - #2827 condition always false or true) - -2011-07-16 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: better - handling of 'struct AB ab; sizeof(ab)' - -2011-07-16 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2873 (segmentation - fault of cppcheck while scanning rose-compiler suite) - -2011-07-16 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: minor update to handle C# code better - -2011-07-16 Daniel Marjamäki - - * lib/check64bit.cpp, test/test64bit.cpp: Fixed #2912 (false - positive: (portability) Assigning an integer (int/long/etc) to a - pointer is not portable) - -2011-07-16 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2871 - (Define in source not set when -D is used) - -2011-07-16 Kimmo Varis - - * test/testerrorlogger.cpp: Add more tests for ErrorLogger. Add tests that have two items in error location stack. - -2011-07-16 Robert Reif - - * test/testtoken.cpp: testcase for broken Token::Match %oror%|&& - -2011-07-16 Kimmo Varis - - * cli/cmdlineparser.cpp: CLI: Improve and clarify help text. - -2011-07-16 Daniel Marjamäki - - * lib/preprocessor.cpp: astyle formatting - -2011-07-16 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h, - test/testpreprocessor.cpp: Preprocessor: fix handling of (1&&2) - condition - -2011-07-15 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Fix minor - problem with 'X&&Y' - -2011-07-15 Daniel Marjamäki - - * lib/token.cpp, test/testtoken.cpp: astyle formatting - -2011-07-15 John Smits - - * lib/token.cpp, test/testtoken.cpp: Fixed #2882 (One-character - token can be mistaken for a multiCompare) - -2011-07-14 Robert Reif - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: fix some more false negatives for #2904 - (Memory leak not detected when creating a new class instance) - -2011-07-14 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #2822 (New check: Duplicate break statements in switch) - -2011-07-14 Robert Reif - - * lib/checkmemoryleak.cpp, lib/checkother.cpp, - test/testmemleak.cpp, test/testunusedvar.cpp: fix #2904 (Memory leak - not detected when creating a new class instance) - -2011-07-07 Daniel Marjamäki - - * lib/check64bit.cpp, lib/token.cpp, lib/token.h, lib/tokenize.cpp, - test/test64bit.cpp: Fixed #2892 (false positive: (portability) - Assigning an address value to the integer (int/long/etc) type is not - portable) - -2011-07-06 Daniel Marjamäki - - * lib/check64bit.cpp, lib/check64bit.h, test/test64bit.cpp: 64-bit - portability: fixed two of the TODO test cases. Ticket: #2791 - -2011-07-06 Daniel Marjamäki - - * : commit 827fb01ec19c9ab2be07840c14f93f915866eb3f Author: Daniel - Marjamäki Date: Wed Jul 6 12:57:45 2011 - +0200 - -2011-07-06 Kimmo Varis - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cli/cppcheck.vcxproj.filters, test/test.vcproj, test/test.vcxproj, - test/test.vcxproj.filters: Update Visual Studio 2008/2010 project - files. - -2011-07-06 Daniel Marjamäki - - * Makefile, lib/check64bit.cpp, lib/check64bit.h, lib/lib.pri, - test/test64bit.cpp: 64-bit checking: Added simple check for - assigning pointer address to int/long. Ticket: #2791 - -2011-07-05 Daniel Marjamäki - - * lib/checkother.cpp: spell check of error message. contant => - constant - -2011-07-05 Daniel Marjamäki - - * test/testcharvar.cpp: TestCharVar::pointer: Added one more test - case to see that error message disappears when code is fixed - -2011-07-05 Daniel Marjamäki - - * lib/checkother.cpp, test/testcharvar.cpp: Fixed #2866 (Detect sign - extension bugs) - -2011-07-05 Greg Hewgill - - * lib/checkother.cpp: Fix spelling error in warning identifier - -2011-07-04 Daniel Marjamäki - - * : Merge pull request #27 from gerundt/man-improvements Manual improvements - -2011-07-03 Daniel Marjamäki - - * test/testsimplifytokens.cpp: Tokenizer::simplifyGoto: fixed unit - tests - -2011-07-03 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2886 (crash of - cppcheck ( typedef struct x { } )) - -2011-07-03 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix missing pop in - Tokenizer::simplifyStructDecl() when anonymous struct/union removed - -2011-07-02 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: add support for - checking unused std::string local variables - -2011-07-02 Tim Gerundt - - * htdocs/.htaccess, htdocs/devinfo/index.php: Web: Redirect - doxyoutput, coverage- and cpd report to devinfo directory - -2011-07-02 Tim Gerundt - - * man/manual.docbook, man/writing-rules-1.docbook, - man/writing-rules-2.docbook, man/writing-rules-3.docbook: Manual: - Add internal links - -2011-07-02 Tim Gerundt - - * man/manual.docbook: * Manual: Miscellaneous tag changes - -2011-07-02 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: add class A {} a; - -> class A {}; A a; conversion capability to - Tokenizer::simplifyStructDecl() - -2011-07-02 Tim Gerundt - - * man/manual.docbook, man/writing-rules-1.docbook, - man/writing-rules-2.docbook, man/writing-rules-3.docbook: Manual: - Move "Writing Cppcheck rules" author to the beginning of the - appendix - -2011-07-02 Tim Gerundt - - * man/manual.docbook, man/writing-rules-1.docbook, - man/writing-rules-2.docbook: Manual: Miscellaneous tag changes - -2011-07-01 Robert Reif - - * lib/symboldatabase.cpp: fix #2884 (Integer overflow warning in - 64-bit build) - -2011-07-01 Tim Gerundt - - * man/manual.docbook: Manual: Use tags for menu items - -2011-07-01 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer::simplifyGoto: Only simplify the last - label in the function. If there are many labels in the same function - and all labels are simplified, this function becomes very slow. - -2011-07-01 Tim Gerundt - - * man/cppcheck-design.docbook, man/manual.docbook: Manual: Don't - wrap with - -2011-07-01 Tim Gerundt - - * man/manual.docbook, man/writing-rules-1.docbook, - man/writing-rules-2.docbook, man/writing-rules-3.docbook: Manual: - Use and tags - -2011-07-01 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: fix false positive for - unused local class/struct variable - -2011-07-01 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: add support in - CheckOther::functionVariableUsage() for checking structures that are - declared with struct keyword - -2011-07-01 Robert Reif - - * lib/checkother.cpp: cleanup isStatic in - CheckOther::functionVariableUsage() - -2011-06-30 Robert Reif - - * lib/checkother.cpp, lib/checkother.h, test/testunusedvar.cpp: add - support for detecting unused function variables of type class or - struct - -2011-06-30 Reijo Tomperi - - * lib/checkmemoryleak.cpp: Minor cleanup related to previous fix. - This code should not be needed anymore as tokenizer should simplify - question mark away. - -2011-06-30 Reijo Tomperi - - * lib/tokenize.cpp, test/testmemleak.cpp, - test/testsimplifytokens.cpp, test/testtokenize.cpp: Fix #2849, False - positive: memory leak (using question mark operator) - http://sourceforge.net/apps/trac/cppcheck/ticket/2849 Simplify: *d = - b ? b : a; into if-else Simplify { ; { ; } } into { ; } Removed one - memleak test which should be redundant now as question marks should - not get into memleak check. - -2011-06-30 Tim Gerundt - - * man/manual.docbook, man/writing-rules-1.docbook: Manual: Use - tag for files and directories - -2011-06-30 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2849 (False - positive: memory leak (using question mark operator)) - -2011-06-30 Robert Reif - - * lib/tokenize.cpp, test/testclass.cpp: fix #2878 (derived global - class not tokenized properly (class A : ::B { };)) - -2011-06-29 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #2825 (missing varid - on class variables when multiple inheritance is used) - -2011-06-29 Robert Reif - - * lib/symboldatabase.cpp: fix symbol database derived template class - support - -2011-06-29 Robert Reif - - * lib/symboldatabase.cpp: add global namespace derived class support - -2011-06-29 Robert Reif - - * lib/tokenize.cpp, test/testclass.cpp: partial fix for #2867 handle - derived class - -2011-06-29 Kimmo Varis - - * lib/path.h: Document that Path::simplifyPath() needs / as - separators. - -2011-06-29 Daniel Marjamäki - - * lib/settings.cpp, test/testsettings.cpp: Fixed #2797 (Inline - suppressions do not handle filenames correctly) - -2011-06-29 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2855 (False - positive: resource leak when reusing fd) - -2011-06-29 Daniel Marjamäki - - * : Merge pull request #26 from gerundt/man-appendix Add "Writing Cppcheck rules" and "Cppcheck Design" articles as - appendix to the manual - -2011-06-29 Robert Reif - - * lib/checkclass.cpp, test/testunusedprivfunc.cpp: fix #2807 (Wrong - handling of function references when prefixed with &) - -2011-06-28 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h: fix #2864 (--errorlist missing - errors: variableHidingTypedef and Extra qualification) - -2011-06-28 Robert Reif - - * lib/tokenize.cpp, test/testclass.cpp: partial fix for #2867 - Tokenizer::removeRedundantAssignment didn't understand function - local class and removed class variable - -2011-06-28 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #2875 (segmentation - fault of cppcheck ( 0; (a) < (a) )) - -2011-06-27 Tim Gerundt - - * man/buildman.sh: Drop "Writing Cppcheck rules" and "Cppcheck - Design" articles from build file - -2011-06-27 Tim Gerundt - - * man/cppcheck-design.docbook, man/manual.docbook, - man/writing-rules-1.docbook, man/writing-rules-2.docbook, - man/writing-rules-3.docbook: Add "Writing Cppcheck rules" and - "Cppcheck Design" articles as appendix to the manual - -2011-06-27 Tim Gerundt - - * htdocs/devinfo/index.php: Web: Update style from trac timeline - items at dev info page - -2011-06-27 Tim Gerundt - - * htdocs/devinfo/index.php, htdocs/site/activetopics.php: Web: Show - also last post time from active forum topics - -2011-06-27 Robert Reif - - * lib/symboldatabase.cpp, test/testsymboldatabase.cpp: fix #2865 - (segmentation fault of cppcheck ( char a[1] )) - -2011-06-26 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2859 (Extra - qualification not detected) - -2011-06-26 Reijo Tomperi - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #2860, False positive: Returning value of strncat() reported - as memory leak http://sourceforge.net/apps/trac/cppcheck/ticket/2860 - -2011-06-26 Reijo Tomperi - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fix #2840, - False positive: Null pointer dereference - http://sourceforge.net/apps/trac/cppcheck/ticket/2840 - -2011-06-25 Tim Gerundt - - * : Merge pull request #25 from kimmov/web Web: Couple of front page improvements - -2011-06-24 Kimmo Varis - - * htdocs/index.php: Web: Add link to Wikipedia's static analysis - tool article. People looking at our front page may not be familiar with what the - static analysis even means. Add a link which explains it for them. - -2011-06-24 Kimmo Varis - - * htdocs/index.php: Web: Improve front page language. Improve language in few places at the home page. And try to make - couple of things more clear for people not familiar with this kind - of tools. - -2011-06-24 Tim Gerundt - - * htdocs/devinfo/index.php, htdocs/site/activetopics.php: Web: Show - active forum topics at dev info page - -2011-06-24 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/symboldatabase.cpp: replace some - pattern matching with variable lookup in checkGlobalAndLocalVariable - -2011-06-23 Robert Reif - - * lib/symboldatabase.cpp: set symbol database array variable - dimensions specified by a variable to the maximum size that variable - can hold - -2011-06-23 Robert Reif - - * lib/checkbufferoverrun.cpp: fix an off by 1 error introduced in - 48e6ea271a08a0d1cb9d2a5a22b6f946e404b959 that prevented checking all - variables - -2011-06-23 Kimmo Varis - - * gui/test/runtests.py: GUITESTS: Improve the running script. Don't use recursion in the script. The Python's os.walk() already - lists all files in subdirectories and using recursion only caused - tests to be found twice. Also handle the case the project file - defines binary path with DESTDIR define. - -2011-06-23 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Added TODO test case for - the simplifyKnownVariables to better simplify local variables - -2011-06-23 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2815 (FP: Null - pointer dereference error about a member) - -2011-06-23 Tim Gerundt - - * : commit dcaf7be9b5fdb6f9c53626ac5cdedbad475f7f35 Author: Tim - Gerundt Date: Thu Jun 23 11:10:42 2011 +0200 - -2011-06-23 Tim Gerundt - - * htdocs/index.php: Web: Download only the chars we really need from - Orbitron font - -2011-06-23 Tim Gerundt - - * htdocs/index.php: Web: Update download to version 1.49 - -2011-06-22 Robert Reif - - * lib/checkbufferoverrun.cpp: use symbol database to lookup variable - type for buffer overrun checks - -2011-06-22 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h: start using - symbol database array info for buffer overrun checks - -2011-06-22 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: add array - information to symbol database - -2011-06-22 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h: use a more - conventional technique for accessing ArrayInfo private variables - -2011-06-22 Robert Reif - - * gui/test/benchmark/simple/benchmarksimple.cpp: run astyle - -2011-06-22 Kimmo Varis - - * gui/test/runtests.py: GUITESTS: Run only existing tests with the - script. Improve the runner script to run only tests whose binary file - exists. Tests with inexistant binary file are not counted into test - counts in the summary. Add the MIT license header. I'm now maintaining this script in - external repository with MIT license. So I can use the script in - other projects too. - -2011-06-20 Kimmo Varis - - * gui/test/benchmark/benchmark.pro, gui/test/benchmark/common.pri, - gui/test/benchmark/simple/benchmarksimple.cpp, - gui/test/benchmark/simple/benchmarksimple.h, - gui/test/benchmark/simple/simple.pro, - gui/test/data/benchmark/simple.cpp, gui/test/test.pro: BENCHMARKS: - Add simple benchmark. - -2011-06-22 Reijo Tomperi - - * runastyle: Fix #2843, Astyle script does not recognize Astyle 2.02 - http://sourceforge.net/apps/trac/cppcheck/ticket/2843 - -2011-06-22 Reijo Tomperi - - * runastyle: Add some comments to runastyle script - -2011-06-22 Reijo Tomperi - - * lib/checkpostfixoperator.cpp, test/testpostfixoperator.cpp: Fix - #2847, cppcheck hangs with 100% cpu load - http://sourceforge.net/apps/trac/cppcheck/ticket/2847 - -2011-06-21 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2808 - (False positive 'Possible null pointer dereference') - -2011-06-21 Daniel Marjamäki - - * createrelease: createrelease: updated upload command - -2011-06-21 Kimmo Varis - - * gui/test/runtests.py: GUITESTS: Print summary from the test - script. - -2011-06-21 Kimmo Varis - - * gui/test/runtests.py: GUITESTS: Add Python script for running all - tests. - -2011-06-21 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #2845 (segmentation - fault of cppcheck) - -2011-06-20 seb777 - - * test/teststl.cpp: run astyle - -2011-06-20 seb777 - - * lib/checkstl.cpp, test/teststl.cpp: fix 2846 (false positive for - auto_ptr check with container element) - -2011-06-20 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2830 (false - positive: resource leak when using fdopen) - -2011-06-19 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2844 fix to - generate correct output - -2011-06-19 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2844 (typedef - causes 'syntax error') - -2011-06-19 Felix Geyer - - * Makefile, tools/dmake.cpp: Ticket: #2823 (cppcheck fails to build - with system tinymxl and -Wl,--as-needed) - -2011-06-18 Kimmo Varis - - * readme_gui.txt: GUITESTS: Add short mention of tests to gui - readme. - -2011-06-18 Kimmo Varis - - * gui/test/data/files/dir2/foo1.cpp, - gui/test/filelist/testfilelist.cpp, - gui/test/filelist/testfilelist.h: GUITESTS: Add FileList filtering - tests. - -2011-06-18 Kimmo Varis - - * tools/Makefile: Fix tools/Makefile permissions. - -2011-06-18 Daniel Marjamäki - - * createrelease: createrelease: added scp command for uploading - files - -2011-06-17 seb777 - - * lib/checkstl.cpp, test/teststl.cpp: fix 2838 (Token::Match called - with varid 0 on auto_ptr check) cleanup code and better check varid - -2011-06-17 Kimmo Varis - - * gui/test/data/files/dir1/dir11/foo11.cpp, - gui/test/data/files/dir1/foo1.cpp, - gui/test/filelist/testfilelist.cpp, - gui/test/filelist/testfilelist.h: GUITESTS: Add tests for adding - directory. - -2011-06-17 Kimmo Varis - - * gui/test/data/projectfiles/simple.cppcheck, - gui/test/data/projectfiles/simple_noroot.cppcheck, - gui/test/data/xmlfiles/xmlreport_v1.xml, - gui/test/data/xmlfiles/xmlreport_v2.xml, - gui/test/projectfile/testprojectfile.cpp, - gui/test/projectfiles/simple.cppcheck, - gui/test/projectfiles/simple_noroot.cppcheck, - gui/test/xmlfiles/xmlreport_v1.xml, - gui/test/xmlfiles/xmlreport_v2.xml, - gui/test/xmlreport/testxmlreport.cpp, - gui/test/xmlreportv1/testxmlreportv1.cpp, - gui/test/xmlreportv2/testxmlreportv2.cpp: GUITESTS: Move testdata to - data-subdirectory. - -2011-06-17 Kimmo Varis - - * gui/test/common.pri, gui/test/data/files/bar1, - gui/test/data/files/bar1.foo, gui/test/data/files/foo1.cpp, - gui/test/data/files/foo2.cxx, gui/test/data/files/foo3.cc, - gui/test/data/files/foo4.c, gui/test/data/files/foo5.c++, - gui/test/data/files/foo6.txx, gui/test/data/files/foo7.tpp, - gui/test/filelist/filelist.pro, gui/test/filelist/testfilelist.cpp, - gui/test/filelist/testfilelist.h, gui/test/test.pro: GUITESTS: Add - simple test for FileList. These tests check that FileList only accepts existing files with - accepted filename extensions. - -2011-06-17 Kimmo Varis - - * gui/test/projectfile/testprojectfile.cpp, - gui/test/translationhandler/testtranslationhandler.cpp, - gui/test/xmlreportv1/testxmlreportv1.cpp, - gui/test/xmlreportv2/testxmlreportv2.cpp: GUITESTS: Few compares in - tests were wrong way around. - -2011-06-16 seb777 - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: fix #747 and - #748 (incorrect use of auto_ptr - new check) - -2011-06-16 Kimmo Varis - - * gui/applicationlist.cpp, gui/applicationlist.h, - gui/mainwindow.cpp: GUI: Cleanup settings usage. Use local QSettings instead of the one created by MainWindow. - -2011-06-16 Kimmo Varis - - * gui/test/common.pri, gui/test/projectfile/projectfile.pro, - gui/test/projectfile/testprojectfile.cpp, - gui/test/projectfile/testprojectfile.h, - gui/test/projectfiles/simple.cppcheck, - gui/test/projectfiles/simple_noroot.cppcheck, gui/test/test.pro: - GUITESTS: Add tests for loading project files. - -2011-06-16 Kimmo Varis - - * gui/test/xmlreport/testxmlreport.cpp, - gui/test/xmlreport/xmlreport.pro, - gui/test/xmlreportv1/testxmlreportv1.cpp, - gui/test/xmlreportv1/xmlreportv1.pro, - gui/test/xmlreportv2/testxmlreportv2.cpp, - gui/test/xmlreportv2/xmlreportv2.pro: GUITESTS: More flexible test - data paths. Use build-time define to set the path to the source files directory. - Which then can be used to format path to the test data. This allows - running tests from out-of-source-tree -builds that e.g. QtCreator - does. - -2011-06-15 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_es.ts, - gui/cppcheck_fi.ts, gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_sr.ts, gui/cppcheck_sv.ts: GUI: Update translation - files. - -2011-06-15 Kimmo Varis - - * gui/txtreport.h: GUI: Add Q_OBJECT to TxtReport class. - -2011-06-14 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix extra - qualification check for same class name in different namespaces - -2011-06-14 Lauri Nurmi - - * lib/checkstl.cpp: Fixed #2836 ([PATCH] FP: Dereferenced iterator - has been erased) - -2011-06-12 Daniel Marjamäki - - * Makefile: Makefile: Set debug mode - -2011-06-12 Daniel Marjamäki - - * Makefile: 1.49: Updated Makefile for release - -2011-06-12 Daniel Marjamäki - - * Changelog: 1.49: Updated the changelog - -2011-06-12 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, lib/cppcheck.cpp, - man/manual.docbook, win_installer/productInfo.wxi: 1.49: updated - version - -2011-06-12 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #2835 (crash of - cppcheck ( ><,f - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #2831 (crash of - cppcheck ( z )) - -2011-06-12 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2834 (crash of - cppcheck (std::vector::iterator)) - -2011-06-11 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: fix #2739 - (segmentation fault of cppcheck ( if()x )) - -2011-06-11 seb777 - - * AUTHORS: With the agreement of Daniel Marjamäki, I write my name - in this AUTHORS file. If you also want to have your name in this - file, contribute to cppcheck. - -2011-06-10 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2682 - (segmentation fault of cppcheck ( x a[0] = )) - -2011-06-10 Kimmo Varis - - * gui/test/xmlfiles/xmlreport_v1.xml, - gui/test/xmlreportv1/testxmlreportv1.cpp: GUITESTS: Fix XML V1 test. Test was using and assuming that severity string starts with capital - letter (e.g. "Style"). But the strings are all lowercase letters. Ticket #2832 (GUI: XML version 1 test fails) - -2011-06-10 Kimmo Varis - - * gui/test/translationhandler/translationhandler.pro, - gui/test/xmlreport/xmlreport.pro, - gui/test/xmlreportv1/xmlreportv1.pro, - gui/test/xmlreportv2/xmlreportv2.pro: GUITESTS: Use common build - artifact directory. Using common build artifacts (object files, moc files) avoids - recompiling whole lib and other shared files separately for each - test. - -2011-06-10 Kimmo Varis - - * gui/test/translationhandler/testtranslationhandler.cpp: GUITESTS: - Run Astyle. - -2011-06-10 Kimmo Varis - - * runastyle, runastyle.bat: Run Astyle recursively for gui/test. GUI's tests are now in separate subdirectories. To avoid adding each - subdirectory to the Astyle scripts run Astyle recursively. - -2011-06-10 Kimmo Varis - - * gui/test/main.cpp: GUITESTS: Remove unneeded main file. - -2011-06-10 Kimmo Varis - - * gui/test/test.pro, gui/test/testxmlreportv2.cpp, - gui/test/testxmlreportv2.h, - gui/test/xmlreportv2/testxmlreportv2.cpp, - gui/test/xmlreportv2/testxmlreportv2.h, - gui/test/xmlreportv2/xmlreportv2.pro: GUITESTS: Move XML V2 tests to - own project. - -2011-06-10 Kimmo Varis - - * gui/test/test.pro, gui/test/testxmlreportv1.cpp, - gui/test/testxmlreportv1.h, - gui/test/xmlreportv1/testxmlreportv1.cpp, - gui/test/xmlreportv1/testxmlreportv1.h, - gui/test/xmlreportv1/xmlreportv1.pro: GUITESTS: Move XML format V1 - tests to own project. - -2011-06-10 Kimmo Varis - - * gui/test/xmlreport/testxmlreport.cpp: GUITESTS: Fix XML files - paths. - -2011-06-10 Kimmo Varis - - * gui/test/test.pro, gui/test/testxmlreport.cpp, - gui/test/testxmlreport.h, gui/test/xmlreport/testxmlreport.cpp, - gui/test/xmlreport/testxmlreport.h, - gui/test/xmlreport/xmlreport.pro: GUITESTS: Refactoring XmlReport - test. - -2011-06-10 Kimmo Varis - - * gui/test/translationhandler/testtranslationhandler.cpp: GUITESTS: - Fix translation count in test. - -2011-06-10 Kimmo Varis - - * gui/test/common.pri, gui/test/test.pro, - gui/test/testtranslationhandler.cpp, - gui/test/testtranslationhandler.h, - gui/test/translationhandler/testtranslationhandler.cpp, - gui/test/translationhandler/testtranslationhandler.h, - gui/test/translationhandler/translationhandler.pro: GUITESTS: - Refactoring test building. Start building each test as separate project as QtestLib tests - usually are built. This commit adds the infrastructure and moves - TranslationHandler test as own project. - -2011-06-09 Robert Reif - - * lib/tokenize.cpp: improve #2828 fix by adding switch - -2011-06-08 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2828 (false - positive: Function parameter 'STYLE' hides enumerator with same - name) - -2011-06-08 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2805 (false - positive: [NotAssigned1.cpp:5]: (style) Variable 'y' is not assigned - a value) - -2011-06-08 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Give full path when opening project file. Fix I did yesterday gave only filename of the project file for - function loading project file. Causing the loading failing if not in - "current" directory. - -2011-06-07 Kimmo Varis - - * gui/mainwindow.cpp: GUI: More strict filtering for finding project - file. - -2011-06-07 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Suggest using project file if one is - found. If we there is project file in the directory to check then ask user - if one wants to use the project file instead. If there are multiple - project files then just tell there are project files and ask if user - wants to continue without using them. Ticket: #2816 (GUI regression: Interrupted checking because of too - many #ifdef configurations.) - -2011-06-07 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Handle missing checked paths in project - file. If the project file does not define paths to check then check the - project root directory (which likely is the directory where the - project file is located). Ticket #2816 (GUI regression: Interrupted checking because of too - many #ifdef configurations.) - -2011-06-06 Robert Reif - - * gui/mainwindow.cpp: make usre we have a project file before - outputting its name - -2011-06-04 Robert Reif - - * gui/mainwindow.cpp, gui/projectfile.h: Output GUI project name - when checking starts or restarts - -2011-06-03 Robert Reif - - * test/testnullpointer.cpp: todo tests for #2812 (false negative: - null pointer dereference when returning struct member) - -2011-06-03 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #2795 (hash operator[] - is not 'const') (original patch by Sebastien Debrard) (modified to - use the symbol database) - -2011-06-03 Robert Reif - - * lib/tokenize.cpp: fix 2 use after frees in simplifyEnum found by - visual studio and verified by valgrind - -2011-05-29 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2806 (False - positive with g_strstrip()) - -2011-05-27 seb777 - - * lib/checkother.cpp, test/testother.cpp: fix #2786 (new check: - Using sizeof with numeric constant) Add unit test and improve check - with negative constant because in cppcheck %num% means 'integer' - -2011-05-27 Robert Reif - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: add support - for null pointer checking struct pointers - -2011-05-27 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2804 - (Underlying type of enumerator produces a syntax error) - -2011-05-24 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #2792 (false positive: - Member variable 'class::m_val' is not assigned a value in - 'class::operator=') - -2011-05-17 seb777 - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: fix - #2786 - -2011-05-22 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #2798 (False positive: - Invalid iterator check doesn't respect code paths) - -2011-05-22 Greg Hewgill - - * cli/threadexecutor.cpp: Allow suppression of the 'cppcheckError' - error reported by the threaded CLI executor. This is related to commit 5bbf39d094efccadfd9a927c5f7052cde541e730. - -2011-05-19 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2790 - (Incorrect allocation mismatch error) - -2011-05-19 Stefan Weil - - * lib/executionpath.cpp: executionpath: fix memory leak - -2011-05-19 Daniel Marjamäki - - * CMakeLists.txt, cli/CMakeLists.txt, cmake/modules/FindPCRE.cmake, - gui/CMakeLists.txt, lib/CMakeLists.txt, lib/library_sources.cmake, - test/CMakeLists.txt: cmake: cleanup unmaintained cmake files - -2011-05-19 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2737 ((error) - Analysis failed. If the code is valid then please report this - failure.) - -2011-05-18 WenChung Chiu - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: Fixed - #2784 (Pointer issue: *&f=open()) - -2011-05-15 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Don't report that there are - missing system includes unless --debug-warnings has been given. - -2011-05-13 Kimmo Varis - - * gui/logview.cpp, gui/logview.h, gui/mainwindow.cpp: GUI: Simplify - settings usage in Log window. - -2011-05-13 Kimmo Varis - - * gui/mainwindow.cpp, gui/settingsdialog.cpp, gui/settingsdialog.h: - GUI: Simplify settings handling in Preferences dialog. - -2011-05-13 Kimmo Varis - - * gui/common.h, gui/projectfiledialog.cpp, gui/projectfiledialog.h: - GUI: Make Project-dialog to remember its size. - -2011-05-13 Kimmo Varis - - * gui/main.cpp: GUI: Initialize Settings in main. Setting organization and program name in main() allows us to cleanup - Settings class usage. As we don't need to keep using the one - instance of Settings but can create new Settings class whenever we - need to access settings. According to the Qt documentation creating - Settings class is fast. - -2011-05-13 Kimmo Varis - - * gui/projectfile.ui: GUI: Show main tab in project file dialog by - default. - -2011-05-13 Kimmo Varis - - * gui/projectfiledialog.cpp, gui/projectfiledialog.h: GUI: Set - initial path for adding paths to project. Use project file's location as base path when adding new paths (checked, included or ignored) to the project. In most cases user - wants to add paths in the same project so this reduces browsing - paths considerably when adding them. - -2011-05-12 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Remove trailing spaces from translated - strings - -2011-05-12 Kimmo Varis - - * gui/projectfile.txt: GUI: Update project file documentation. Remove mentioning of automatic loading which was disabled in - previous commit. - -2011-05-12 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Remove automatic/silent - loading of projects. When project files support was added to the GUI there was no GUI for - them and automatic/silent loading was added. So that if the - directory contained project file with the same name (and .cppcheck - extension) then the project file was automatically loaded and used - for the checking. This can be very confusing for the user as there is no any - indication that the project file is used. But this solution was - necessary at that time to get project file support added. Now that we have usable GUI for the project files this automatic/ - silent loading can be removed. Nobody really should be using it - anymore. And even if the automatic loading is needed one can give - the project file for the GUI using command line parameter. - -2011-05-12 Kimmo Varis - - * gui/gui.cppcheck: GUI: Fix the gui.cppcheck to work with GUI. The project file to check just GUI code was missing the directory to - check. This is probably due it was used originally as - "automatically" loaded project file which assumed current directory - is checked and only added some additional parameters. - -2011-05-12 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Handle non-existing - projects in MRU list. If the project file in MRU list does not exist ask user if one wants - to remove the file from the list. If user agrees then the file is - removed from the list. Otherwise the file is left to the list but - not tried to open. User may have accidentally moved or renamed the - file so we give a possibility to add it back and not just blindly - removing it from the list. - -2011-05-12 Kimmo Varis - - * gui/mainwindow.h: GUI: Remove unneeded forward declaration. - -2011-05-12 Kimmo Varis - - * gui/common.h, gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h: - GUI: Add most recently used projects to menu. Add MRU items for project files to File-menu. When user creates a - new project file or opens existing project file it is added to the - list of recently used projects. Last 5 projects are remembered and - available for quick acess in the File-menu. - -2011-05-11 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2782 - (Segfault with #asm) - -2011-05-11 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2780 (false - positive: variable p is not assigned a value 'int p[2]; *p = 0;') - -2011-05-11 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #2783 (Improve check: struct member - leaks when analysing c file) - -2011-05-08 Robert Reif - - * lib/checkother.cpp, test/testother.cpp: #2700 (common logic or cut and paste errors) make duplicate - branches inclnclusive - -2011-05-07 Daniel Marjamäki - - * lib/tokenize.cpp: added comment about how bad typedef behaviour - can be reproduced - -2011-05-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2743 (segmentation - fault of cppcheck 'std::vector v1 = a, v2 = b;') - -2011-05-07 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1684 (false positive: buffer access out of bounds when using extern - variable declaration) - -2011-05-06 Robert Reif - - * lib/checkautovariables.cpp, test/testautovariables.cpp: fix #2765 - (Non local address detected as address of local auto-variable) - -2011-05-06 Robert Reif - - * lib/checkautovariables.cpp, test/testautovariables.cpp: fix - regression #1819 (False positive: auto variable assignment (unseen - typedef)) - -2011-05-06 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp, test/testunusedvar.cpp: - Fixed #2770 (False positives (scope can be reduced / variable is - assigned value that is never used)) - -2011-05-05 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2764 (False - positive: Uninitialized variable '&(x[0])') - -2011-05-05 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Reverted fix for string::size. - Ticket: #2756 - -2011-05-04 Kimmo Varis - - * win_installer/readme.txt: Installer: small update to installer - doc. - -2011-05-04 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: Remove unneeded Qt DLLs. Since we now have on-line help we don't need to install the DLLs - that were required for the help viewer. - -2011-05-04 Kimmo Varis - - * test/testcmdlineparser.cpp: Add test for --check-config. - -2011-05-04 Kimmo Varis - - * test/testcmdlineparser.cpp: Make "failing" cmdlineparser tests - todo-tests. - -2011-05-04 Daniel Marjamaki - - * cli/cppcheckexecutor.cpp: updated error message. --check-includes - has been renamed to --check-config - -2011-05-03 Zachary Blair - - * gui/common.h, gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h, - gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.cpp, - gui/resultsview.h: Fixed #2758 ([GUI] Provide a means to filter - results based on a search string) - -2011-05-03 Greg Hewgill - - * test/testsuppressions.cpp: Fix testsuppressions for Windows builds - for now, pending further refactoring - -2011-05-03 Greg Hewgill - - * Makefile, test/test.pro, test/testsuppressions.cpp: Revert "Remove - the testsuppressions because it doesn't contain any unit tests. A - testsuppressions would be nice if it was more specific. Ticket: - #2748" This reverts commit 6bf5eb67be05d3768158505fb375fad12b8488cf. - -2011-05-03 Greg Hewgill - - * test/test.vcproj, test/test.vcxproj, test/test.vcxproj.filters: - Revert "TestSuppressions: Updated Visual Studio project files" This reverts commit 8ec570837a77e2e15f48f0235211d52ddf12de9f. - -2011-05-02 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #1982 - (simplifyTypedef: scope info is lost) - -2011-05-02 Daniel Marjamäki - - * cli/cmdlineparser.cpp, cli/cppcheckexecutor.cpp, - lib/cppcheck.cpp, lib/preprocessor.cpp, lib/settings.cpp, - lib/settings.h: renamed --check-includes to --check-config - -2011-05-02 seb777 - - * cli/cmdlineparser.cpp: add include-header to use EXIT_FAILURE - -2011-05-02 seb777 - - * : commit d7927bbb614378f9b4f173bd992ae879fc7f7c8d Author: Daniel - Marjamäki Date: Mon May 2 18:49:40 2011 - +0200 - -2011-05-02 Daniel Marjamäki - - * test/testsimplifytokens.cpp: astyle formatting - -2011-05-02 Daniel Marjamäki - - * cli/cmdlineparser.cpp, cli/cppcheckexecutor.cpp, - lib/cppcheck.cpp, lib/preprocessor.cpp, lib/preprocessor.h, - lib/settings.cpp, lib/settings.h: Missing includes - normally just - report that there are missing includes. The --check-includes can - then be used to check what missing includes there are. Ticket: #2719 - -2011-05-02 Daniel Marjamäki - - * lib/preprocessor.cpp: reverted 761dd419 - reporting excessive - missing include messages - -2011-05-01 Daniel Marjamaki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2721 - (Tokenizer::simplifyTemplates: fail when using template argument - 'char[2]') - -2011-05-01 Daniel Marjamaki - - * test/test.vcproj, test/test.vcxproj, test/test.vcxproj.filters: - TestSuppressions: Updated Visual Studio project files - -2011-05-01 Daniel Marjamäki - - * lib/preprocessor.cpp: Fixed #2719 (Fix excessive false positives - in include-file handling) - -2011-05-01 Ville Skyttä - - * cli/cmdlineparser.cpp: cmdlineparser: Update list of file - extensions, expand EXIT_FAILURE, don't list --rule* if built without - support for rules. Ticket: #2761 - -2011-05-01 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Moved a few basic simplifications - from simplifyTokenList to tokenize - -2011-05-01 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2760 (false - positive: uninitialized variable ', (a) =') - -2011-05-01 Daniel Marjamäki - - * Makefile: Makefile: updated with dmake - -2011-05-01 Daniel Marjamäki - - * test/testtokenize.cpp: TestTokenizer: code cleanup - -2011-04-30 Daniel Marjamäki - - * Makefile, test/test.pro, test/testsuppressions.cpp: Remove the - testsuppressions because it doesn't contain any unit tests. A - testsuppressions would be nice if it was more specific. Ticket: - #2748 - -2011-04-29 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed #2755 (cppcheck goes into infinite loop - while scanning OpenSSL sources) - -2011-04-29 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix tokenizer bug where - 'class B : private ::A { };' was tokenized to 'class B : private: : - A { } ;' - -2011-04-28 Robert Reif - - * test/testclass.cpp, test/testsymboldatabase.cpp: move symbol - database tests to testsymboldatabase.cpp - -2011-04-28 Robert Reif - - * lib/symboldatabase.cpp, test/testsymboldatabase.cpp: fix debug - warning for function parameters with template with varid of 0 - -2011-04-28 Robert Reif - - * lib/checkstl.cpp, test/teststl.cpp: fix - -2011-04-28 Kimmo Varis - - * gui/gui.pro: GUI: Remove dependency to QtXml. - -2011-04-27 Kimmo Varis - - * Makefile, cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h, - cli/threadexecutor.cpp, cli/threadexecutor.h, gui/threadresult.cpp, - gui/threadresult.h, lib/errorlogger.h, test/testother.cpp, - test/testsuppressions.cpp, test/testthreadexecutor.cpp, - tools/dmake.cpp: Remove ErrorLogger::reportStatus() method. The ErrorLogger::reportStatus() is not lib code interface. The CLI - code does the looping through file list and gives one file at a time - for the core code. Hence lib has no any idea about the progress and - it can't provide such information. Also the recent commit (6d858b6) caused a GUI build failure by - adding CLI code dependency to GUI. Which is big no-no. This is admittedly a hack. But it allow us to build all modules - again. - -2011-04-27 Markus Elfring - - * gui/CMakeLists.txt: Deletion of references to modules "QtHelp" and - "QtXml" in the GUI CMake script Two Qt modules are not needed any more in the CMake script for the - graphical user interface after the commit "GUI: Open online-help - instead of local help". - - https://github.com/danmar/cppcheck/commit/3965a08b7b9de4b4b79b18513b7e5222d4fa3cd7#commitSigned-off-by: Markus Elfring - -2011-04-27 Daniel Marjamäki - - * lib/path.cpp: astyle formatting - -2011-04-27 Daniel Marjamäki - - * test/test.pro: Fixed #2749 (Different test count using Makefile - and QtCreator project) - -2011-04-27 Daniel Marjamäki - - * tools/dmake.cpp: dmake: fixed compiler error - -2011-04-27 Greg Hewgill - - * lib/preprocessor.cpp: Use tolowerWrapper wherever appropriate - -2011-04-27 Greg Hewgill - - * lib/path.cpp: Portability: Raise an error if a platform-specific - filename compare function is not specified - -2011-04-26 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp, test/testconstructors.cpp: - fix spelling of initialized in checkclass messages - -2011-04-26 Robert Reif - - * lib/checkautovariables.cpp, test/testautovariables.cpp: fix false - positive introduced in CheckAutoVariables::autoVariables conversion - to use symbol database - -2011-04-27 Greg Hewgill - - * cli/filelister.cpp, test/testfilelister.cpp: FileLister: don't - assume that all files have nonzero size in test case - -2011-04-26 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2753 (False - negative: dereference uninitialized pointer 'buf[0] = 0;') - -2011-04-19 Greg Hewgill - - * cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h, - cli/filelister.cpp, cli/filelister.h, cli/threadexecutor.cpp, - cli/threadexecutor.h, gui/threadresult.cpp, gui/threadresult.h, - lib/cppcheck.cpp, lib/cppcheck.h, lib/errorlogger.h, - test/testcppcheck.cpp, test/testfilelister.cpp, test/testother.cpp, - test/testsuite.h, test/testsuppressions.cpp, - test/testthreadexecutor.cpp: Report percentage complete based on - file size This patch makes the (reasonable) assumption that the total size of - all checked files fits in a 'long' type. - -2011-04-25 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #2722 (new check: statement that is always true (strcmp)) - -2011-04-26 Tim Gerundt - - * htdocs/.htaccess: Web: Set correct MIME type for favicon - -2011-04-26 Tim Gerundt - - * htdocs/.htaccess: Web: Add compression for HTML, CSS and - JavaScript files - -2011-04-25 Kimmo Varis - - * : commit 7d00d47404dfc7f791de7bf9717c26c3b837a690 Author: Kimmo - Varis Date: Sun Apr 24 23:41:24 2011 +0300 - -2011-04-24 Kimmo Varis - - * test/test.pro: Remove outdated comment from tests.pro. - -2011-04-24 Kimmo Varis - - * test/test.pro: Add suppressions tests to qmake project. - -2011-04-24 Kimmo Varis - - * cli/cppcheckexecutor.cpp, cli/threadexecutor.cpp, - gui/checkthread.cpp, lib/cppcheck.cpp, lib/cppcheck.h, - test/testsuppressions.cpp: Modify the Cppcheck class to check one - file at a time. Unify usage and API of CppCheck class. Allow only one file checked - at a time, instead of list of files. Clients can then handle file - lists more naturally and as they see fit. Also clients have better - knowledge of how checking status should be handled. The single-threaded CLI checking was only one using the file list. - Other clients were giving files (to list) one file at a time. - -2011-04-23 Kimmo Varis - - * cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h: CLI: Give files - to Cppcheck class one at a time. When doing single-threaded checking give checked files to Cppcheck - class one file at a time. Like GUI and multithreaded checking - already do. This unifies how we call Cppcheck class from different - clients. - -2011-04-23 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2745 (Enum vs - local variable - conflict) - -2011-04-23 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #2746 (false - positive: syntax error (typedef in __attribute__ ))) - -2011-04-23 Robert Reif - - * lib/checkautovariables.cpp, lib/checkautovariables.h, - test/testautovariables.cpp: convert last check in checkautovariables - to use the symbol database - -2011-04-23 Robert Reif - - * : commit cd64d8476ce61e50474ed991cd532eee222ccb9b Author: Robert - Reif Date: Sat Apr 23 09:37:50 2011 -0400 - -2011-04-23 Daniel Marjamäki - - * readme.txt: readme: added a little info about compiling without - pcre - -2011-04-22 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: don't debug warn - about class function definitions without body having missing varid - on function parameters - -2011-04-22 Robert Reif - - * test/testtokenize.cpp: add another test case for #2614 (missing - varid on function parameter) - -2011-04-22 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2740 - (inline cmd // cppcheck-suppress does not work anymore for 1.48) - -2011-04-23 Greg Hewgill - - * lib/checkclass.cpp, lib/symboldatabase.cpp, test/testclass.cpp: - Change symbol database such that the typestart token skips over type - modifiers (const/static/mutable). This fixes checking for the case - of a memset() on a static variable. - -2011-04-22 Tim Gerundt - - * : Change dialog bitmap from windows installer - -2011-04-23 Greg Hewgill - - * tools/dmake.cpp: Makefile: handle case where LDFLAGS is already - defined (in dmake) - -2011-04-22 Tim Gerundt - - * htdocs/devinfo/index.php, htdocs/index.php, - htdocs/site/css/all.css: Web: Use Orbitron font for page head - -2011-04-22 Greg Hewgill - - * Makefile: Makefile: handle case where LDFLAGS is already defined - -2011-04-20 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2738 (syntax - error on valid code) - -2011-04-20 Robert Reif - - * lib/checkclass.cpp: run astyle - -2011-04-20 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Virtual destructors: - Enabled the check again. I think it is conclusive now. Ticket: #2728 - -2011-04-20 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: Fixed - TODO test case. Ticket: #2733 - -2011-04-20 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2736 - (segmentation fault of cppcheck) - -2011-04-20 Daniel Marjamäki - - * lib/checkother.cpp, test/testmemleak.cpp: astyle formatting - -2011-04-20 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2733 (Memory - leak: not all branch are checked) - -2011-04-20 Daniel Marjamäki - - * lib/checkother.cpp: const parameter: Added comment to reduce false - negatives for various classes in the std namespace - -2011-04-19 Daniel Marjamäki - - * Makefile, readme.txt, tools/dmake.cpp: Makefile: added option for - compiling with/without rules - -2011-04-19 Daniel Marjamäki - - * test/testmemleak.cpp: astyle formatting - -2011-04-19 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #2734 (False - positive: reports 'should be passed by reference' for - std::streamoff) - -2011-04-19 Ettl Martin - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: #2733 added sizeof - to checkmemory-leaks white list, added a todo-testcase - -2011-04-18 Robert Reif - - * lib/checkother.cpp, test/testother.cpp: fix #2730 (The same - expression on both sides of != is OK when checking for NaN) - -2011-04-18 Robert Reif - - * test/testtokenize.cpp: fix previous patch: test for #2614 (missing - varid on function parameter) - -2011-04-18 Robert Reif - - * test/testtokenize.cpp: add test for #2614 (missing varid on - function parameter) - -2011-04-18 Martin Exner - - * lib/preprocessor.cpp, lib/token.cpp, lib/tokenize.cpp, - test/testautovariables.cpp: Fixed #2676 (setVarId: variables with - global scope qualification :: don't get varids) - -2011-04-17 Tim Gerundt - - * htdocs/index.php: Web: Add link to Jenkins plugin - -2011-04-16 Kimmo Varis - - * gui/settings.ui: GUI: Move internal error option to Advanced-tab. - -2011-04-16 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_es.ts, - gui/cppcheck_fi.ts, gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_sr.ts, gui/cppcheck_sv.ts: GUI: Update translation - files. - -2011-04-16 Kimmo Varis - - * gui/common.h, gui/erroritem.cpp, gui/mainwindow.cpp, - gui/settings.ui, gui/settingsdialog.cpp: GUI: Add option for - enabling inconclusive checks. Add new "Advanced" page to preferences-dialog and add there a - checkbox for enabling inconclusive checks. Now that checkbox is the - only control in that new page but there will be more controls later - on. - -2011-04-16 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Fixed bug. When varid is 0 then - %varid% doesn't work. Ticket: #2723 - -2011-04-16 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2716 (Easy to - reproduce crash) - -2011-04-16 Daniel Marjamäki - - * lib/errorlogger.cpp, test/testerrorlogger.cpp: ErrorLogger: - Refactoring/fixing the serializer/deserializer for inconclusive - messages - -2011-04-16 Kimmo Varis - - * gui/erroritem.cpp, gui/erroritem.h, gui/resultstree.cpp, - gui/threadresult.cpp, gui/txtreport.cpp, gui/xmlreportv1.cpp, - gui/xmlreportv2.cpp: GUI: Add support for inconclusive errors. This is the first (and quick) support for the inconclusive errors. - We simply add [Inconclusive] to begin of the summary. This is - temporary solution until better GUI is implemented. XML v1 won't be - supporting inconclusive errors. For XML v2 we need still to decide - what to do. - -2011-04-16 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp: astyle formatting - -2011-04-16 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testother.cpp, - test/testsimplifytokens.cpp: Fixed #2713 (False positive (Redundant - assignment)) - -2011-04-16 Stefan Weil - - * htmlreport/cppcheck-htmlreport: html report: better handling of - non ASCII characters in C source code - -2011-04-16 Stefan Weil - - * cli/cppcheckexecutor.cpp: CppcheckExecutor: Code cleanups and - fixes - -2011-04-14 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2720 (false - positive: syntax error with c++0x code) - -2011-04-14 Daniel Marjamäki - - * cli/threadexecutor.cpp, lib/check.h, lib/checkmemoryleak.cpp, - lib/checkunusedfunctions.cpp, lib/cppcheck.cpp, - lib/errorlogger.cpp, lib/errorlogger.h, lib/preprocessor.cpp, - lib/symboldatabase.cpp, lib/token.cpp, lib/tokenize.cpp, - test/testerrorlogger.cpp: Inconclusive checking: Report inconclusive - errors with reportInconclusiveError. It takes the same parameters as - reportError. - -2011-04-14 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2714 (False - positive: ternary operator and += style warning.) - -2011-04-13 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2718 (Analysis - failed. If the code is valid then please report this failure.) - -2011-04-13 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2717 (false - positive: syntax error (typedef void f(int) const;)) - -2011-04-13 Robert Reif - - * lib/errorlogger.h, test/testerrorlogger.cpp, - test/testsimplifytokens.cpp: run astyle - -2011-04-11 Reijo Tomperi - - * Makefile, tools/dmake.cpp: "#ifndef" can't be used in Makefile (it - is considered a commented line). Replaced it with "ifndef". - -2011-04-11 Daniel Marjamäki - - * createrelease: createrelease: minor updates - -2011-04-10 Daniel Marjamäki - - * lib/cppcheck.cpp, lib/errorlogger.cpp, test/testerrorlogger.cpp: - inconclusive: don't report such messages in xml version 1 format. - until we decide how they will be reported in xml version 2 format I - don't report it. - -2011-04-10 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2712 (false - positive: Division by zero) - -2011-04-10 Tim Gerundt - - * htdocs/index.php: Web: Update download to version 1.48 - -2011-04-10 Daniel Marjamäki - - * lib/errorlogger.h: ErrorLogger: Added severities for inconclusive - error and inconclusive warning - -2011-04-10 Robert Reif - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: add - check for same expression on both sides of an operator (part of - #2700) - -2011-04-10 Robert Reif - - * : commit 4a50aca7b2ba92a22c1115dccb04f1c14910b97c Author: Robert - Reif Date: Sun Apr 10 09:57:09 2011 -0400 - -2011-04-10 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkclass.cpp, - lib/checkmemoryleak.cpp, lib/checkother.cpp, lib/preprocessor.cpp, - lib/settings.cpp, lib/settings.h, test/testbufferoverrun.cpp, - test/testclass.cpp, test/testmemleak.cpp, test/testother.cpp: - Renamed Settings::stupid to Settings::experimental - -2011-04-10 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkclass.cpp, - lib/checkmemoryleak.cpp, lib/checkother.cpp, lib/preprocessor.cpp, - lib/settings.cpp, lib/settings.h, test/testbufferoverrun.cpp, - test/testclass.cpp, test/testmemleak.cpp, test/testother.cpp: Added - Settings::stupid flag that can be used to hide checking that - generates false positives. - -2011-04-10 Daniel Marjamäki - - * cli/cmdlineparser.cpp, lib/settings.h: --inconclusive : Added - command line flag that enable inconclusive checking. It is added for - experimental purposes. - -2011-04-10 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Code cleanup. Use %oror% to simplify - code. - -2011-04-10 Daniel Marjamäki - - * lib/checkother.cpp: CheckOther: Code cleanup. Use %oror% - -2011-04-10 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Use %oror% in multiCompare - pattern - -2011-04-10 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Use %oror% in multiCompare - pattern - -2011-04-10 Daniel Marjamäki - - * lib/checkother.cpp: CheckOther: Use %op% in CheckUnsignedDivision - -2011-04-10 Daniel Marjamäki - - * lib/checkuninitvar.cpp: CheckUninitVar: Use %op% - -2011-04-10 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Use %op% in simplifyOperatorName - -2011-04-10 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Use %op% in simplifyCalculations - -2011-04-10 Daniel Marjamäki - - * test/testtoken.cpp: Token: Added testcase for matching of %op% - -2011-04-10 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Use %op% to clean up pattern - -2011-04-10 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Code cleanup. Removed redundant - variable - -2011-04-10 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Fixed bug in last commit - -2011-04-10 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Use the %oror% in multiCompare - patterns - -2011-04-10 Daniel Marjamäki - - * lib/token.cpp, test/testtoken.cpp: Token::Match : Allow that - %oror% and %or% is used in multiCompare patterns - -2011-04-09 Robert Reif - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: partial - fix for #2700 (common logic or cut and paste errors) - -2011-04-09 Robert Reif - - * lib/checkother.cpp, test/testother.cpp: fix bug in previous - commit: fix #311 (add detection of duplicated if else-cases) - -2011-04-09 Robert Reif - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: fix #311 - (add detection of duplicated if else-cases) - -2011-04-09 Robert Reif - - * lib/checkclass.cpp, lib/token.h: Refactoring: add - Token::isAssignmentOp and use it in CheckClass::checkConstFunc - -2011-04-09 Daniel Marjamäki - - * lib/checkother.cpp: Refactoring: Use Token::isArithmeticalOp - instead of hardcoded conditions - -2011-04-09 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Refactoring: Use %op% instead of - Token::isOp - -2011-04-09 Daniel Marjamäki - - * lib/checknullpointer.cpp: Refactoring: Use %op% - -2011-04-09 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Refactoring: Use %op% instead of - Token::isOp in CheckBufferOverrun - -2011-04-09 Daniel Marjamäki - - * lib/tokenize.cpp: Refactoring: Use %op% - -2011-04-09 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Refactoring: Use - %op% - -2011-04-09 Daniel Marjamäki - - * lib/tokenize.cpp: Refactoring: Use %op% - -2011-04-09 Daniel Marjamäki - - * lib/token.cpp, lib/tokenize.cpp, test/testtoken.cpp: - Token::multiCompare : allow that %op% is used in multiCompare - pattern - -2011-04-09 Daniel Marjamäki - - * lib/token.h, lib/tokenize.cpp: Refactoring: Use Token::isOp - -2011-04-09 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkmemoryleak.cpp, lib/token.h, - lib/tokenize.cpp, test/testsimplifytokens.cpp: Refactoring: Use - Token::isOp - -2011-04-09 Daniel Marjamäki - - * Makefile: Makefile: Set debug mode - -2011-04-09 Daniel Marjamäki - - * Makefile: Release: Updated Makefile for release - -2011-04-09 Daniel Marjamäki - - * Changelog: Release: Updated the Changelog - -2011-04-09 Daniel Marjamäki - - * test/testfilelister.cpp: TestFileLister: astyle formatting and - removed commented debug code - -2011-04-09 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, lib/cppcheck.cpp, - man/manual.docbook, win_installer/productInfo.wxi: Release: Updated - versions to 1.48 - -2011-04-09 Daniel Marjamäki - - * lib/token.h: Fixed cppcheck warnings: Removed extra 'Token::' from - statement - -2011-04-08 Daniel Marjamäki - - * lib/checkother.cpp, lib/token.h, lib/tokenize.cpp: Refactoring: - there was almost duplicate functions 'isOp'. Created a new - Token::isOp function instead. - -2011-04-08 Robert Reif - - * test/testclass.cpp: added tests for #2710 (False negative on - uninitialized member variable in a ctor.) - -2011-04-07 Daniel Marjamaki - - * test/testfilelister.cpp: Fixed TestFileLister tests in windows - -2011-04-07 Daniel Marjamäki - - * Makefile, test/CMakeLists.txt, test/test.pro, - test/testfilelister.cpp, test/testfilelister_unix.cpp: Fixed #2684 - (TestFileLister test assumes there are source files in the same - directory) - -2011-04-07 Markus Elfring - - * : commit fbc8223a6b32935e2001d688756600829baaec10 Author: Daniel - Marjamaki Date: Thu Apr 7 16:53:42 2011 +0200 - -2011-04-07 Kimmo Varis - - * gui/main.cpp: GUI: Print command line help with -h and --help. - -2011-04-07 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Allow giving project - file to command line. GUI now recognizes -p command line parameter. When - given (with path to valid project file) GUI automatically loads the - project file and starts checking paths in it. Ticket: #2613 (GUI: Should accept project file from command line) - -2011-04-07 Kimmo Varis - - * test/test.vcproj: Fix test VS2008 project file attributes. - -2011-04-07 Stefan Weil - - * lib/checkobsoletefunctions.h, test/testobsoletefunctions.cpp: - Obsolete functions: Fix messages for gethostbyaddr, gethostbyname - -2011-04-06 Daniel Marjamäki - - * lib/preprocessor.cpp: fixed gcc compiler warning - -2011-04-06 Daniel Marjamäki - - * : commit 1907590303a7e67c73c94bf092d7f19c12ec3dfc Author: Kimmo - Varis Date: Wed Apr 6 21:34:11 2011 +0300 - -2011-04-06 Daniel Marjamaki - - * lib/preprocessor.cpp: Preprocessor: Use Settings::debugwarnings - instead of NDEBUG to determine if 'missing system include' should be - reported or not - -2011-04-06 Markus Elfring - - * gui/CMakeLists.txt: Addition of Spanish translation in the GUI - CMake script A file name was added to the GUI CMake script for the Spanish - translation. Signed-off-by: Markus Elfring - -2011-04-06 Markus Elfring - - * cli/CMakeLists.txt: Conditional inclusion of TinyXML source files - in the CLI CMake script (bug #2679, #2524) The source files for the class library "TinyXML" will only be - included into the build of the command line interface if the library - "PCRE" was found before. Signed-off-by: Markus Elfring - -2011-04-06 Kimmo Varis - - * gui/gui.pro: GUI: Sort language files in project file. - -2011-04-06 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_es.ts, - gui/cppcheck_fi.ts, gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_sr.ts, gui/cppcheck_sv.ts: GUI: Update translation - files. Adding new Spanish translation added one new translatable string and - changed linenumbers in one file. - -2011-04-06 Lauri Nurmi - - * gui/gui.pro, gui/translationhandler.cpp: GUI: Add Spanish - translation. Patch to add loading Spanish translation to GUI. Ticket #2545 (cppcheck translated in spanish language) - -2011-04-06 Kimmo Varis - - * gui/cppcheck_es.ts: GUI: Add Spanish translation. Add Spanish GUI translation contributed by - qcondor@users.sourceforge.net. Ticket #2545 (cppcheck translated in spanish language) - -2011-04-06 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, gui/cppcheck_nl.ts, - gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, gui/cppcheck_sr.ts: GUI: - update translation files. - -2011-04-05 Daniel Marjamaki - - * gui/cppcheck_sv.ts: gui: removed obsolete strings in the swedish - translation - -2011-04-05 Daniel Marjamaki - - * gui/cppcheck_sv.ts: gui: updated swedish translations - -2011-04-04 Robert Reif - - * test/testmemleak.cpp: run astyle - -2011-04-04 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #2706 (Analysis - failed. If the code is valid then please report this failure.) - -2011-04-04 Ettl Martin - - * test/testmemleak.cpp: Added todo testcase for ticket #2705 - -2011-04-04 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Improve the error message for language - loading error. - -2011-04-04 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: clarify calculation: fixed - false negative for 'int x = a - b ? 2 : 3' - -2011-04-04 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Buffer overrun: broke out duplicate - code - -2011-04-04 Kimmo Varis - - * gui/gui.pro: GUI: Project file cleanup. - -2011-04-04 Kimmo Varis - - * gui/applicationlist.cpp: GUI: Don't show error when no application - added. I earlier added a check for missing (editor) application command - line parameters. If parameters are missing at GUI startup an message - is shown to user to check the settings. Unfortunately my check was - incomplete and it also triggered when there was no applications - defined. Which happens when user starts GUI for a first time. Fix the check so that user is only informed in case the parameters - are missing and name + path are set. - -2011-04-04 Kimmo Varis - - * gui/application.ui, gui/applicationdialog.cpp: GUI: Improve the - Application dialog layoyt. In GNOME the whole big text area was not shown without making the - dialog bigger. So improve the layout for better scaling and adjust - dialog size when it gets initialized. - -2011-04-04 Kimmo Varis - - * gui/applicationdialog.cpp: GUI: Fix setting application path as - name. The application dialog initialized name field with path. - -2011-04-03 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Clarify - calculation: Added warnings for << and >> - -2011-04-03 Daniel Marjamäki - - * lib/checknullpointer.cpp: Null pointer: cleanup the code. Ticket: - #2642 - -2011-04-03 Martin Exner - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2696 - (False positive nullpointer) - -2011-04-02 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: execute the - simplifyIfNot and simplifyIfNotNull in the normal token list. ticket - #2642 - -2011-04-02 Kimmo Varis - - * gui/gui.pro: GUI: Fix gui.pro EOL style. - -2011-04-02 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: clarify precedence: made - the short message shorter - -2011-04-02 Kimmo Varis - - * gui/CMakeLists.txt: GUI: Add new files to CMake build file. - -2011-04-02 Kimmo Varis - - * gui/applicationdialog.cpp, gui/applicationdialog.h, - gui/settingsdialog.cpp: GUI: Modify ApplicationDialog to get/return - Application class. - -2011-04-02 Kimmo Varis - - * gui/application.h, gui/applicationlist.cpp, - gui/applicationlist.h, gui/resultstree.cpp, gui/settingsdialog.cpp: - GUI: Refactoring application definition. Using Application class as method parameters instead of separate - application attributes. - -2011-04-02 Kimmo Varis - - * gui/application.cpp, gui/application.h, gui/applicationlist.cpp, - gui/gui.pro: GUI: Improving application handling code. Only allow access to Application's attributes through accessor - methods. - -2011-04-02 Kimmo Varis - - * gui/application.h, gui/applicationlist.cpp, - gui/applicationlist.h, gui/gui.pro: GUI: Move application definition - to own header file. - -2011-04-02 Daniel Marjamäki - - * CMakeLists.txt: cmake: reduced message a little - -2011-04-02 Daniel Marjamäki - - * : Merge commit 'elfring/2679d' - -2011-04-02 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: - Tokenizer::simplifyCalculations: simplify division result if it's a - whole number, even though it doesn't have precedence - -2011-04-02 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Clarify - precedence 'a*b?c:d' : warn for addition, subtraction and division - also. tried to clarify the message more - -2011-04-02 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, gui/cppcheck_nl.ts, - gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, gui/cppcheck_sr.ts, - gui/cppcheck_sv.ts: GUI: Update translation files. - -2011-04-02 Kimmo Varis - - * gui/applicationdialog.cpp, gui/resultstree.cpp: GUI: Simplify - handling applications with spaces in paths. Earlier user had to add quotation marks around application - executable path in application dialog. Because we could not - determine which part is path and which part is parameters. As we now - have separate variables we can automatically add the quotation marks - when needed before starting the application. This reduces the - confusion users have had about the correct formatting of paths. - -2011-04-02 Kimmo Varis - - * gui/application.ui: GUI: Update/fix application dialog texts. I forgot to update the dialog texts when adding the parameters - field. - -2011-04-02 Kimmo Varis - - * gui/application.ui: GUI: Add accel keys for application dialog and - fix tab order. - -2011-04-02 Kimmo Varis - - * gui/application.ui, gui/applicationdialog.cpp, - gui/applicationdialog.h, gui/applicationlist.cpp, - gui/applicationlist.h, gui/common.h, gui/mainwindow.cpp, - gui/resultstree.cpp, gui/settingsdialog.cpp: GUI: Have separate - setting for editor app path and params. Currently combined editor application path + params is a bit - problematic (at least in Windows). We really don't know where the - app path ends and parameters start. So proper quoting is not always - possible. And application path and command line parameters are clearly - different settings anyway. So make them separate settings. It has - bunch of other positive sides too. Like one can now browse new path - for the application without loosing the parameters. When starting Cppcheck version with these new settings user is - warned that loading settings had problems and asked to check and fix - the settings. - -2011-04-02 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: better - simplification of calculations in conditions - -2011-03-31 Robert Reif - - * lib/symboldatabase.cpp: symbol database: add support for anonymous - struct and union - -2011-03-31 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: change - CheckClass::operatorEqToSelf to make better use of the symbol - database - -2011-03-31 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: fix - CheckClass::operatorEq to check return type more closely (to match - check description) - -2011-03-31 Daniel Marjamäki - - * lib/preprocessor.h, lib/settings.h: fixed doxygen warnings about - undocumented function parameters - -2011-03-30 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: symbol database: - improve function argument count and default argument count - -2011-03-30 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: symbol database: get - function argument count using argument list size rather than - counting commas - -2011-03-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testincompletestatement.cpp: Fixed #2655 - (false positive: (warning) Redundant code: Found a statement that - begins with numeric constant) - -2011-03-30 Lieven de Cock - - * lib/path.cpp: Improve/cleanup Path::removeQuotationMarks(). - -2011-03-30 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2693 (__declspec - attribute not removed properly) - -2011-03-30 Stefan Weil - - * lib/checkbufferoverrun.cpp, lib/checknullpointer.cpp, - lib/checkstl.cpp, lib/preprocessor.cpp, lib/preprocessor.h, - lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Spell checks - -2011-03-30 Stefan Weil - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Spell - checks - -2011-03-29 Robert Reif - - * lib/symboldatabase.cpp: symbol database: handle default values for - function arguments properly - -2011-03-29 Robert Reif - - * lib/symboldatabase.cpp: add support for array of unnamed struct - and union to symbol database - -2011-03-29 Kimmo Varis - - * cli/cmdlineparser.cpp: CLI: Simplify ignore paths. Fixes #2656 (-i Give path to ignore does not ignore if start of the - path is different than checked path) Simplify paths given as -i options. This makes it easier to match - the paths as simplifying removes redundant parts. - -2011-03-29 Kimmo Varis - - * lib/path.cpp, test/testpath.cpp: Remove './' at begin of path in - Path::simplifyPath. The './' is not needed at begin of path for files we check. And it - only makes paths longer. This also makes it easier to match paths. - -2011-03-29 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2695 - (False positive: null pointer dereference and ternary operator (?:)) - -2011-03-29 Robert Reif - - * lib/symboldatabase.cpp: more support for anonymous struct to - symbol database - -2011-03-29 Robert Reif - - * lib/symboldatabase.cpp: add support for anonymous struct to symbol - database - -2011-03-28 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #2692 (False - positive: if parsed as function in operator >>) - -2011-03-28 Robert Reif - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: add support - for checking struct/class member container in CheckStl::size() - -2011-03-28 Kimmo Varis - - * cli/cmdlineparser.cpp: CLI: Remove quotation marks from user-given - paths. Ticket #2686 (regression/bug in path handling) There are situations that paths given to command line can contain - quotation marks. In normal situations shell removes them. For these - cases they don't get removed add code to check paths from quotation - marks and remove them. - -2011-03-28 Kimmo Varis - - * lib/path.cpp, lib/path.h, test/testpath.cpp: Add - Path::removeQuotationMarks() to clean path. - -2011-03-28 Daniel Marjamäki - - * test/testnullpointer.cpp: Null pointer: Added TODO test case for - ticket #2681 - -2011-03-28 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointer: - prefer longer error message that says 'otherwise condition at line X - is redundant' - -2011-03-28 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointer: - prefer longer error message that says 'otherwise condition at line X - is redundant' - -2011-03-28 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2691 - (False positive: struct dereference and check (switch-break)) - -2011-03-28 Markus Elfring - - * gui/CMakeLists.txt: Deletion of "htmlhelp" from link setting in a - CMake script (bug #2524, #1957) The library "htmlhelp" is not needed by the graphical user interface - at the moment. - - https://github.com/danmar/cppcheck/commit/2fea5f01d6b8af92a4739eb6bef29fd7044c27c3#gui/gui.proThere are difficulties to fulfil this dependency. Signed-off-by: Markus Elfring - -2011-03-27 Robert Reif - - * lib/symboldatabase.cpp, test/testconstructors.cpp: skip nested - anonymous unions when searching for variables in symbol database - -2011-03-27 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2689 - (False positive: Possible null pointer dereference) - -2011-03-27 Robert Reif - - * lib/checkclass.cpp: output a debug message when a member variable - is used that has a varid of 0 - -2011-03-27 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: make member variable - change detection simpler and more accurate for - CheckClass::checkConst - -2011-03-27 Robert Reif - - * lib/symboldatabase.cpp: add anonymous union support to the symbol - database - -2011-03-27 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2674 - (False positive: possible null pointer dereference (check if pointer - is null in one function, dereference it in another function)) - -2011-03-27 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2660 (False - positive: Variable 'v' is assigned a value that is never used) - -2011-03-26 Markus Elfring - - * : Synchronisation of CMake build files with master branch (bug - #2524) * 2524d: Renaming of the file for the Swedish translation in a CMake script - (bug #2524) Renaming of the GUI executable to "cppcheck-gui" in a - CMake script (bug #2524) Addition of a file name in a CMake script - (bug #2524, #1690) - -2011-03-26 Markus Elfring - - * gui/CMakeLists.txt: Renaming of the GUI executable to - "cppcheck-gui" in a CMake script (bug #2524) The executable file for the graphical user interface was renamed in - a CMake script to synchronise this setting with the qmake build - specification. - - https://github.com/danmar/cppcheck/commit/b88ce77e4ac85d1b32981c63cb5c538e9740b6e9#gui/gui.proSigned-off-by: Markus Elfring - -2011-03-26 Markus Elfring - - * test/CMakeLists.txt: Addition of a file name in a CMake script - (bug #2524, #1690) A few source files were added because of the feature request - "Ability to exclude files and directories from checks". - - https://github.com/danmar/cppcheck/commit/6401271ceb85ff93a697b2c09fb4765a560fb7a3A CMake build script was updated for these changes. Signed-off-by: Markus Elfring - -2011-03-26 Daniel Marjamäki - - * createrelease: createrelease: generate manual.html. ticket: #2687 - -2011-03-26 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Update online-help to open the HTML - manual. - -2011-03-26 Daniel Marjamaki - - * cli/CMakeLists.txt, gui/CMakeLists.txt, test/CMakeLists.txt: - cmake: removed the non-working pcre. ticket: #2679 - -2011-03-26 Kimmo Varis - - * cli/cppcheckexecutor.cpp: Ticket #2688 (Missing include path - shouldn't exit the program) Non-existing include path is not a fatal problem requiring exiting - the program. Instead we just print a warning and remove the non- - existing include path from the list. - -2011-03-26 Kimmo Varis - - * gui/CMakeLists.txt: GUI: Remove help viewer files from CMake - build. - -2011-03-26 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: don't install local help - file. - -2011-03-26 Kimmo Varis - - * gui/gui.pro, gui/helpwindow.cpp, gui/helpwindow.h, - gui/helpwindow.ui, gui/mainwindow.cpp, gui/mainwindow.h: GUI: Open - online-help instead of local help. Local help does not currently work (ticket #2316) and building it is - a bit painful in Windows. Hence it was decided on ticket #2677 and - at IRC that we open on-line help from GUI until the local help issue - is solved. - -2011-03-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2653 (segmentation - fault of cppcheck 'x=b=0;') - -2011-03-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer::setVarId: - Prevent that wrong varid is given when uncertain. Ticket: #2680 - -2011-03-26 Daniel Marjamäki - - * lib/CMakeLists.txt: CMake: There is no need for PCRE when building - the lib - -2011-03-26 Daniel Marjamäki - - * CMake/xmlto.cmake: Removed the CMake/xmlto.cmake file - -2011-03-26 Daniel Marjamäki - - * CMakeLists.txt, cmake/modules/FindXmlTo.cmake, man/CMakeLists.txt: - Fixed #2677 (XmlTo is now required for building?) - -2011-03-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2680 (setVarId: - variables with class qualification don't get varid) - -2011-03-25 Robert Reif - - * lib/checkclass.cpp: only break when we know we are inc/dec a - member variable in CheckClass::checkConstFunc - -2011-03-25 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: better checking of - assignment to array element in CheckClass::checkConstFunc - -2011-03-25 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: add support to - CheckClass::checkConstFunc for ++/-- array elements - -2011-03-25 Robert Reif - - * lib/checkclass.cpp: move 2 CheckClass helper functions to follow - externally called functions so code matches comments - -2011-03-26 Sebastien Debrard - - * cli/CMakeLists.txt, gui/CMakeLists.txt, test/CMakeLists.txt: sync - cmake files with the master branch - -2011-03-25 Daniel Marjamäki - - * man/CMakeLists.txt: CMake: Skip xmlto dependency. Ticket: #2677 - -2011-03-25 Robert Reif - - * test/testclass.cpp: add some missing ; at end of class and struct - definitions in checkclass tests - -2011-03-25 Daniel Marjamäki - - * cli/cli.pro, cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - test/test.pro, test/test.vcproj, test/test.vcxproj, - test/testcppcheck.cpp, tools/dmake.cpp: Reverted non-CMake changes - in previous 'Added CMake files' commit - -2011-03-25 Markus Elfring - - * CMake/xmlto.cmake, CMakeLists.txt, cli/CMakeLists.txt, - cli/cli.pro, cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cmake/modules/FindPCRE.cmake, cmake/modules/FindXmlTo.cmake, - gui/CMakeLists.txt, lib/CMakeLists.txt, lib/library_sources.cmake, - man/CMakeLists.txt, test/CMakeLists.txt, test/test.pro, - test/test.vcproj, test/test.vcxproj, test/testcppcheck.cpp, - tools/dmake.cpp: Added CMake files - -2011-03-24 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: add support for global - namespace to Tokenizer::simplifyVarDecl() - -2011-03-24 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2675 (false - positive: syntax error) - -2011-03-24 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: symbol database: add - a link from a Function to its Function Scope namd make function - parameters belong to Function Scope - -2011-03-24 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2673 (false - positive: memory leak (address stored in list)) - -2011-03-23 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #1288 (Use of memset - on struct - nested structs not handled) - -2011-03-23 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix - Tokenizer::simplifyVarDecl() template assignment - -2011-03-23 Robert Reif - - * lib/tokenize.cpp, test/testclass.cpp, test/testnullpointer.cpp: - better fix for #2672 (False positive: function can be const, nested - classes declared in one line) - -2011-03-24 Sebastien Debrard - - * : commit 5f36ede4f5e7f8abc2dafa248a283e92feeed288 Author: Daniel - Marjamäki Date: Wed Mar 23 18:45:47 2011 - +0100 - -2011-03-23 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #2672 (False - positive: function can be const, nested classes declared in one - line) - -2011-03-22 Robert Reif - - * test/testclass.cpp: add some more CheckClass::noMemset tests - -2011-03-22 Robert Reif - - * lib/checkclass.cpp: fix pointer/reference check in - CheckClass::noMemset symbol database conversion - -2011-03-22 Robert Reif - - * lib/checkclass.cpp: convert remainder of CheckClass::noMemset to - use symbol database - -2011-03-22 Robert Reif - - * : commit 468a983db1356576214d854d8930dc9521fdc685 Author: Robert - Reif Date: Tue Mar 22 21:24:28 2011 -0400 - -2011-03-23 Sebastien Debrard - - * tools/Makefile: fix compilation error - -2011-03-23 Sebastien Debrard - - * tools/Makefile: fix compile error - -2011-03-23 Sebastien Debrard - - * : commit d36ed9aff15e267f3f94f3e37432e0eb6380809a Author: Robert - Reif Date: Tue Mar 22 19:23:36 2011 -0400 - -2011-03-22 Robert Reif - - * lib/checkmemoryleak.cpp, lib/cppcheck.cpp: run astyle - -2011-03-22 Ettl Martin - - * lib/cppcheck.cpp, test/testfilelister_unix.cpp: fixed performance - issues, found by selfcheck with cppcheck. - -2011-03-22 Ettl Martin - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: extended - checkmemoryleak-whitelist - -2011-03-22 Zachary Blair - - * lib/token.cpp: Fixed #2665 (Slightly sped-up how Token::Match() - parses patterns) - -2011-03-21 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix - -2011-03-21 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix invalid bitfield - match and simplification that created invalid code - -2011-03-21 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: add virtual base - class support to symbol database - -2011-03-21 Robert Reif - - * cli/filelister.cpp, lib/checkmemoryleak.cpp, test/testmemleak.cpp: - run astyle - -2011-03-21 Ettl Martin - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: extended - checkmemoryleak white list - -2011-03-21 Ettl Martin - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: #2667 added open(), - _open() and _wopen() function to checkmemoryleak whitelist, incl. - unittests; - -2011-03-21 Ettl Martin - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: #2667 added perror - to checkmemoryleak white list; added unit-tests. - -2011-03-21 Ettl Martin - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: #2668 fixed memory - leak ( freopen() ) - -2011-03-21 Ettl Martin - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: #2659 added - chown,chmod and chdir functions to checkmemoryleak white list; added - unittests for each case; - -2011-03-20 Ettl Martin - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: #2659 added - access()-function to checkmemoryleak white-list and provided - untittests. - -2011-03-20 Ettl Martin - - * test/testmemleak.cpp: #2667 removed wrong unittests; - -2011-03-20 Ettl Martin - - * test/testmemleak.cpp: #2667 created unit-tests - -2011-03-20 Ettl Martin - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: #2659 added stat - function to white list and provide unit tests. - -2011-03-20 Ettl Martin - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: fixed ticket 2659: - added lstat function to white list; provided unit-tests. - -2011-03-20 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #2663 (False negative: - function can be const (changing unknown or uninitialised variable)) - -2011-03-20 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h, test/testclass.cpp: - fix #2664 (False negative: function can be const (using type from - another namespace)) - -2011-03-20 Kimmo Varis - - * win_installer/cppcheck.wxs, win_installer/productInfo.wxi: - Installer: Fix file modes of two installer files. The files had executable file mode set but they don't need it as - they are normal data files read by the Wix tool. - -2011-03-20 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: Remove old Swedish - translation file. - -2011-03-20 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: Update Swedish GUI - translation filename - -2011-03-20 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, gui/cppcheck_nl.ts, - gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, gui/cppcheck_sr.ts, - gui/cppcheck_sv.ts: GUI: Update translation files. - -2011-03-20 Kimmo Varis - - * gui/cppcheck_se.ts, gui/cppcheck_sv.ts, gui/gui.pro, - gui/translationhandler.cpp: GUI: Rename Swedish translation file. Ln pointed out in IRC that 'se' is not ISO-639 name of the Swedish, - but 'sv' is. So rename the translation file to use the correct - ISO-639 name. This wrong name also probably caused the GUI not - recognizing Swedish locale of the OS. - -2011-03-20 Daniel Marjamäki - - * cli/filelister.cpp: FileLister: Fixed compile error with Qt - Creator + MinGW - -2011-03-20 Daniel Marjamäki - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cli/cppcheck.vcxproj.filters, test/test.vcproj, test/test.vcxproj, - test/test.vcxproj.filters: FileLister: Updated Visual Studio files - -2011-03-20 Daniel Marjamäki - - * cli/cli.pro, test/test.pro: FileLister: updated qmake files - -2011-03-20 Daniel Marjamäki - - * Makefile, cli/cppcheckexecutor.cpp, cli/filelister.cpp, - cli/filelister.h, cli/filelister_unix.cpp, cli/filelister_unix.h, - cli/filelister_win32.cpp, cli/filelister_win32.h, - test/testfilelister_unix.cpp, tools/dmake.cpp: FileLister: Moved - back the code into a single cpp file - -2011-03-20 Sebastien Debrard - - * : commit 27506b423195b4cc51664884922e34b24011ccd2 Author: Daniel - Marjamäki Date: Sun Mar 20 09:55:26 2011 - +0100 - -2011-03-20 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2662 - (Segfault: overloaded function call function with same name) - -2011-03-19 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #1280 (Pointer to - function support) - -2011-03-19 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #1987 (Internal - error:: CheckClass::SpaceInfo::getVarList found variable - 'element_size' with varid 0.) - -2011-03-19 Sebastien Debrard - - * : commit 2dcd0128b018733798eb4c15dbbd2e6f22bf777d Author: Daniel - Marjamäki Date: Sat Mar 19 14:05:22 2011 - +0100 - -2011-03-19 Sebastien Debrard - - * : commit 31af3a64bce89482ca9acd9c6044d4543faf3bd6 Author: Daniel - Marjamäki Date: Sat Mar 19 11:09:51 2011 - +0100 - -2011-03-19 Daniel Marjamäki - - * test/testmemleak.cpp: Refactoring: Renamed showAll flag to - inconclusive - -2011-03-19 Daniel Marjamäki - - * lib/tokenize.cpp, test/testmemleak.cpp, test/testtokenize.cpp: - Tokenizer::setVarId: Better handling of class declarations when - variable usage comes before variable declaration - -2011-03-18 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: #2630 (segmentation fault - of cppcheck (template ) - -2011-03-17 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: fix #2657 - (segmentation fault of cppcheck ( gcc-testsuite: return f(){} )) - -2011-03-17 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2651 - (Segmentation fault (typedef)) - -2011-03-17 Reijo Tomperi - - * cppcheck.cbp: Update codeblocks project file to contain new files - -2011-03-17 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2648 - (Tokenizer::simplifyTemplates: Segmentation fault (gcc-testsuite)) - -2011-03-17 Sebastien Debrard - - * : commit 7e04ea0859215355ebbaa950aaa449c3b9822358 Author: Robert - Reif Date: Wed Mar 16 19:54:52 2011 -0400 - -2011-03-16 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: - Tokenizer::simplifyTemplates: First simple fix for problems when - using sizeof in template parameter - -2011-03-15 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2581 (### - Internal error in Cppcheck. Please report it.) - -2011-03-15 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: fix #2637 - (segmentation fault of cppcheck ( {} const const )) - -2011-03-15 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2651 function - typedef with extra ()s - -2011-03-15 Sebastien Debrard - - * : commit fa868e44ae2827f2efb2b5d3c2d5e7462295545e Author: Greg - Hewgill Date: Tue Mar 15 20:19:30 2011 +1300 - -2011-03-14 Sebastien Debrard - - * : commit e1afd5eb0939ce1b7d6433699e9f89faf8fd75fc Author: Daniel - Marjamäki Date: Mon Mar 14 19:35:22 2011 - +0100 - -2011-03-14 Daniel Marjamäki - - * webreport.sh: webreport: refactoring - -2011-03-14 Daniel Marjamäki - - * generate_coverage_report: LCOV: updated the - generate_coverage_report to avoid some redundant compiler warnings - -2011-03-14 Daniel Marjamäki - - * htdocs/index.php: htdocs: minor update of index.php - -2011-03-13 Robert Reif - - * lib/symboldatabase.cpp: look for function prototypes but don't - save them in the symbol database yet - -2011-03-13 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: save pointer to - Function info in function scope in symboldatabase - -2011-03-13 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: save location of - using directive (not used yet) - -2011-03-13 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/tokenize.cpp, - test/testbufferoverrun.cpp, test/testtokenize.cpp: Fixed #2638 - (Tokenizer::setVarId : varid is wrongly given when unknown macro is - used) - -2011-03-13 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h: Clarify condition: - re-enabled check - -2011-03-13 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2621 - (Segmentation fault for GCC statement expression) - -2011-03-13 Daniel Marjamäki - - * lib/checkstl.cpp: Refactoring: Use SymbolDatabase to determine if - variable is a iterator - -2011-03-13 Daniel Marjamäki - - * lib/checkstl.cpp: Refactoring: Use symbol database to get variable - type - -2011-03-13 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #2639 (False - positive: confusion between struct and function) - -2011-03-12 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Convert - CheckClass::noMemset to use the symbol database to lookup types. - This adds better support for namespaces and nested classes. - -2011-03-12 Robert Reif - - * lib/symboldatabase.cpp: save start parentheses of global functions - -2011-03-12 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2647 - (False positive: Possible null pointer dereference (member function - call)) - -2011-03-12 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #2643 (False positive: - iterator increment and insert) - -2011-03-12 Robert Reif - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: fix another - false negative introduced by fix for #2641 - -2011-03-12 Robert Reif - - * lib/checknullpointer.cpp, lib/symboldatabase.h, - test/testnullpointer.cpp: fix false negative introduced by fix for - #2641 - -2011-03-12 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2641 - (False positive: Possible null pointer dereference (global pointer, - function call)) - -2011-03-12 Daniel Marjamäki - - * : commit 2716b856f410a4235eea775f03b23de1dbe85310 Author: Greg - Hewgill Date: Sat Mar 12 07:27:31 2011 +1300 - -2011-03-10 Robert Reif - - * lib/checkautovariables.cpp, lib/checkclass.cpp, - lib/checkmemoryleak.cpp, lib/checkother.cpp, - lib/symboldatabase.cpp, lib/symboldatabase.h, lib/tokenize.cpp, - test/testsymboldatabase.cpp: refactor symbol database and checks to - use list of Scope rather than list of Scope pointers - -2011-03-10 Greg Hewgill - - * lib/settings.cpp, man/cppcheck.1.xml, man/manual.docbook, - test/testsuppressions.cpp: Allow suppressing all warnings (using *) - for specified file or files - -2011-03-10 Greg Hewgill - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Revert - "Check for memset on nested structs (ticket #1288)" Turns out this - fix is incomplete. This reverts commit a084697410bac0e08324236e78185a0c1a8a92ff. - -2011-03-09 Daniel Marjamäki - - * lib/checkother.h: suspicious condition: commented out the check - temporarily - there are some false positives I'll need to fix - -2011-03-09 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: - Suspicious condition: Added new check for conditions that contains - assignment+comparison - -2011-03-09 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2632 (segmentation - fault of cppcheck ( void>(); void>() )) - -2011-03-09 Sébastien Debrard - - * : commit bea387538631337021d219ce70dc843858460898 Author: Daniel - Marjamäki Date: Wed Mar 9 21:00:28 2011 - +0100 - -2011-03-09 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2635 (False - positive: resource leak) - -2011-03-09 Greg Hewgill - - * : commit a084697410bac0e08324236e78185a0c1a8a92ff Author: Greg - Hewgill Date: Wed Mar 9 22:49:13 2011 +1300 - -2011-03-09 Greg Hewgill - - * lib/checkclass.cpp, test/testclass.cpp: Check for memset on - objects with virtual functions (ticket #607) - -2011-03-09 Greg Hewgill - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: refactor - noMemset so it recursively checks parent classes for - non-memset-compatible things - -2011-03-08 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2630 - (segmentation fault of cppcheck ( typedef ... ) - -2011-03-08 Robert Reif - - * lib/symboldatabase.cpp: fix null pointer dereference found by - clang++ --analyze - -2011-03-08 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2620 - (Tokenizer::setVarId : wrong handling of member function parameters) - -2011-03-08 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2634 (False positive: buffer access out of bounds) - -2011-03-08 Kimmo Varis - - * gui/about.ui: GUI: Update About-dialog copyright year to 2011. - -2011-03-07 Robert Reif - - * lib/token.cpp, lib/token.h, lib/tokenize.cpp: copy all flag fields - in a Token - -2011-03-07 Robert Reif - - * lib/checkstl.cpp, test/teststl.cpp: convert CheckStl::size() to - use symbol database, fix false positives, and remove inconclusive - -2011-03-07 Kimmo Varis - - * : commit d8ced1dbb1e2fa78cbd17c78c468a65b6338581d Author: Kimmo - Varis Date: Mon Mar 7 23:43:59 2011 +0200 - -2011-03-07 Kimmo Varis - - * gui/resultstree.cpp, gui/resultstree.h: GUI: Add back translation - of severity texts. Translation of severity texts was temporarily disabled by earlier - commits. Now adding new method to ResultsTree for getting translated - severity string. - -2011-03-07 Kimmo Varis - - * gui/resultstree.cpp, gui/resultstree.h: GUI: Update more severity - conversion methods. - -2011-03-07 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: made sure string::iterator is - valid after string::erase - -2011-03-07 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Incorrect string compare: - reduce noise when using strncmp on string literal - -2011-03-07 Kimmo Varis - - * gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.cpp: GUI: - Make Severity to ShowType use enum values. Continue converting Severity use in GUI from QString to enum values. - -2011-03-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2631 - (Tokenizer::simplifyTemplates: template usage 'std::cout << - (foo(r));') - -2011-03-07 Kimmo Varis - - * gui/erroritem.cpp, gui/erroritem.h, gui/resultstree.cpp: GUI: - Convert severity in ErrorLine to enum value. This commit continues converting severity in GUI to enum. - -2011-03-07 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2633 (False - positive: Memory leak for tree node) - -2011-03-07 Kimmo Varis - - * gui/csvreport.cpp, gui/erroritem.cpp, gui/erroritem.h, - gui/resultstree.cpp, gui/resultsview.cpp, gui/threadresult.cpp, - gui/txtreport.cpp, gui/xmlreportv1.cpp, gui/xmlreportv2.cpp: GUI: - Use severity enum in ErrorItem. Convert from using string to enum values for severity in ErrorItem. - Storing and handling severity as string was the easy way earlier but - it is not convenient or efficient way to handle severities. This - commit is the first step in converting severity handling to use the - enum values instead of strings. - -2011-03-06 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2630 - (segmentation fault of cppcheck ( typedef y x () x )) - -2011-03-06 Daniel Marjamäki - - * lib/checknullpointer.cpp: Refactoring of the - CheckNullPointer::isPointer. Use the symbol database. Ticket: #2629 - -2011-03-06 Daniel Marjamäki - - * lib/symboldatabase.cpp, lib/symboldatabase.h: Symbol database: - variable fix. ticket: #2629 - -2011-03-06 Daniel Marjamäki - - * lib/preprocessor.cpp: astyle formatting - -2011-03-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: - Tokenizer::simplifyTemplates: better handling of '(foo())'. - Ticket: #2631 - -2011-03-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Revert - "Tokenizer::simplifyTemplates: better handling of '(foo())'. - Ticket: #2631" This reverts commit de31ec1e4441eab3c065d3208f0be01bbf2c2bcf. - -2011-03-07 Greg Hewgill - - * lib/preprocessor.cpp: Always pass unsigned char to ::isspace to - prevent runtime error in MSVC - -2011-03-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: - Tokenizer::simplifyTemplates: better handling of '(foo())'. - Ticket: #2631 - -2011-03-06 Daniel Marjamäki - - * lib/errorlogger.h: error logger: explain the severities better - -2011-03-06 Kimmo Varis - - * lib/errorlogger.h: Document error message severities. - -2011-03-06 Daniel Marjamäki - - * readme.txt: readme: better build instructions - -2011-03-06 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: CheckMemoryLeak: Refactoring the code - -2011-03-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2612 (segmentation - fault of cppcheck ( <><< )) - -2011-03-05 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: finish fixing #2624 - (better function pointer support needed) - -2011-03-05 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: partial fix for - #2624 (better function pointer support needed) - -2011-03-06 Greg Hewgill - - * lib/checkother.cpp, lib/preprocessor.cpp, test/testother.cpp: - switchCaseFallThrough is now an inconclusive check - -2011-03-06 Greg Hewgill - - * lib/preprocessor.cpp, test/testother.cpp: Relax detection of 'fall - through' comment so it only adds a suppression if it immediately - precedes 'case' or 'default' - -2011-03-06 Greg Hewgill - - * lib/checkother.cpp, lib/preprocessor.cpp, test/testother.cpp: - switchCaseFallThrough is now a coding style check (ticket #2623) - -2011-03-05 Kimmo Varis - - * cppcheck.cppcheck: Skip checking gui/temp when using project file. gui/temp directory contains code files generated by qmake so those - files are not interesting to check. - -2011-03-05 Greg Hewgill - - * lib/preprocessor.cpp, test/testother.cpp: Support a few more - common styles of "fall through" comment - -2011-03-05 Greg Hewgill - - * Makefile, cli/threadexecutor.cpp, cli/threadexecutor.h: Refactor - ThreadExecutor::check() to handle child failures more gracefully - -2011-03-05 Greg Hewgill - - * cli/threadexecutor.cpp, cli/threadexecutor.h: Normalise threading - support checking into a single #define - -2011-03-05 Greg Hewgill - - * : commit c5f8a06a97df57a47a2061e48b55e6fa15f19641 Author: Greg - Hewgill Date: Fri Mar 4 20:26:14 2011 +1300 - -2011-03-04 Greg Hewgill - - * lib/preprocessor.cpp, test/testother.cpp: fix case where fall - through comment precedes preprocessor line - -2011-03-04 Greg Hewgill - - * test/testother.cpp: add TODO for pathological case - -2011-02-23 Greg Hewgill - - * lib/checkother.cpp, test/testother.cpp: avoid warning on first - case (in case there are declarations before first case) - -2011-02-20 Greg Hewgill - - * lib/preprocessor.cpp: slightly more flexible detection of 'fall - through' comment - -2011-02-20 Greg Hewgill - - * lib/checkother.cpp: avoid crash when else condition doesn't have - braces to link - -2011-02-20 Greg Hewgill - - * lib/preprocessor.cpp, test/testother.cpp: recognise fall through - in c style comments - -2011-02-20 Greg Hewgill - - * lib/checkother.cpp: more gracefully handle unexpected blocks - inside switch - -2011-02-20 Greg Hewgill - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: full - implementation of switch case fall through - -2011-02-19 Greg Hewgill - - * lib/checkother.cpp, lib/checkother.h, lib/preprocessor.cpp, - test/testother.cpp: initial simplistic implementation of - switchCaseFallThrough - -2011-03-03 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: really fix #2620 - reference of typedef of array not simplified properly - -2011-03-03 Sébastien Debrard - - * : commit d7a6e729b84a72b3886dedb8fa7b50db3c68de3c Author: Daniel - Marjamäki Date: Thu Mar 3 20:07:56 2011 - +0100 - -2011-03-03 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: revert previous - commit: simplified code isn't correct - -2011-03-03 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2620 reference - of typedef of array not simplified properly - -2011-03-02 Robert Reif - - * lib/checkautovariables.cpp: convert some of the checks in - CheckAutoVariables to use the variable symbol table - -2011-03-02 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h, - test/testautovariables.cpp: add debug message for function argument - missing varid - -2011-03-01 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2618 - (Tokenizer::simplifyKnownVariables: Don't use known string value if - address is wanted) - -2011-03-01 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2616 (Segmentation - fault with unknown macro) - -2011-03-01 Daniel Marjamäki - - * gui/projectfiledialog.cpp, test/testpreprocessor.cpp: astyle - formatting - -2011-03-01 Greg Hewgill - - * test/testpreprocessor.cpp: add TODO for #elif inside #if 0 - processing, also for #if 1 - -2011-03-01 Greg Hewgill - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: refactor #if 0 - handling to leave preprocessor statements alone - -2011-03-01 Greg Hewgill - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: handle #if (0) - after removing parentheses - -2011-03-01 Greg Hewgill - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: handle embedded - whitespace in #if 0 processing - -2011-03-01 Greg Hewgill - - * test/testpreprocessor.cpp: test case for #if 0 exclusion - -2011-02-28 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix #2595 bitfield fix - for case x: break; and default: break; - -2011-02-28 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2615 (Segmentation - fault in cppcheck 1.47) - -2011-02-28 Sébastien Debrard - - * : commit 81318bb4a12aa7d3bc470b17a5c2c8136a3703b5 Author: Kimmo - Varis Date: Mon Feb 28 17:41:52 2011 +0200 - -2011-02-28 Kimmo Varis - - * gui/projectfile.cpp, gui/projectfiledialog.cpp: GUI: Show native - path separators. Show native path separators in project file-dialog. Convert paths to - internal separators when reading from project file and when reading - from the dialog. Convert to native separators when adding to the - dialog (for the user). - -2011-02-28 Kimmo Varis - - * : commit b1db29278d8d540bc71ca3337cb3ddba5e00f364 Author: Kimmo - Varis Date: Mon Feb 28 16:31:46 2011 +0200 - -2011-02-28 Kimmo Varis - - * gui/projectfiledialog.cpp: GUI: Add path separator for ignore - dirs. - -2011-02-28 Kimmo Varis - - * gui/projectfile.cpp: GUI: Small cleanup for projectfile code. - -2011-02-28 Kimmo Varis - - * gui/projectfiledialog.cpp: GUI: Fix bug mixing include and ignore - dirs in GUI. - -2011-02-28 Kimmo Varis - - * gui/projectfile.cpp: GUI: Write ignore paths to project file. - -2011-02-28 Kimmo Varis - - * gui/project.cpp, gui/projectfile.ui, gui/projectfiledialog.cpp, - gui/projectfiledialog.h: GUI: Add GUI for ignored paths in project - files. Add similar GUI than include paths has. Currently there is only - possibly select directories directly from the GUI. But filename can - be added to the path by editing it. - -2011-02-28 Kimmo Varis - - * gui/filelist.cpp, gui/filelist.h, gui/mainwindow.cpp, - gui/projectfile.cpp: GUI: Take filtering into use in GUI. Add applying of filtering into list of files to check if we have an - active project file. Filtering is quite much similar to the - filtering in CLI. If we have directory filter ("gui/") then we check all paths if they - contain "gui" part. In practice we search for string "/gui" from the - paths. If we have filename filtering ("gui/projectfile.cpp") then we - check if any of the paths end with that. - -2011-02-27 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #432 (New check: wrong usage of ! operator in conditions) - -2011-02-27 Kimmo Varis - - * gui/mainwindow.cpp: GUI: If project open failed project got - invalid. The project was deleted but not set as NULL when the project open - failed. Fix this by deleting the project only when the opening - succeeds. - -2011-02-27 Kimmo Varis - - * gui/projectfile.cpp, gui/projectfile.h: GUI: Convert some - projectfile method arguments const. - -2011-02-27 Kimmo Varis - - * gui/projectfile.cpp, gui/projectfile.h: GUI: Add ignored paths - support to project file. This patch adds support for ignored paths in the project file. - There is new element which can contain one or more - elements with name attribute containing the path to ignore. - -2011-02-27 Robert Reif - - * lib/symboldatabase.cpp: fix symbol database bug where delete can - be considered a variable declaration - -2011-02-27 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h, - test/testsymboldatabase.cpp: add an array flag to symbol database - Variable class - -2011-02-27 Robert Reif - - * lib/symboldatabase.cpp: fix a symbol database bug where a return - statement could be considered a variable declaration - -2011-02-26 Daniel Marjamäki - - * lib/symboldatabase.cpp: Symbol database: Fixed debug warnings for - true/false. true/false doesn't have varId. - -2011-02-26 Robert Reif - - * lib/symboldatabase.cpp: fix a bug in symbol database while scope - processing - -2011-02-26 Robert Reif - - * lib/symboldatabase.h: fix potential null pointer dereference for - unnamed function arguments - -2011-02-26 Robert Reif - - * lib/checkclass.cpp: convert CheckClass::noMemset to use new - variable lookup capability - -2011-02-26 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: add a varId to - Variable lookup table and fill it in with all variables - -2011-02-26 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: add local scopes to - the symbol database - -2011-02-26 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: add a list of - function arguments to symbol database Function class - -2011-02-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2031 (Tokenizer: - simplify known value (string has known value after strcpy)) - -2011-02-26 Daniel Marjamäki - - * lib/preprocessor.cpp: astyle formatting - -2011-02-26 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: fix - -2011-02-26 Daniel Marjamäki - - * : merge from subversion client - -2011-02-26 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: extend symbol - database Variable with more information - -2011-02-26 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h: expose number of variables found - by Tokenizer - -2011-02-26 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, gui/cppcheck_nl.ts, - gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, gui/cppcheck_se.ts, - gui/cppcheck_sr.ts: GUI: Update translation files. - -2011-02-26 Kimmo Varis - - * gui/projectfile.ui, gui/projectfiledialog.cpp, - gui/projectfiledialog.h: GUI: Use list to manage paths in project - file. Handling paths in line edit control is quite hard. List control is - much more pleasant to use for it. Convert Project file path handling - to similar list control usage than include paths earlier. - -2011-02-25 Kimmo Varis - - * gui/projectfile.ui, gui/projectfiledialog.cpp, - gui/projectfiledialog.h: GUI: Edit project's include directories as - list. Editing include directories in edit control is not nice. Instead add - new tab and list control for the include directories. They are now - added, edited and removed like global include directories in - settings dialog. - -2011-02-25 Kimmo Varis - - * gui/applicationlist.cpp: GUI: Fix for initializing default - application. - -2011-02-25 Robert Reif - - * lib/symboldatabase.cpp, test/testsymboldatabase.cpp: fix - symboldatabase global variable detection - -2011-02-25 Kimmo Varis - - * gui/settingsdialog.cpp: GUI: Select the default application in app - list. - -2011-02-25 Kimmo Varis - - * gui/applicationlist.cpp, gui/applicationlist.h, - gui/settingsdialog.cpp: GUI: Rename methods. We don't need the 'type' postfix. We are handling applications, not - application types. - -2011-02-25 Kimmo Varis - - * gui/resultstree.cpp, gui/resultstree.h: GUI: Fix opening error - item with default app. - -2011-02-25 Kimmo Varis - - * gui/settingsdialog.cpp: GUI: Fix for removing application. The default application was not handled correctly when removing - application from the list. If the default application is removed - then we reset the default application to unknown. Otherwise we make - sure the default application is correct after the removal of other - application. - -2011-02-25 Kimmo Varis - - * gui/applicationlist.cpp, gui/applicationlist.h, gui/common.h, - gui/settingsdialog.cpp: GUI: Show default application with [Default] - text. Instead of keeping the default application as a first item in the - application list point the default application by adding a - "[Default]" text after its name. - -2011-02-25 Kimmo Varis - - * gui/settings.ui, gui/settingsdialog.cpp, gui/settingsdialog.h: - GUI: Improve edit application setttings dialog. Make the editor application settings dialog to look similar than - include paths dialog. Move buttons right to the list, not below. - And remove unnecessary "application" word from button texts. Rename - Modify-button to Edit-button since we are not modifying the - application but editing its info. Similarly rename Delete- button to - Remove-button since we are not deleting the application but removing - from the list. - -2011-02-25 Kimmo Varis - - * gui/settingsdialog.cpp, gui/settingsdialog.h: GUI: Rename method. SettingsDialog::PopulateListwidget() was a bit confusing name as - there are more than one list widgets already in settings-dialog. - -2011-02-24 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: code - cleanup and add more tests to CheckClass::noMemset() - -2011-02-24 Kimmo Varis - - * gui/settings.ui, gui/settingsdialog.cpp, gui/settingsdialog.h: - GUI: Add list control for include paths. Instead of hard-to-use single line edit control, use list control - for include paths. Have separate buttons for adding, editing and - removing paths. Paths are still stored as one string where paths are - separated with ";". Empty paths are ignored. - -2011-02-24 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2610 (segmentation - fault of cppcheck ( if () < {} )) - -2011-02-24 Chuck Larson - - * lib/checkclass.cpp, test/testclass.cpp: memset: using memset on - struct/class that has std::string member variable. ticket: #1655 - -2011-02-24 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2609 (False - positive on template dependent name) - -2011-02-24 Jnos Maros - - * lib/checkpostfixoperator.cpp: Fixed #2608 - ([lib/checkpostfixoperator.cpp:87]: (error) Possible null-pointer - dereference: decltok) - -2011-02-23 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2578 - (Preprocessor does not correctly handle #define A 0 / #if A) - -2011-02-23 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2604 - (Segmentation fault of cppcheck ( sizeof <= A )) - -2011-02-23 Greg Hewgill - - * gui/checkthread.cpp: fix CppCheck constructor to allow gui to - compile - -2011-02-23 Greg Hewgill - - * : commit ec4e0c8bf5dba7803c0ebf8313827794d905a674 Author: Greg - Hewgill Date: Wed Feb 23 20:59:30 2011 +1300 - -2011-02-16 Greg Hewgill - - * cli/cmdlineparser.cpp, test/testcmdlineparser.cpp: add --suppress= - command line option - -2011-02-22 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2403 - (simplifyTypedef: array of function pointers) Internal error message - -2011-02-23 Sébastien Debrard - - * lib/checkobsoletefunctions.h: update the message when bcopy - function is used - -2011-02-22 Kimmo Varis - - * cli/cmdlineparser.cpp: CLI: Fix CLI help text to fit in 80-char - terminal. - -2011-02-22 Reijo Tomperi - - * test/testbufferoverrun.cpp: Fix test array_index_24() to share - code with environments where plain char is either signed or - unsigned. This was done, because that particular test has been - already fixed a couple of times and it is still broken in some - systems. - -2011-02-22 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2605 - (cppcheck hangs with 100% cpu load ( #define = )) - -2011-02-22 Sébastien Debrard - - * : commit dd12fc177fb827d3d54648ec725c9403cb9edf1a Author: Robert - Reif Date: Tue Feb 22 07:48:34 2011 -0500 - -2011-02-22 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2601 - (segmentation fault of cppcheck) - -2011-02-22 Robert Reif - - * lib/checkclass.cpp, test/testunusedprivfunc.cpp: fix #2602 - (segmentation fault of cppcheck ( class A {A& operator=(const A&); - }; )) - -2011-02-21 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2600 - (segmentation fault of cppcheck ( enum{const} )) - -2011-02-21 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2599 - (segmentation fault of cppcheck ( sizeof )) - -2011-02-21 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: fix segfault: #2591 - (cppcheck hangs with 100% cpu load ( class A : )) - -2011-02-21 root - - * : commit 55711698d0b51b881d13c4537914e86f43ffba31 Author: Daniel - Marjamäki Date: Mon Feb 21 19:41:34 2011 - +0100 - -2011-02-20 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #2595 (False positive - Technically the member function 'A::foo' can be const) - -2011-02-20 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: fix bitfields to support - non-numeric bitfield width - -2011-02-20 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2597 (False positive: Buffer access out-of-bounds for u_char, - uint*_t, ...) - -2011-02-20 Daniel Marjamäki - - * lib/preprocessor.cpp: astyle formatting - -2011-02-20 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2563 (#if - equality testing does not ignore parentheses) - -2011-02-20 Daniel Marjamäki - - * test/testpreprocessor.cpp: Preprocessor: Added TODO test case for - #2563 - -2011-02-20 Daniel Marjamäki - - * lib/tokenize.cpp: cppcheckError: Rephrazed the error message. The - 'internal error' sounds like something dangerous happens that needs - to be fixed. So I think 'analysis failed' is better. If the code has - a syntax error then 'analysis failed' is entirely ok. - -2011-02-20 Daniel Marjamäki - - * test/testnullpointer.cpp: Null pointer: Added TODO test case. - Ticket: #2379 - -2011-02-20 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Tokenizer: fixed so that 'p=&x; if(p)' is - simplified to 'p=&x;if(&x)'. Ticket: #2596 - -2011-02-20 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointers: - Fixed false negative for such code: 'if (p && *p) {} else { *p=0; - }'. Ticket: #2379 - -2011-02-20 Robert Reif - - * lib/checkclass.cpp: use func->start rather than searching for '{' - in CheckClass::privateFunctions - -2011-02-20 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h: save start of - function '{' and start of variable declaration in symbol database so - checks don't have to find them - -2011-02-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: astyle formatting - -2011-02-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: - Tokenizer::simplifyTemplates: Better handling for multi-token - template arguments such as 'Foo' - -2011-02-19 Robert Reif - - * lib/checkclass.cpp: fix comment in CheckClass::initializeVarList - -2011-02-19 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: fix #2592 (False positive: - 'operator=' should return reference to self) - -2011-02-20 Greg Hewgill - - * : commit 98ab34b2b5e92fe47cfc4d279fcc14186ef9e05a Author: Greg - Hewgill Date: Sun Feb 20 11:36:03 2011 +1300 - -2011-02-19 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointers: - Fixed false negative for such code 'if (p && *p==0) {} *p = 0;'. - Ticket: #2379 - -2011-02-19 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointers: - Fixed false negative for such code: 'abc->a = 0; if (abc && ..'. - Ticket: #2379 - -2011-02-19 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointer: - fixed false negative when dereferencing struct and then checking if - it's null. Ticket: #2379 - -2011-02-19 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/symboldatabase.cpp, - test/testclass.cpp: fix [B#2589 (segmentation fault of cppcheck - (struct B : A)) - -2011-02-19 Daniel Marjamäki - - * lib/executionpath.cpp, test/testnullpointer.cpp, - test/testuninitvar.cpp: Fixed #2231 (uninitialized variable: - undetected when initialization in for loop) - -2011-02-19 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: fix #2587 (Spurious - warning about struct hiding typedef) - -2011-02-19 Robert Reif - - * lib/symboldatabase.cpp: fix Scope::findInNestedListRecursive to - check all children - -2011-02-19 Daniel Marjamäki - - * lib/checkother.cpp: Fixed #2590 (segmentation fault of cppcheck ( - {}int )) - -2011-02-19 Greg Hewgill - - * lib/tokenize.cpp: remove stray BOM from source file - -2011-02-18 Sébastien Debrard - - * : commit f3b211378cec53a500d2e11f7ad8781f0a138d74 Author: Daniel - Marjamäki Date: Fri Feb 18 20:22:09 2011 - +0100 - -2011-02-18 Daniel Marjamäki - - * lib/tokenize.cpp: Borland C++: Fixed compiler error - -2011-02-18 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2582 - (segmentation fault of cppcheck ( if() )) - -2011-02-17 Daniel Marjamäki - - * Makefile: Makefile: updated with dmake - -2011-02-17 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: GCC: Disabled the -Wsign-conversion. It - is quite noisy. - -2011-02-17 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #2585 (segmentation - fault of cppcheck (CheckOther::clarifyCalculation)) - -2011-02-17 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2586 (segmentation - fault of cppcheck (template<>)) - -2011-02-17 Daniel Marjamäki - - * test/testsuppressions.cpp: astyle formatting - -2011-02-17 Sébastien Debrard - - * : commit e2581da30c2676e402240f51753d07531842514e Merge: 53aaf22 - a4de6a3 Author: Greg Hewgill Date: Thu Feb 17 - 21:46:43 2011 +1300 - -2011-02-17 Greg Hewgill - - * lib/cppcheck.cpp, lib/settings.cpp, lib/settings.h, - test/testsuppressions.cpp: be sure to list unmatched suppressions - only for the currently processed file - -2011-02-16 Daniel Marjamäki - - * test/testclass.cpp: CheckClass::noMemset: Added TODO test case - -2011-02-16 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp, lib/cppcheck.cpp, lib/errorlogger.h: - Fixed gcc compiler warnings (signedness) - -2011-02-16 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2584 (false - positive 'variable n is never used') - -2011-02-16 Sébastien Debrard - - * : commit f6872a7008b56f0933eb6c3faff29992a5693d20 Merge: 5998ec4 - de00ad6 Author: Greg Hewgill Date: Thu Feb 17 - 07:13:16 2011 +1300 - -2011-02-16 Greg Hewgill - - * AUTHORS: add self to authors file - -2011-02-16 Greg Hewgill - - * Makefile, cli/cppcheckexecutor.cpp, cli/threadexecutor.cpp, - cli/threadexecutor.h, lib/cppcheck.cpp, lib/cppcheck.h, - lib/errorlogger.cpp, lib/errorlogger.h, lib/settings.cpp, - lib/settings.h, test/testcppcheck.cpp, test/testsuppressions.cpp: - implement unmatchedSuppression information message - -2011-02-16 Greg Hewgill - - * lib/settings.cpp, lib/settings.h: factor out addSuppressionLine - from file reading function - -2011-02-15 Greg Hewgill - - * lib/settings.cpp: use suppression wildcard glob instead of - special-case empty filename - -2011-02-15 Raphael Geissert - - * test/testbufferoverrun.cpp: Really fix the build failure this time - -2011-02-14 Robert Reif - - * lib/symboldatabase.cpp, test/testunusedprivfunc.cpp: fix #2580 - (false postive with Unused private function) - -2011-02-14 Daniel Marjamäki - - * build-pcre.txt, build.txt: renamed build.txt to build-pcre.txt - -2011-02-14 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: - Tokenizer::simplifyCalculations: basic handling of bitwise operators - -2011-02-14 Daniel Marjamäki - - * cli/cli.pro, readme.txt: Renaming HAVE_DEPENDENCIES to HAVE_RULES - -2011-02-14 Daniel Marjamäki - - * Makefile, cli/cmdlineparser.cpp, lib/cppcheck.cpp, - tools/dmake.cpp: Build: Renamed HAVE_DEPENDENCIES to HAVE_RULES - -2011-02-13 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Really fix #2348 - perl-tk - -2011-02-13 Ettl Martin - - * lib/preprocessor.cpp: fixed pre/post increment warings, found - during selfcheck - -2011-02-13 Daniel Marjamäki - - * test/testbufferoverrun.cpp: Revert "Buffer overruns: Removed TODO - test case. We intentionally don't check struct/class arrays fully to - avoid false positives" This reverts commit 87cc42e6f0b0c8db37a314e5ef5be2c48cc3f4bd. - -2011-02-13 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: - Tokenizer::simplifyKnownVariables: Fixed TODO testcases (better - handling of comparisons) - -2011-02-13 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: - Tokenizer::simplifyKnownVariables: Fixed TODO testcase (better - handling of ^) - -2011-02-13 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: - Tokenizer::simplifyKnownVariables: Fixed TODO testcase (better - handling of |) - -2011-02-13 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: - Tokenizer::simplifyKnownVariables: Fixed TODO testcase (better - handling of %) - -2011-02-13 Sébastien Debrard - - * : commit 87cf0949f2cd01c47194e058afe655fcff8e2ff3 Author: Daniel - Marjamäki Date: Sun Feb 13 21:48:13 2011 - +0100 - -2011-02-13 Daniel Marjamäki - - * test/testbufferoverrun.cpp: Buffer overruns: Removed TODO test - case. We intentionally don't check struct/class arrays fully to - avoid false positives - -2011-02-13 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fix #2579 - (segmentation fault of cppcheck) - -2011-02-13 Robert Reif - - * lib/tokenize.cpp: Really fix: #2376 (simplifyTypedef: upx-ucl) - -2011-02-13 Daniel Marjamäki - - * : commit 8c5ec0df7dac25011a26078dd88d9cffeed5ebae Merge: b3e19c2 - a4fd5e8 Author: Daniel Marjamäki Date: Sun - Feb 13 18:13:35 2011 +0100 - -2011-02-13 Greg Hewgill - - * test/testpreprocessor.cpp: change failing tests into - TODO_ASSERT_EQUALS - -2011-02-12 Raphael Geissert - - * cli/filelister_unix.cpp: Fix build when PATH_MAX is not defined POSIX says it _may_ be defined. Alternative implementation follows - POSIX.1-2008. - -2011-02-13 Greg Hewgill - - * lib/settings.cpp: astyle formatting - -2011-02-13 Greg Hewgill - - * lib/settings.cpp: use std::stack instead of std::list where - appropriate - -2011-02-12 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: fix #2577 - (segmentation fault of cppcheck) - -2011-02-12 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h: Tokenizer: comments/refactorings - -2011-02-12 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h: Tokenizer::simplifyTemplates: - Broke out the functionality that instantiates a template - -2011-02-12 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h: Tokenizer::simplifyTemplates: - Broke out the functionality that handles default template arguments - -2011-02-12 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h: Tokenizer::simplifyTemplates: - Broke out the functionality that extract a list of template - instantiations - -2011-02-12 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h: Tokenizer::simplifyTemplates: - broke out the functionality that extract a list of template - declarations - -2011-02-12 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h: Tokenizer::simplifyTemplates: - Broke out handling for 'template<>..' - -2011-02-12 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2576 (False positive: (error) Buffer access out-of-bounds) - -2011-02-12 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2549 (segmentation - fault of cppcheck) - -2011-02-12 Daniel Marjamäki - - * lib/checkautovariables.h, test/testautovariables.cpp: Fixed #2558 - (false positive: (error) Returning reference to auto variable) - -2011-02-12 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #2502 (False - positive: redundant assingment of object to itself) - -2011-02-12 Daniel Marjamäki - - * test/testuninitvar.cpp: Uninitialized variables: Added TODO test - case - -2011-02-12 Sébastien Debrard - - * : commit 318f2e8a5733adb2e863dd229b8102bd6c4e2d06 Author: Daniel - Marjamäki Date: Sat Feb 12 11:31:10 2011 - +0100 - -2011-02-12 Raphael Geissert - - * test/testbufferoverrun.cpp: Fix test for architectures where char - is unsigned - -2011-02-12 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h: - Tokenizer::simplifyKnownVariables: Split up the function into - smaller functions. Broke out ..GetData function that extracts info - about assigned variable before the simplification is made. - -2011-02-12 Daniel Marjamäki - - * readme.txt: readme: show how cppcheck is compiled with g++ with or - without dependencies - -2011-02-12 Daniel Marjamäki - - * Makefile, cli/cli.pro, cli/cmdlineparser.cpp, lib/cppcheck.cpp, - tools/dmake.cpp: cppcheck: Added HAVE_DEPENDENCIES define. Cppcheck - cli can be compiled without dependencies. - -2011-02-11 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: fix - #2568 (False positive: (style) Union 'A_t' hides typedef with same - name (forward declaration)) - -2011-02-11 Sébastien Debrard - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: fix - #2569 check postfix increment on boolean - -2011-02-11 Reijo Tomperi - - * runastyle: Add check to runastyle to enforce correct astyle - version usage. - -2011-02-11 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h: - Tokenizer::simplifyKnownVariables: Broke out the simplification into - a separate function - -2011-02-11 Erik Lax - - * gui/mainwindow.cpp, gui/mainwindow.h: Fixed: #2572 (GUI: Disable - all UI actions on Recheck) - -2011-02-11 Erik Lax - - * gui/resultstree.cpp: Fixed: #2460 (GUI: Errors are sorted by line - number alphabetically instead of numerically) - -2011-02-11 Daniel Marjamäki - - * lib/checkclass.cpp, lib/preprocessor.cpp, lib/preprocessor.h, - tools/dmake.cpp: astyle formatting - -2011-02-11 Erik Lax - - * test/testbufferoverrun.cpp: Preprocessor: Test handling of strings - with multiple spaces (Ticket: #2548) - -2011-02-11 Greg Hewgill - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2571 - (Preprocessor: better handling for #undef) - -2011-02-11 Greg Hewgill - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2570 - (Preprocessor: #define parsing when there is no whitespace between a - macro symbol and its double-quoted string expansion) - -2011-02-11 Robert Reif - - * lib/checkclass.cpp, test/testunusedprivfunc.cpp: fix #2567 Unused - private function when implemented in different file - -2011-02-11 Erik Lax - - * lib/preprocessor.cpp, lib/preprocessor.h, - test/testpreprocessor.cpp: Fixed #2559 (Refactoring - Preprocessor::read) - -2011-02-10 Sébastien Debrard - - * : commit 90bf801c8352a170bb5946e3eb6a39449b669120 Author: Daniel - Marjamäki Date: Thu Feb 10 22:10:45 2011 - +0100 - -2011-02-10 Daniel Marjamäki - - * cli/cppcheck.vcproj, test/test.vcproj: Visual Studio 2008: Updated - project files for cli and test - -2011-02-10 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h: - CheckBufferOverrun: Refactoring. Broke out checkScope code for - parsing 'for' bodies - -2011-02-10 Reijo Tomperi - - * Makefile, cli/cmdlineparser.cpp, lib/lib.pri, - test/testcppcheck.cpp, tools/dmake.cpp: Change "tinyxml/tinyxml.h" - includes into and modify dmake to work with it. This - should allow usage of libtinyxml-dev or such libraries without - modifications to code or makefile. - -2011-02-10 Sébastien Debrard - - * : commit 2900d44ff0b5037bb43b14876c7699075b1a122e Author: Robert - Reif Date: Thu Feb 10 07:37:55 2011 -0500 - -2011-02-09 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h: Tokenizer: refactor duplicated - token copy code info function - -2011-02-09 Robert Reif - - * tools/dmake.cpp: fix dmake.cpp cppcheck message: Include file: - ../cli/fileLister_win32.h not found. - -2011-02-09 Kimmo Varis - - * gui/test/main.cpp, gui/test/test.pro, - gui/test/testxmlreportv2.cpp, gui/test/testxmlreportv2.h, - gui/xmlreportv2.h: GUITEST: Add test reading XML format v2 file. - -2011-02-09 Kimmo Varis - - * gui/test/main.cpp, gui/test/test.pro, gui/test/testxmlreport.cpp, - gui/test/testxmlreportv1.cpp, gui/test/testxmlreportv1.h: GUITEST: - Add test for reading old format XML report. - -2011-02-09 Kimmo Varis - - * gui/test/testxmlreport.cpp, gui/test/testxmlreport.h, - gui/test/xmlfiles/xmlreport_v1.xml, - gui/test/xmlfiles/xmlreport_v2.xml: GUITEST: Add test for checking - XML report version. - -2011-02-09 Sébastien Debrard - - * : commit 5175e4ff3f04a7a8bb75c020694e262d456cf077 Author: Daniel - Marjamäki Date: Wed Feb 9 19:20:44 2011 - +0100 - -2011-02-09 Robert Reif - - * lib/tokenize.cpp: replace tok->strAt(0) with tok->str() - -2011-02-09 Kimmo Varis - - * gui/test/main.cpp, runastyle, runastyle.bat: Astyle: add option to - convert to linux EOLs. - -2011-02-08 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2554 - (simplifyTypedef: wrong simplification for sizeof(array)) - -2011-02-09 Kimmo Varis - - * gui/test/main.cpp, gui/test/test.pro, - gui/test/testtranslationhandler.cpp, - gui/test/testtranslationhandler.h, gui/test/testxmlreport.cpp, - gui/test/testxmlreport.h: GUITEST: Add couple of tests for - XmlReport. - -2011-02-09 Reijo Tomperi - - * Makefile, tools/dmake.cpp: Change Makefile to allow another - external library to be used instead of bundled one. E.g. make - TINYXML="-ltinyxml" can be used to compile with libtinyxml-dev - instead of externals/tinyxml (but won't compile yet, because of - #include "tinyxml/tinyxml.h" in the code). - -2011-02-08 Kimmo Varis - - * gui/test/test.pro, gui/test/testtranslationhandler.cpp, - gui/translationhandler.h, runastyle, runastyle.bat: GUITEST: Add - first GUI test testing TranslationHandler. - -2011-02-08 Reijo Tomperi - - * readme.txt: Fix readme.txt instructions for g++ compiling - -2011-02-08 Sébastien Debrard - - * : commit 56ae77ba87cb528372daf385f865230b938d2ff0 Author: Daniel - Marjamäki Date: Tue Feb 8 20:18:15 2011 - +0100 - -2011-02-08 Erik Lax - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #2550 (Bad substr/strncmp comparison) - -2011-02-08 Kimmo Varis - - * gui/mainwindow.cpp, gui/translationhandler.cpp: GUI: Better - handling of unknown language loading. If there were unknown language in settings the fallback to English - language didn't work as expected. And there were no proper current - language set after that. Initialize current language to English so - we always have English as proper fallback. - -2011-02-09 Greg Hewgill - - * lib/settings.cpp, man/cppcheck.1.xml, man/manual.docbook, - test/testsettings.cpp: support wildcard characters * and ? in - suppression list - -2011-02-08 Greg Hewgill - - * lib/settings.cpp, lib/settings.h: factor out file matching into - own class - -2011-02-08 Greg Hewgill - - * test/testsettings.cpp: failing test for suppression glob - -2011-02-08 Greg Hewgill - - * test/testpreprocessor.cpp: preprocessor check for #define A 0 - -2011-02-07 Robert Reif - - * lib/checkautovariables.cpp, test/testautovariables.cpp: - checkautovariables: refactor to use the symbol database - -2011-02-07 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2552 - (preprocessor check XX is already guaranteed to be defined -- too - eager?) - -2011-02-07 Kimmo Varis - - * gui/translationhandler.cpp: GUI: Enable French translation. French translation file was added to the source tree but not added - to the code loading translations. - -2011-02-07 Kimmo Varis - - * gui/translationhandler.h: GUI: Add comments for - translationhandler.h. - -2011-02-07 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h, gui/settingsdialog.cpp, - gui/settingsdialog.h, gui/translationhandler.cpp, - gui/translationhandler.h: GUI: Store selected language as language - code. GUI was storing selected language as index to the languages list. - This is fragile since the order and count of items can change. This - commit changes to using ISO language code (e.g. "en" for "English"). Fixes ticket #2446 (GUI: Don't use index number for language - selection) - -2011-02-06 Kimmo Varis - - * gui/translationhandler.cpp, gui/translationhandler.h: GUI: - Refactoring translation handling. Instead of separate language name and filename lists use one list of - structs. This makes language name and filename more connected and - makes handling of them easier. - -2011-02-06 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Remove unneeded - translation code. - -2011-02-06 Kimmo Varis - - * gui/translationhandler.cpp: GUI: Sort the languages list. - -2011-02-06 Daniel Marjamäki - - * createrelease: createrelease: updated the instructions - -2011-02-06 Daniel Marjamäki - - * Makefile: Makefile: set debug mode - -2011-02-06 Daniel Marjamäki - - * Makefile: 1.47: Updated Makefile for release - -2011-02-06 Daniel Marjamäki - - * Changelog: 1.47: Updated Changelog - -2011-02-06 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, lib/cppcheck.cpp, - win_installer/productInfo.wxi: 1.47: Updated versions - -2011-02-06 Daniel Marjamäki - - * man/manual.docbook: manual: updated for 1.47 release - -2011-02-06 Daniel Marjamäki - - * readme.txt: readme: tweaked the 'compiling cppcheck' section - -2011-02-06 Zachary Blair - - * lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h: Ticket - #2388. Added more detail to the 'exceptRethrowCopy' error message. - -2011-02-06 Zachary Blair - - * : commit 2506c7db5cac7a04a143ca2f0d8fecbe0d9c22ba Author: Daniel - Marjamäki Date: Sun Feb 6 10:04:28 2011 - +0100 - -2011-02-06 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Added a comment about sizeof for - struct/class. We always assume that the size is 100 - -2011-02-05 Kimmo Varis - - * .gitignore: Add .obj files to gitignore. - -2011-02-05 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_fr.ts, gui/cppcheck_ja.ts, gui/cppcheck_nl.ts, - gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, gui/cppcheck_se.ts, - gui/cppcheck_sr.ts: GUI: Update translation files. - -2011-02-05 Kimmo Varis - - * win_installer/config.wxi: Installer: Update CLI build directory. - -2011-02-05 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: Add French translation to - installer. - -2011-02-05 Kimmo Varis - - * gui/gui.pro: GUI: Add French translation to project file. - -2011-02-05 Reijo Tomperi - - * cli/cmdlineparser.cpp: Improve --help listing by removing - duplicate options list and using lt and gt characters for option - arguments. - -2011-02-05 Reijo Tomperi - - * man/cppcheck.1.xml: Update man page to contain more info about - --rule options. - -2011-02-05 Reijo Tomperi - - * man/cppcheck.1.xml: Update man page - -2011-02-05 Daniel Marjamäki - - * cli/cmdlineparser.cpp: Cppcheck: Added short info about --rule and - --rule-file to --help output - -2011-02-05 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ja.ts, gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/cppcheck_sr.ts: GUI: - Update translation files. - -2011-02-05 Kimmo Varis - - * gui/xmlreportv2.cpp, gui/xmlreportv2.h: GUI: Fix reading multiple - error locations from XML. - -2011-02-05 Kimmo Varis - - * : commit f279fcd351e5331551b34ab0f7c26730eb0af068 Author: Kimmo - Varis Date: Sat Feb 5 16:07:59 2011 +0200 - -2011-02-05 Kimmo Varis - - * gui/xmlreportv2.cpp, gui/xmlreportv2.h: GUI: Read XML format - version 2 files. Implement the parsing of XML format v2 error data. - -2011-02-05 Daniel Marjamäki - - * scripts/tabs.pl, test/testclass.cpp, test/testmathlib.cpp, - test/testnullpointer.cpp, test/testuninitvar.cpp: scripts: added - tabs.pl - in my opinion it is bad to use tabs inside string - constants. spaces or \t should be used instead. - -2011-02-05 Kimmo Varis - - * gui/resultsview.cpp, gui/xmlreport.h, gui/xmlreportv1.cpp, - gui/xmlreportv1.h, gui/xmlreportv2.cpp, gui/xmlreportv2.h: GUI: Read - ErrorItems instead of ErrorLines from XML report. XML report format 1 only had error "lines" that we promoted to - "items" when adding to GUI. XML report format 2 contains error - "items" so change the code to read items and do the promotion - directly when reading and parsing the data. - -2011-02-05 Kimmo Varis - - * gui/resultsview.cpp, gui/xmlreport.cpp, gui/xmlreport.h, - gui/xmlreportv2.cpp, gui/xmlreportv2.h: GUI: Determine the XML - report format before reading report. - -2011-02-05 Zachary Blair - - * lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h, - test/testexceptionsafety.cpp: Fixed #2388 (Use throw without - argument to rethrow exceptions) - -2011-02-05 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Replace __null - with 0 (gcc constant) - -2011-02-05 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: Fixed #2547 - (segmentation fault of cppcheck) - -2011-02-05 Sébastien Debrard - - * : commit c078d804b98d484e242e81683260aed5d2bd94d1 Author: Reijo - Tomperi Date: Sat Feb 5 00:40:12 - 2011 +0200 - -2011-02-05 Kimmo Varis - - * gui/xmlreport.cpp, gui/xmlreport.h, gui/xmlreportv1.cpp, - gui/xmlreportv2.cpp: GUI: Quote special chars in the XML output. Fixes ticket #2543 (GUI: Xml report does not quote special - characters) - -2011-02-04 Kimmo Varis - - * gui/gui.pro, gui/resultsview.cpp, gui/xmlreport.cpp, - gui/xmlreport.h, gui/xmlreportv1.cpp, gui/xmlreportv1.h, - gui/xmlreportv2.cpp, gui/xmlreportv2.h: GUI: Add base class for XML - report classes. A base class is needed for e.g. some common routines that can be - shared between the formats. - -2011-02-04 Daniel Marjamäki - - * gui/cppcheck_se.ts: GUI: Updated the swedish translation - -2011-02-03 Kimmo Varis - - * gui/gui.pro, gui/mainwindow.cpp, gui/report.h, - gui/resultsview.cpp, gui/xmlreportv2.cpp, gui/xmlreportv2.h: GUI: - Write XML version 2. Ticket #2521 (GUI: Add XML format 2 support) - -2011-02-04 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #2498 (False - positive: redundant assignment) - -2011-02-04 Stefan Weil - - * cli/cmdlineparser.cpp: Add missing \n in CLI help. - -2011-02-04 Daniel Marjamäki - - * lib/checkother.h: Fixed #2531 (False positive: Redudant assignment - to itself) - -2011-02-04 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2503 (false - positive: memory leak (struct member, address is taken)) - -2011-02-04 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: Fixed #2539 - (segmentation fault of cppcheck) - -2011-02-04 Robert Reif - - * lib/checkmemoryleak.cpp: Fixed #2546 (make CheckMemoryLeakInClass - also check structures) - -2011-02-04 Daniel Marjamäki - - * lib/errorlogger.cpp, test/testerrorlogger.cpp: Fixed #2544 (XML - output does not specify encoding used) - -2011-02-04 Kimmo Varis - - * lib/checkother.cpp, lib/checkpostfixoperator.cpp, - lib/checkstl.cpp: Clarify few verbose messages. Dan pointed out to me earlier that he wants both short- and verbose - messages to be independently understandable. So modifying some - verbose messages to be easier to understand without the short - message. - -2011-02-04 Sébastien Debrard - - * : commit 39c68e12cedec7424f64751398f1d6995e689ffe Author: Daniel - Marjamäki Date: Thu Feb 3 22:29:32 2011 - +0100 - -2011-02-03 Daniel Marjamäki - - * lib/check.h, test/testcppcheck.cpp: astyle formatting - -2011-02-03 Tim Gerundt - - * : commit 53492209fc892557a82bd30d72ec555bc21b44cb Author: Tim - Gerundt Date: Thu Feb 3 21:23:03 2011 +0100 - -2011-02-03 Tim Gerundt - - * htdocs/devinfo/index.php: Web: Add 'View all commits' link to - devinfo page - -2011-02-03 Tim Gerundt - - * htdocs/devinfo/index.php: Web: Add last Trac timeline items to - devinfo page - -2011-02-03 Tim Gerundt - - * htdocs/devinfo/index.php: Web: Add RSS link to Trac Timeline - -2011-02-03 Kimmo Varis - - * test/test.vcproj, test/test.vcxproj, test/test.vcxproj.filters: - Update VS 2008/2010 project files for tests. - -2011-02-03 Kimmo Varis - - * cli/cmdlineparser.cpp, cli/pathmatch.cpp, - test/testcmdlineparser.cpp, test/testpathmatch.cpp: Allow to exclude - filenames (with paths). This expands the CLI exclude feature to also allow excluding - filenames (with paths). When filename with recognized extension is - given to -i option then matching filenames (with paths) are ignored - when checking. Ticket #2538 (Allow excluding files from the checking) - -2011-02-03 Kimmo Varis - - * cli/filelister.h, cli/filelister_unix.cpp: Make - FileLister::acceptFile() a static method. We don't need different acceptFile() implementations per platform so - it is better to have one static method. - -2011-02-03 Kimmo Varis - - * test/testerrorlogger.cpp: Add test for XML format version 2. - -2011-02-03 Kimmo Varis - - * cli/pathmatch.cpp, test/testpathmatch.cpp: Tighten the directory - name mathing with -i. Only match full directory names as parts of whole paths. So -isrc - matches src/file.cpp and proj/src/file.cpp. But does not match - mysrc/file.cpp or proj/srcfiles/file.cpp. - -2011-02-03 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2536 - (cppcheck hangs with 100% cpu load) - -2011-02-03 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h, test/testclass.cpp: - Fixed #2537 (segmentation fault of cppcheck) - -2011-02-02 Raphael Geissert - - * rules/error-reporting.xml, rules/stl.xml: Add a few more rules - -2011-02-02 Raphael Geissert - - * rules/token-matching.xml: Add rules for tokAt(0) and strAt(0), - suggested by reif - -2011-02-02 Kimmo Varis - - * test/test.pro: Add testsymboldatabase.cpp to test.pro. Also add comment explaining omitting testfilelister_unix.cpp. - -2011-02-02 Raphael Geissert - - * lib/tokenize.cpp: A few more Token::Match -> ::simpleMatch - replacements - -2011-02-02 Raphael Geissert - - * rules/token-matching.xml: Yet another tweak to the regex, use - ungreedy mode - -2011-02-02 Raphael Geissert - - * lib/checkbufferoverrun.cpp, lib/checkclass.cpp, - lib/checkmemoryleak.cpp, lib/checknullpointer.cpp, - lib/checkother.cpp, lib/checkstl.cpp, lib/symboldatabase.cpp, - lib/tokenize.cpp: Use Token::simpleMatch where no special patterns - are needed - -2011-02-02 Raphael Geissert - - * lib/cppcheck.cpp: Try to match custom rules as many times as - possible, not just once - -2011-02-02 Raphael Geissert - - * lib/cppcheck.cpp: Remove uneeded indentation - -2011-02-02 Raphael Geissert - - * lib/checkautovariables.cpp, lib/checkbufferoverrun.cpp, - lib/checkclass.cpp, lib/checkmemoryleak.cpp, - lib/checknullpointer.cpp, lib/checkother.cpp, lib/checkstl.cpp, - lib/executionpath.cpp, lib/preprocessor.cpp, lib/tokenize.cpp: Use - Token::simpleMatch where no patterns are used - -2011-02-02 Raphael Geissert - - * lib/checkbufferoverrun.cpp, lib/checkclass.cpp, - lib/checkother.cpp, lib/checkstl.cpp, lib/symboldatabase.cpp, - lib/tokenize.cpp: Remove useless spacing at the end of *Match - strings - -2011-02-02 Raphael Geissert - - * rules/token-matching.xml: Also detect useless spacing at the end - of *Match calls - -2011-02-02 Raphael Geissert - - * cli/cmdlineparser.cpp: Support multiple rules in a single XML file - -2011-02-02 Raphael Geissert - - * rules/token-matching.xml: Introduce some rules for checking - cppcheck's use of Token::*Match - -2011-02-02 Kimmo Varis - - * : commit d592250284cdf3f1ded17814c29ea4bae06b3126 Author: Raphael - Geissert Date: Wed Feb 2 10:56:02 2011 -0600 - -2011-02-02 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp, lib/errorlogger.cpp, lib/errorlogger.h, - test/testerrorlogger.cpp: xml2: added element - -2011-02-02 Daniel Marjamäki - - * : commit 1a83e3ef8124cffaa43d900dc4c71b79f7772def Author: Kimmo - Varis Date: Tue Feb 1 23:02:07 2011 +0200 - -2011-02-01 Kimmo Varis - - * cli/pathmatch.cpp: Don't check empty paths for path ignore. - -2011-02-01 Kimmo Varis - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cli/cppcheck.vcxproj.filters, test/test.vcproj, test/test.vcxproj, - test/test.vcxproj.filters: Update VS2008/VS2010 project files. - -2011-02-01 Kimmo Varis - - * Makefile, test/testpathmatch.cpp, tools/dmake.cpp: Run dmake to - update Makefile. - -2011-01-31 Kimmo Varis - - * cli/cli.pro, cli/cmdlineparser.cpp, cli/cmdlineparser.h, - cli/cppcheckexecutor.cpp, cli/pathmatch.cpp, cli/pathmatch.h, - test/test.pro, test/testcmdlineparser.cpp, test/testpathmatch.cpp: - Add CLI support for ignoring paths. Add support for giving list of ignored paths from CLI. This way user - can define paths one doesn't want to check (like generated code). - This first simple implementation only does exact matching, no - support for wildcards etc. And matching is always agains dir names. If the filtered dir name is part of the checked filename then the - file is ignored. Ticket #1690 (Ability to exclude files and directories from checks) - -2011-02-02 Kimmo Varis - - * cli/cmdlineparser.cpp, test/testcmdlineparser.cpp: Imrove - --xml-version option parsing. Allow --xml-version parsing to recognize also version 1 and print - errors about invalid values. - -2011-02-02 Kimmo Varis - - * test/testcmdlineparser.cpp: Add couple of tests for xml-version - cmd line option. - -2011-02-02 Kimmo Varis - - * cli/cmdlineparser.cpp: Expose --xml-version=version cmd line - option. Make the --xml-version=version command line option public by adding - it to the command line help. - -2011-02-02 Greg Hewgill - - * lib/check.h: use instances of less to compare pointers - for list::sort() - -2011-02-02 Greg Hewgill - - * lib/check.h, lib/checkautovariables.h, lib/checkbufferoverrun.h, - lib/checkclass.cpp, lib/checkclass.h, lib/checkexceptionsafety.h, - lib/checkmemoryleak.h, lib/checknullpointer.h, - lib/checkobsoletefunctions.h, lib/checkother.h, - lib/checkpostfixoperator.h, lib/checkstl.h, lib/checkuninitvar.h, - lib/checkunusedfunctions.h: initialise Check::_name in constructor - rather than relying on virtual Check::name() - -2011-02-02 Greg Hewgill - - * test/testcppcheck.cpp: test case to check whether instances are - sorted - -2011-02-02 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #2530 (Tokenizer: Remove redundant 'MyClass::' inside MyClass - class declaration) - -2011-02-02 Sébastien Debrard - - * : commit defeded4b56eb272aa96db1475754a1895724dbe Author: Daniel - Marjamäki Date: Tue Feb 1 21:46:07 2011 - +0100 - -2011-02-01 Tim Gerundt - - * .gitignore: Drop htdocs/ from gitignore - -2011-02-01 Tim Gerundt - - * readme.txt: Switch website URL in readme.txt - -2011-02-01 Tim Gerundt - - * : commit 015fa92b4a98590692c9fefbaf9a7b7df2b5ecd2 Merge: 606a90a - b7494d5 Author: Sébastien Debrard - Date: Tue Feb 1 19:30:00 2011 +0100 - -2011-02-01 Tim Gerundt - - * : commit c2de1a8a52d21a37ee49ecf21be16abc9b3c0f09 Author: Kimmo - Varis Date: Mon Jan 31 22:49:52 2011 +0200 - -2011-02-01 Pete Johns - - * cli/filelister_win32.cpp: Astyle formatting. - -2011-02-01 Pete Johns - - * test/testother.cpp: Turned failing ASSERT_EQUALS into - TODO_ASSERT_EQUALS. - -2011-02-01 Pete Johns - - * : Merge https://github.com/ghewgill/cppcheck - -2011-01-31 Sébastien Debrard - - * : commit 3e558fdada3b42c1af4deeafe4eea04d7e2c14ad Author: - Sébastien Debrard Date: Mon Jan 31 - 23:51:13 2011 +0100 - -2011-01-31 Robert Reif - - * cppcheck.cppcheck, gui/gui.cppcheck: Ticket #2522 (update project - files to fix missing include messages) - -2011-02-01 Greg Hewgill - - * test/testother.cpp: check that misused scope object does not pick - nested class - -2011-01-31 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2525 - (False positive 'Possible null pointer dereference') - -2011-01-31 Daniel Marjamäki - - * cli/filelister_win32.cpp, test/testbufferoverrun.cpp, - test/testpreprocessor.cpp: astyle formatting - -2011-01-31 Ettl Martin - - * : commit f3111b541ee117c09bafd62f8333718e5ddf5bd8 Author: Ettl - Martin Date: Mon Jan 31 13:46:51 2011 +0100 - -2011-01-31 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ja.ts, gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/cppcheck_sr.ts: GUI: - Update translation files. - -2011-01-31 Kimmo Varis - - * gui/settings.ui: GUI: Reword the option for checking all #ifdefs. The current wording was confusing (espcially related to CLI) since - it said the option will make Cppcheck to check all #ifdef configs. - But this really is case only when there is excessive amount of those - configs and without the option some would be ignored. So format the - option text in line of CLI switch and say it is forcing not enabling - checking of all configurations. - -2011-01-31 Kimmo Varis - - * gui/csvreport.cpp, gui/txtreport.cpp: GUI: Write error summary to - CSV and TXT reports. It makes more sense to write the one-line summary to TXT and - especially to CSV reports. Long multi-line verbose messages ruin the - layout these files. - -2011-01-31 Kimmo Varis - - * gui/xmlreport.cpp: GUI: Fill summary data when reading XML file. When reading XML file there is no summary data stored so we must - dublicate the message data to summary. Since message can be long try - to find full stop from the message and cut summary to it. Ticket: #2402 ([GUI] Summary is not shown for loaded .xml file) - -2011-01-31 Kimmo Varis - - * Makefile, tools/dmake.cpp: Cleanup makefile a bit. Align object file lists first line. Remove excessive use of tabs. - -2011-01-30 Raphael Geissert - - * lib/preprocessor.cpp: Formatting, sorry - -2011-01-30 Raphael Geissert - - * lib/preprocessor.cpp: Minor optimisations to the preprocessor - -2011-01-30 Raphael Geissert - - * lib/preprocessor.cpp: Reduce std::string::find() abuse - -2011-01-30 Raphael Geissert - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Handle "#endif - !defined" conditionals - -2011-01-30 Raphael Geissert - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Check for cpp - conditionals where a define is already guaranteed - -2011-01-30 Sébastien Debrard - - * : commit 098f0bf3e659436eedae2655d78eb1867576f728 Author: Pete - Johns Date: Sun Jan 30 22:54:19 2011 +1100 - -2011-01-30 Pete Johns - - * cli/filelister_win32.cpp: astyle formatting. - -2011-01-30 Raphael Geissert - - * lib/checknullpointer.cpp: Detect null pointer dereferences for - many FILE-related functions Ticket #1415: check for calling f{eof,read,close,...} with NULL - -2011-01-30 Raphael Geissert - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Remove duplicated - defines After simplifying define(A) conditionals, the final list of - configurations could end up containing duplicate items. Ticket #1468 - -2011-01-30 Robert Reif - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: less - conservative checking of classes. ticket: #2517 - -2011-01-30 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: - Tokenizer: remove some unhandled macros in the global scope. ticket: - #2523 - -2011-01-29 Sébastien Debrard - - * : commit 0624e418f108835da1c2d243b451438a1497ba06 Author: Daniel - Marjamäki Date: Sat Jan 29 18:46:55 2011 - +0100 - -2011-01-29 Kimmo Varis - - * test/testcmdlineparser.cpp: Several fixes to cmd line tests. There were several tests handling two parameters as one string. Eg. - "-I path" which doesn't work correctly. Fixed these problematic - tests. - -2011-01-29 Kimmo Varis - - * cli/cmdlineparser.cpp, test/testcmdlineparser.cpp: Make - --exitcode-suppressions option consistent. The --exitcode-suppressions option was inconsistent with other long - options by taking the filename as separate argument. Now it expects - format --exitcode-suppressions=filename.txt like other long options. Ticket: #1837 (--suppresions file.txt inconsistent) - -2011-01-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Better - simplifications of static constants - -2011-01-28 Sébastien Debrard - - * : commit 081e3642980aa7809976fddb7ef1a45ea9bf49d4 Author: Kimmo - Varis Date: Fri Jan 28 13:18:07 2011 +0200 - -2011-01-28 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2505 (Check - processing of a preprocessor macro 'FREE') - -2011-01-28 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h, - test/testsymboldatabase.cpp: Symbol database: better unit testing. - ticket: #2468 - -2011-01-28 Kimmo Varis - - * cli/cmdlineparser.cpp: Add --errorlist to CLI help. Fixes ticket #2253 (Make CLI error listing documented and public - switch) - -2011-01-27 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2518 (Crash when - checking rockbox's firmwire) - -2011-01-27 Sébastien Debrard - - * : commit 524498e439b988e1c13a917b4ff59f5a6b797324 Author: Daniel - Marjamäki Date: Thu Jan 27 18:44:20 2011 - +0100 - -2011-01-27 Kimmo Varis - - * test/testcmdlineparser.cpp: Add cmd line parser tests for XML ver - 2 options. - -2011-01-27 Kimmo Varis - - * gui/aboutdialog.cpp: GUI: Update homepage URL to About-dialog. - -2011-01-27 Kimmo Varis - - * cli/cmdlineparser.cpp, cli/cppcheckexecutor.cpp, - test/testcmdlineparser.cpp: Don't stop processing cmd line after - --errorlist. Ticket #2441 (Parsing of command line arguments breaks after - --errorlist) Instead of stopping processing command line options after - --errorlist process them all. This way e.g. --verbose can be given - also after the --errorlist. - -2011-01-27 Kimmo Varis - - * cli/cmdlineparser.cpp, cli/cmdlineparser.h, - cli/cppcheckexecutor.cpp: Don't print "files not found" after - showing help. Fix ticket #2496 (Is error reporting for an unneeded parameter - wrong?) There are several command line options / commands after which we - don't want Cppcheck to even try to open any files. Eg. printing help - or listing errors. So add new attribute for CmdLineParser to track - use of these options and exit before checking files when the - attribute is set. - -2011-01-27 Kimmo Varis - - * gui/erroritem.cpp: Fix formatting of debug messages to log view. Ticket #2513 (GUI: Garbage printed to log after missing include - warning) The linenumber was not properly converted to the QString so there - were garbage printed to the log. - -2011-01-26 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Enable warnings about missing include - files. - -2011-01-26 Sébastien Debrard - - * : commit 078c36921da4c650f0cb4f1edc7e6a56e7126d33 Author: - Sébastien Debrard Date: Wed Jan 26 - 20:10:56 2011 +0100 - -2011-01-26 Sébastien Debrard - - * lib/checkother.cpp, test/testother.cpp: fix #2510 Improve check - 'sizeof for array given as function argument' - -2011-01-26 Sébastien Debrard - - * lib/checkother.cpp: typo: message - -2011-01-25 Tim Gerundt - - * htdocs/index.php, htdocs/site/css/all.css: Web: Add "Download - Now!" link - -2011-01-25 Sébastien Debrard - - * : commit 4cf56dac2b421a2034fe37618fbf81a6f5e903b7 Author: - Sébastien Debrard Date: Tue Jan 25 - 09:57:58 2011 +0100 - -2011-01-24 Sébastien Debrard - - * : commit a596a7a8fe656314ae3686d81894cfd26419ba14 Author: Daniel - Marjamäki Date: Mon Jan 24 21:40:49 2011 - +0100 - -2011-01-24 Sébastien Debrard - - * : commit c7b8bd543f885bb90838ccd4f86c32cc315a7d03 Author: - Sébastien Debrard Date: Mon Jan 24 - 19:04:56 2011 +0100 - -2011-01-24 Daniel Marjamäki - - * cli/cmdlineparser.cpp: cleanup old ifdefs in cmdlineparser - -2011-01-23 Sébastien Debrard - - * : commit 5b5e8ca5182bb34c7b3d4933fd9e515b0e5e07f8 Author: - Sébastien Debrard Date: Sun Jan 23 - 23:09:31 2011 +0100 - -2011-01-23 Robert Reif - - * lib/symboldatabase.cpp: Symbol database: better handling of - functions returning function pointer. ticket: #2468 - -2011-01-23 Sébastien Debrard - - * : commit 86ba9dc908352839af581b1d4db1ef349efd5b2d Author: - Sébastien Debrard Date: Sun Jan 23 - 16:32:33 2011 +0100 - -2011-01-23 Daniel Marjamäki - - * test/testuninitvar.cpp: when using TODO_ASSERT_EQUALS it's a good - idea to pair it with a ASSERT_EQUALS - -2011-01-23 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Upon createLinks error, report error - and bailout - -2011-01-23 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2376 - (simplifyTypedef: upx-ucl) - -2011-01-23 Robert Reif - - * lib/symboldatabase.cpp: Symbol database: fixed corruptions. - ticket: #2468 - -2011-01-23 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2493 - (false positive: (error) Possible null pointer dereference: pExpr) - -2011-01-23 Sébastien Debrard - - * : commit b5cd37e822966c9bed7ff2fdedc8e0ce1ea0d268 Author: - Sébastien Debrard Date: Sun Jan 23 - 03:37:38 2011 +0100 - -2011-01-22 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Fixed #1952 (false negative: buffer - acces out of bounds with memcpy) - -2011-01-22 Debrard Sébastien - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #155 (check size of a variable whose type is a sized array) - -2011-01-22 Sébastien Debrard - - * : commit 0984d556352b0e45d1464e7e9da283c6482ea997 Author: Tim - Gerundt Date: Sat Jan 22 18:05:42 2011 +0100 - -2011-01-22 Sébastien Debrard - - * : commit 8abae6f1e52283454ecebf009811bd77d1943f35 Author: Robert - Reif Date: Sat Jan 22 17:43:36 2011 +0100 - -2011-01-22 Daniel Marjamäki - - * lib/checkclass.cpp: Class: better check if there are friends. - ticket: #2459 - -2011-01-22 Sébastien Debrard - - * : commit 000e03c85dba722844c8f4275565584cad212a96 Author: - Sébastien Debrard Date: Sat Jan 22 - 14:06:02 2011 +0100 - -2011-01-22 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2492 (False - positive: memory leak 'return &self->foo;') - -2011-01-22 Daniel Marjamäki - - * lib/checkclass.cpp, test/testunusedprivfunc.cpp: Fixed #2459 - (False positive with unused private function and friend) - -2011-01-22 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed #2484 (false positive because template is - not instantiated properly) - -2011-01-22 Sébastien Debrard - - * lib/checkother.cpp, test/testother.cpp: ticket 155 - -2011-01-22 Sébastien Debrard - - * : commit bc31f317bca078d3025b331b7b109ec160ba6b66 Author: Daniel - Marjamäki Date: Sat Jan 22 09:27:16 2011 - +0100 - -2011-01-22 Robert Reif - - * lib/symboldatabase.cpp: Symbol database: Fixed memory leak. - ticket: #2468 - -2011-01-22 Robert Reif - - * lib/tokenize.cpp: Tokenizer: Only create 1 symbol database. - ticket: #2468 - -2011-01-22 Sébastien Debrard - - * : commit a83aced2ec9c97b571b34f64c487343fc0fee96e Author: Ettl - Martin Date: Fri Jan 21 23:48:42 2011 +0100 - -2011-01-21 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: dmake and Makefile updates - -2011-01-21 Sébastien Debrard - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: ticket - 155 - -2011-01-21 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #2478 (Crash when - trying to analyze files (CheckClass::checkReturnPtrThis)) - -2011-01-21 Sébastien Debrard - - * : commit bcfc751056e03574da70c84c8cc7a3fec46afd17 Author: - Sébastien Debrard Date: Fri Jan 21 - 19:50:59 2011 +0100 - -2011-01-21 Daniel Marjamäki - - * Makefile: Makefile: updated with dmake - -2011-01-21 Robert Reif - - * lib/checkclass.cpp, lib/checkmemoryleak.cpp, lib/checkother.cpp, - lib/symboldatabase.cpp, lib/symboldatabase.h, lib/tokenize.cpp: - Symbol database: rename variables. ticket: #2468 - -2011-01-20 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #2488 (false positive - with updating iterator in a for loop) - -2011-01-20 Daniel Marjamäki - - * cli/cmdlineparser.cpp: CLI: updated help text for --inline-suppr. - Thanks rubicon_hdr for the suggestion - -2011-01-20 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #2481 (false positive - with break: After insert, the iterator '*' may be invalid) - -2011-01-20 Robert Reif - - * lib/symboldatabase.cpp: Symbol database: refactoring of - classAndStructTypes parsing. ticket: #2468 - -2011-01-19 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #2481 (false positive - with 'break;': After insert, the iterator '*' may be invalid) - -2011-01-19 Daniel Marjamäki - - * test/testincompletestatement.cpp: added unit test for #2482 - -2011-01-19 Daniel Marjamäki - - * lib/checkother.cpp, test/testincompletestatement.cpp: Fixed #2462 - (false positive: (warning) Redundant code: Found a statement that - begins with numeric constant) - -2011-01-19 Pete Johns - - * lib/checkclass.cpp, test/testunusedprivfunc.cpp: Fixed #2480 - (false positive on unused private function) - -2011-01-19 Daniel Marjamäki - - * lib/symboldatabase.h: Fixed #2483 (SymbolDatabase compiler warning - (VS2008/VS2010)) - -2011-01-18 Kimmo Varis - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cli/cppcheck.vcxproj.filters, test/test.vcproj, test/test.vcxproj, - test/test.vcxproj.filters: Update Visual Studio project files. Update Visual Studio 2008/2010 project files after moving - filelister* files from lib/ to cli/. - -2011-01-18 Kimmo Varis - - * Makefile, cli/cli.pro, cli/filelister.cpp, cli/filelister.h, - cli/filelister_unix.cpp, cli/filelister_unix.h, - cli/filelister_win32.cpp, cli/filelister_win32.h, lib/cppcheck.cpp, - lib/filelister.cpp, lib/filelister.h, lib/filelister_unix.cpp, - lib/filelister_unix.h, lib/filelister_win32.cpp, - lib/filelister_win32.h, lib/lib.pri, lib/tokenize.cpp, - test/test.pro, tools/Makefile, tools/dmake.cpp: Move filelister* to - cli. Ticket #2445 (Move FileLister classes from LIB to CLI). - -2011-01-18 Kimmo Varis - - * lib/filelister.h, lib/filelister_unix.cpp, lib/filelister_unix.h, - lib/filelister_win32.cpp, lib/filelister_win32.h, lib/path.cpp, - lib/path.h, lib/tokenize.cpp: Move sameFileName() method to Path - class. Ticket #2445 (Move FileLister classes from LIB to CLI). Moving - sameFileName() to Path allows moving FileLister* classes to CLI. - -2011-01-18 Pete Johns - - * test/testunusedprivfunc.cpp: Added testDoesNotIdentifyCallback for - #2480 TODO - -2011-01-18 Pete Johns - - * : commit ea01c04108052921e29b81b84b6497c8670f2107 Author: Pete - Johns Date: Tue Jan 18 21:07:33 2011 +1100 - -2011-01-18 Pete Johns - - * lib/symboldatabase.cpp: Refactored to remove code duplication. - -2011-01-18 Pete Johns - - * lib/symboldatabase.cpp, test/testsymboldatabase.cpp: Made - isVariableDeclarationIdentifiesTemplatedPointerToPointerVariable() - pass. And added isVariableDeclarationIdentifiesTemplatedArrayVariable() - (passing) into the bargain. - -2011-01-18 Pete Johns - - * test/testsymboldatabase.cpp: Added TODO test cases for template - variables with multiple levels of pointer indirection Following email from Robert Reif - -2011-01-18 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testconstructors.cpp: - Fixed #2474 (false positive: Member variable 'A::m_SemVar' is not - initialised in the constructor.) - -2011-01-18 Robert Reif - - * lib/checkclass.cpp, lib/checkmemoryleak.cpp, - lib/symboldatabase.cpp, lib/symboldatabase.h: Symbol database: - Refactor the variables API. ticket: #2468 - -2011-01-17 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #2475 (False - positive in structure initialisation: The scope of the variable bits - can be reduced) - -2011-01-17 Kimmo Varis - - * cli/cmdlineparser.cpp, test/testcmdlineparser.cpp: Improve - checking -D arguments for command line. - -2011-01-17 Kimmo Varis - - * cli/cmdlineparser.cpp, test/testcmdlineparser.cpp: Fix crash when - giving -D without argument. Fixes ticket #2476 (Crash when -D used without parameters.) - -2011-01-17 Daniel Marjamäki - - * lib/checknullpointer.cpp, lib/checknullpointer.h, - lib/checkuninitvar.cpp, test/testnullpointer.cpp: Fixed #2467 (false - positive: possible nullptr dereference) - -2011-01-17 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2473 (False - positive: Memory leak when there is local struct) - -2011-01-17 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, lib/checkmemoryleak.cpp, - lib/checkmemoryleak.h, lib/checkother.cpp, lib/symboldatabase.cpp, - lib/symboldatabase.h, lib/tokenize.cpp, test/testsymboldatabase.cpp: - Symbol database: renamed classes. ticket: #2468 - -2011-01-17 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, lib/checkmemoryleak.cpp, - lib/checkmemoryleak.h, lib/checkother.cpp, lib/symboldatabase.cpp, - lib/symboldatabase.h, lib/tokenize.cpp, test/testsymboldatabase.cpp: - Symbol database: pulled out classes into global scope. ticket: #2468 - -2011-01-16 Zachary Blair - - * lib/checkother.cpp: Fixed #2457 - (CheckOther::checkIncorrectLogicOperator: hang if variable id is 0) - -2011-01-17 Pete Johns - - * lib/preprocessor.cpp: Fixed gcc warning. - -2011-01-02 Pete Johns - - * lib/symboldatabase.cpp, lib/symboldatabase.h, - test/testsymboldatabase.cpp: isVariableDeclaration() now detects - template variables. - -2011-01-01 Pete Johns - - * lib/symboldatabase.cpp, lib/symboldatabase.h, test/testclass.cpp, - test/testsymboldatabase.cpp: Moved array declaration detection into - isVariableDeclaration() - -2011-01-16 Daniel Marjamäki - - * lib/checkautovariables.cpp, lib/checkother.cpp, - lib/symboldatabase.cpp, lib/symboldatabase.h: Refactoring: Check if - type is class/struct through symbol database - -2011-01-16 Daniel Marjamäki - - * lib/checkother.cpp, test/testcppcheck.cpp: Fixed #2302 (Duplicate - id 'unusedVariable') - -2011-01-16 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, lib/checkmemoryleak.cpp, - lib/checkmemoryleak.h, lib/checkother.cpp, lib/tokenize.cpp, - lib/tokenize.h: Symbol database: increased constness. ticket: #2468 - -2011-01-16 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h, - lib/cppcheck.cpp: cppcheck: output errorlist to stdout - -2011-01-16 Daniel Marjamäki - - * test/testcppcheck.cpp: testcppcheck: check that - Cppcheck::getErrorMessages output is not empty - -2011-01-16 Daniel Marjamäki - - * test/testcppcheck.cpp: testcppcheck: test - Cppcheck::getErrorMessages - -2011-01-16 Daniel Marjamäki - - * test/testcppcheck.cpp: testcppcheck: cleanup - -2011-01-16 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, lib/symboldatabase.cpp, - lib/symboldatabase.h: Symbol database: Refactorings. Move - check-specific code to check. Ticket: #2468 - -2011-01-16 Daniel Marjamäki - - * test/testcppcheck.cpp: testcppcheck: removed 'parseArgsAndCheck' - and 'parseOutputtingArgs'. Such tests belong to testcmdlineparser - -2011-01-16 Daniel Marjamäki - - * test/testcppcheck.cpp: testcppcheck: removed nonexistingpath and - include tests. The Cppcheck class doesn't handle this. - -2011-01-16 Daniel Marjamäki - - * test/testcppcheck.cpp: testcppcheck: the xml and template output - is tested in testerrorlogger instead - -2011-01-16 Daniel Marjamäki - - * test/testcppcheck.cpp: testcppcheck: the testcmdlineparser tests - invalid command line arguments - -2011-01-16 Daniel Marjamäki - - * test/testcppcheck.cpp: testcppcheck: linenumbers are tested in the - other tests - -2011-01-16 Daniel Marjamäki - - * test/testcppcheck.cpp: testcppcheck: command line parsing of -D is - tested in testcmdlineparser.cpp - -2011-01-16 Daniel Marjamäki - - * test/testcppcheck.cpp: testcppcheck: parsing templates is tested - in testcmdlineparser.cpp - -2011-01-16 Tim Gerundt - - * htdocs/devinfo/index.php, htdocs/site/js/github.js: Web: Add - recent commits to devinfo page - -2011-01-16 Daniel Marjamäki - - * lib/checkclass.cpp, test/testunusedprivfunc.cpp: Fixed #2407 - (False positive: unused private function) - -2011-01-16 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2449 (segfault in - tokenize.cpp, incorrect parsing) - -2011-01-16 Raphael Geissert - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: simplify - restrict - -2011-01-16 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #980 (false - negative: division by zero when using enum) - -2011-01-16 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, lib/symboldatabase.cpp, - lib/symboldatabase.h, test/testclass.cpp: Symbol database: - Refactorings - -2011-01-16 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: astyle formatting - -2011-01-16 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Memory leaks: Optimised and refactored - -2011-01-15 Daniel Marjamäki - - * lib/checkstl.cpp: STL: Optimised checking - -2011-01-15 Daniel Marjamäki - - * lib/checkother.cpp: fixed unit test - -2011-01-15 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h: Optimising: about 5% - improvement with Visual Studio executable - -2011-01-15 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2463 - (false positive: possible nullpointer dereference) - -2011-01-15 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2454 - (Tokenizer::simplifyKnownVariables: problem with float/double - variables) - -2011-01-15 Daniel Marjamäki - - * test/testtokenize.cpp: removed old comment - -2011-01-15 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2466 - (Tokenizer: simplification of enum) - -2011-01-15 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2464 (False - positive: not initialised/not assigned Static variable in copy - constructors.) - -2011-01-15 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h, test/testclass.cpp: - Fixed #2465 (False positive: not initialised variable, but there is - default constructor for it.) - -2011-01-14 Tim Gerundt - - * htdocs/index.php, htdocs/site/css/all.css, - htdocs/site/simplepie/LICENSE.txt, - htdocs/site/simplepie/README.txt, - htdocs/site/simplepie/cache/dummy.txt, - htdocs/site/simplepie/simplepie.inc: Web: Add News to homepage - -2011-01-14 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #2451 (False positive - when incrementing map value via iterator) - -2011-01-14 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2452 (syntax - error when 'void f(typedef int x)' is used. causes segmentation - fault.) - -2011-01-13 Kimmo Varis - - * gui/settingsdialog.cpp: GUI: Fix compiler warning from GCC. Thanks for vBm for reporting this! - -2011-01-13 Kimmo Varis - - * lib/cppcheck.h: Fix doxgen comment. - -2011-01-13 Kimmo Varis - - * cli/cmdlineparser.cpp, cli/cppcheckexecutor.cpp: Add couple of - missing path separator conversions. - -2011-01-13 Kimmo Varis - - * lib/cppcheck.cpp, lib/cppcheck.h: Modify Cppcheck::addFile() only - take one file as a parameter. CLI and GUI already do the directory walking for us and we have list - of files to check. So we were duplicating this directory walking. - Practically doing check again for each file if it is a directory. - Which can take some time with large amount of files. - -2011-01-13 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #2450 (False positive - when iterator reused) - -2011-01-13 Daniel Marjamäki - - * lib/checkother.cpp, test/testincompletestatement.cpp: Fixed #2458 - (false positive: (warning) Redundant code: Found a statement that - begins with numeric constant) - -2011-01-12 Zachary Blair - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2434 (FP - memleakOnRealloc) - -2011-01-11 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #2440 (False negative: basic memory - leak) - -2011-01-11 Kimmo Varis - - * cli/cmdlineparser.cpp, cli/cppcheckexecutor.cpp, - lib/preprocessor.cpp, test/testcmdlineparser.cpp: Accept include - paths ending with backslash. Convert include path to use internal path separators when parsing - command line. Convert back to native separators when using paths. Ticket #2448 (Error in handling -I command line parameter) - -2011-01-11 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2296 (Tokenizer: - simplifyKnownVariable doesn't simplify pointer properly 'delete [] - p;') - -2011-01-11 Tim Gerundt - - * htdocs/devinfo/index.php: Web: Add Atom link to Recent Commits to - cppcheck:master - -2011-01-10 Daniel Marjamäki - - * scripts/define.pl: scripts: Added define.pl that warns if #define - is used. Related with ticket #689 - -2011-01-10 Daniel Marjamäki - - * htdocs/build.bat: removed unused htdocs/build.bat - -2011-01-10 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2443 - (Possible null pointer dereference: xxx - otherwise it is redundant - to check if xxx is null at line) - -2011-01-10 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2442 (False - positive: Memory leak when function returns in 'if' instead of 'else - if') - -2011-01-10 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ja.ts, gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/cppcheck_sr.ts: GUI: - Update translation files. - -2011-01-10 Kimmo Varis - - * gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h: GUI: Remove - Language-menu. We now have language selection in Settings-dialog. - -2011-01-10 Kimmo Varis - - * gui/mainwindow.cpp, gui/settings.ui, gui/settingsdialog.cpp, - gui/settingsdialog.h, gui/translationhandler.cpp: GUI: Add language - selection panel to settings-dialog. Settings-dialog is more natural place for language selection than - the main menu. We also have more space and freedom there to have - longer text etc to make the selection easier (menus are quite - limited controls). - -2011-01-09 Reijo Tomperi - - * cli/cmdlineparser.cpp, cli/cmdlineparser.h, - cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h, cli/main.cpp, - cli/threadexecutor.cpp, cli/threadexecutor.h, gui/aboutdialog.cpp, - gui/aboutdialog.h, gui/applicationdialog.cpp, - gui/applicationdialog.h, gui/applicationlist.cpp, - gui/applicationlist.h, gui/checkstatistics.cpp, - gui/checkstatistics.h, gui/checkthread.cpp, gui/checkthread.h, - gui/common.h, gui/csvreport.cpp, gui/csvreport.h, - gui/erroritem.cpp, gui/erroritem.h, gui/filelist.cpp, - gui/filelist.h, gui/fileviewdialog.cpp, gui/fileviewdialog.h, - gui/helpwindow.cpp, gui/helpwindow.h, gui/logview.cpp, - gui/logview.h, gui/main.cpp, gui/mainwindow.cpp, gui/mainwindow.h, - gui/project.cpp, gui/project.h, gui/projectfile.cpp, - gui/projectfile.h, gui/projectfiledialog.cpp, - gui/projectfiledialog.h, gui/report.cpp, gui/report.h, - gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.cpp, - gui/resultsview.h, gui/settingsdialog.cpp, gui/settingsdialog.h, - gui/statsdialog.cpp, gui/statsdialog.h, gui/threadhandler.cpp, - gui/threadhandler.h, gui/threadresult.cpp, gui/threadresult.h, - gui/translationhandler.cpp, gui/translationhandler.h, - gui/txtreport.cpp, gui/txtreport.h, gui/xmlreport.cpp, - gui/xmlreport.h, lib/check.h, lib/checkautovariables.cpp, - lib/checkautovariables.h, lib/checkbufferoverrun.cpp, - lib/checkbufferoverrun.h, lib/checkclass.cpp, lib/checkclass.h, - lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h, - lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - lib/checknullpointer.cpp, lib/checknullpointer.h, - lib/checkobsoletefunctions.cpp, lib/checkobsoletefunctions.h, - lib/checkother.cpp, lib/checkother.h, lib/checkpostfixoperator.cpp, - lib/checkpostfixoperator.h, lib/checkstl.cpp, lib/checkstl.h, - lib/checkuninitvar.cpp, lib/checkuninitvar.h, - lib/checkunusedfunctions.cpp, lib/checkunusedfunctions.h, - lib/cppcheck.cpp, lib/cppcheck.h, lib/errorlogger.cpp, - lib/errorlogger.h, lib/executionpath.cpp, lib/executionpath.h, - lib/filelister.cpp, lib/filelister.h, lib/filelister_unix.cpp, - lib/filelister_unix.h, lib/filelister_win32.cpp, - lib/filelister_win32.h, lib/mathlib.cpp, lib/mathlib.h, - lib/path.cpp, lib/path.h, lib/preprocessor.cpp, lib/preprocessor.h, - lib/settings.cpp, lib/settings.h, lib/symboldatabase.cpp, - lib/symboldatabase.h, lib/timer.cpp, lib/timer.h, lib/token.cpp, - lib/token.h, lib/tokenize.cpp, lib/tokenize.h, man/cppcheck.1.xml, - test/testautovariables.cpp, test/testbufferoverrun.cpp, - test/testcharvar.cpp, test/testclass.cpp, - test/testcmdlineparser.cpp, test/testconstructors.cpp, - test/testcppcheck.cpp, test/testdivision.cpp, - test/testerrorlogger.cpp, test/testexceptionsafety.cpp, - test/testfilelister_unix.cpp, test/testincompletestatement.cpp, - test/testmathlib.cpp, test/testmemleak.cpp, - test/testnullpointer.cpp, test/testobsoletefunctions.cpp, - test/testother.cpp, test/testpath.cpp, - test/testpostfixoperator.cpp, test/testpreprocessor.cpp, - test/testrunner.cpp, test/testsettings.cpp, - test/testsimplifytokens.cpp, test/teststl.cpp, test/testsuite.cpp, - test/testsuite.h, test/testsymboldatabase.cpp, - test/testthreadexecutor.cpp, test/testtoken.cpp, - test/testtokenize.cpp, test/testuninitvar.cpp, - test/testunusedfunctions.cpp, test/testunusedprivfunc.cpp, - test/testunusedvar.cpp, test/testutils.h, tools/dmake.cpp: Change - year 2010 -> 2011 in license texts. - -2011-01-09 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #1219 - (improve check: null pointer not detected 'if (p) return; *p = 0;') - -2011-01-09 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2211 (false negative: buffer access out of bounds for(int i=0; i - !=6;i++)) - -2011-01-09 Daniel Marjamäki - - * test/testtokenize.cpp: astyle formatting - -2011-01-09 Tim Gerundt - - * htdocs/devinfo/index.php: Web: Change title from devinfo page - -2011-01-09 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2429 (Tokenizer: - Wrong simplification of 'sizeof .1250E+04') - -2011-01-09 Daniel Marjamäki - - * cli/cmdlineparser.cpp, cli/cppcheckexecutor.cpp, - lib/filelister.h, lib/filelister_unix.cpp, lib/filelister_unix.h, - lib/filelister_win32.cpp, lib/filelister_win32.h: Fixed #2409 (print - a warning if provided path (commandline option -I [PATH]) does not - exist) - -2011-01-08 Tim Gerundt - - * htdocs/index.php: Web: Add RSS link to project news - -2011-01-08 Tim Gerundt - - * htdocs/site/css/all.css: Web: Tweak style sheets for printing - -2011-01-08 Tim Gerundt - - * htdocs/index.php: Web: Add meta description to homepage - -2011-01-08 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2437 - (false positive: possible null pointer dereference: tok2) - -2011-01-08 Tim Gerundt - - * htdocs/devinfo/index.php: Web: Add "Source Code" paragraph to - devinfo page - -2011-01-08 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Error message: - Replace " with ' around variable name - -2011-01-08 Daniel Marjamäki - - * man/buildman.sh: buildman: build writing-rules-3.pdf - -2011-01-08 Daniel Marjamäki - - * man/writing-rules-3.docbook: Writing rules: minor tweak for the - C++ intro - -2011-01-08 Daniel Marjamäki - - * man/writing-rules-3.docbook: Writing rules: Added one more example - for the C++ intro - -2011-01-08 Daniel Marjamäki - - * lib/checkother.cpp: Fixed #2433 (strtol: false positive when - strtol isn't used in function call) - -2011-01-07 Daniel Marjamäki - - * gui/erroritem.h, lib/filelister_win32.cpp, lib/preprocessor.cpp: - astyle formatting - -2011-01-07 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, test/testexceptionsafety.cpp: Fixed - #2428 (false alarm with code containing a throw clause) - -2011-01-07 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: fix bug when determining - location when there is a missing include. ticket: #2326 - -2011-01-07 Robert Reif - - * test/testclass.cpp: Fixed #2425 (segmentation fault of cppcheck) - -2011-01-07 Tim Gerundt - - * : commit 9fbbb910901ba2df61b79799024efeae34a8d415 Author: Tim - Gerundt Date: Fri Jan 7 16:04:01 2011 +0100 - -2011-01-07 Tim Gerundt - - * htdocs/.htaccess, htdocs/devinfo/index.php, htdocs/index.php: Web: - Move devinfo.html to a new place - -2011-01-07 Tim Gerundt - - * htdocs/site/css/all.css: Web: Add separator to tab items - -2011-01-07 Tim Gerundt - - * htdocs/index.php, htdocs/site/css/all.css: Web: Move style sheets - to own file - -2011-01-07 Ettl Martin - - * lib/filelister_win32.cpp, test/testmathlib.cpp: #ticket 2429: - added a test to the mathlib to ensure the used floating point number - is recognized correctly - -2011-01-07 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2426 (### - Internal error in Cppcheck. Please report it.) - -2011-01-07 Robert Reif - - * lib/symboldatabase.cpp: Fixed #2425 (segmentation fault of - cppcheck) - -2011-01-06 Daniel Marjamäki - - * scripts/comment.pl: scripts: update 'comment.pl' so it understand - /* - -2011-01-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: simplify NULL - to 0 in the normal token list - -2011-01-06 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h: Preprocessor: Reverted - fix for #2131, it didn't work well so a better fix is needed - -2011-01-06 Kimmo Varis - - * gui/erroritem.h: GUI: Add comment about storing paths. - -2011-01-06 Kimmo Varis - - * gui/resultstree.cpp: GUI: Convert path to native separators before - copying it. Ticket #2424 (Windows GUI: "Copy full path" doesn't copy the visible - full path if it has been changed in preferences) We keep paths internally with / separator and only convert to native - separators (for Windows) when showing them. Conversion was missing - from path copying function. - -2011-01-06 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: memsetZeroBytes: improved - error message. ticket: #2421 - -2011-01-06 Tim Gerundt - - * : commit 70a29ccb8a5e5a40435b5c00c3755aaaa9ad21d2 Author: Tim - Gerundt Date: Thu Jan 6 13:32:04 2011 +0100 - -2011-01-06 Daniel Marjamäki - - * lib/checknullpointer.cpp: Null pointers: Added comments - -2011-01-06 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Buffer overrun: Added comments - -2011-01-06 Daniel Marjamäki - - * scripts/comment.pl: scripts: reduced false positives given by - 'comments.pl'. given when declaring operator= - -2011-01-06 Daniel Marjamäki - - * lib/checkstl.cpp: CheckStl: Added comments - -2011-01-06 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: simple refactorings. and added a few - comments - -2011-01-06 Daniel Marjamäki - - * test/testother.cpp: astyle formatting - -2011-01-06 Raphael Geissert - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: [PATCH] - Check for calls to memset() where 0 bytes are to be filled Inspired - by Silvio Cesare's work - -2011-01-06 Daniel Marjamäki - - * scripts/magic-numbers.pl: scripts: improved the 'magic-numbers.pl' - script - -2011-01-06 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2413 - (fflush() with NULL argument is valid.) - -2011-01-06 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: Fixed #2415 (false - positive: Member variable not initialized in constructor calling - assignment operator) - -2011-01-06 Robert Reif - - * test/testsimplifytokens.cpp: typedef: fixed problem. ticket: #2414 - -2011-01-05 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Enable information messages. Dan added new enable-flag for information messages in commit - 033e759. Enable that flag for GUI so that the information messages - are visible in the GUI. - -2011-01-05 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2411 - (possible null pointer dereference (aborting via function pointer - not detected)) - -2011-01-05 Daniel Marjamäki - - * cli/cmdlineparser.cpp, lib/checkclass.cpp, lib/checkother.cpp, - lib/settings.cpp, test/testclass.cpp, test/testother.cpp: command - line: added 'information' id to enable - -2011-01-05 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2401 (false - positive: Uninitialized variable: result) - -2011-01-05 Daniel Marjamäki - - * lib/executionpath.cpp, test/teststl.cpp, test/testuninitvar.cpp: - Uninitialized variables. Fixed false positive when there are - multiple related conditions. ticket: #2399 - -2011-01-05 Tim Gerundt - - * : commit a0d62e041f426e2c4ce14c5e2880f96dcfb2d4f6 Author: Daniel - Marjamäki Date: Wed Jan 5 19:38:22 2011 - +0100 - -2011-01-05 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2412 - (typedef: struct with inheritance) - -2011-01-05 Robert Reif - - * lib/tokenize.cpp: typedef: better handling. ticket: #2414 - -2011-01-05 Zachary Blair - - * lib/checkobsoletefunctions.h: Removed an unnecessary newline in - the message. Ticket #2343 - -2011-01-04 Zachary Blair - - * lib/checkobsoletefunctions.h: Fixed #2343 (The ftime obsolete - function warning seems wrong) - -2011-01-05 Tim Gerundt - - * htdocs/index.php: Web: Add a first version of a website - -2011-01-04 Kimmo Varis - - * lib/checkstl.cpp, test/teststl.cpp: Improve suspicious condition - (string::find) message. See forum thread: - https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192 - -2011-01-04 Kimmo Varis - - * lib/checkstl.cpp, test/teststl.cpp: Improve dangerous iterator - usage (after erase()) message. See forum thread: - https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192 - -2011-01-03 Kimmo Varis - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Improve - strncat 3rd parameter usage warning message. See forum thread: - https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192 - -2011-01-04 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Fixed #2399 - (Tokenizer::simplifyKnownVariables: variables in conditions) - -2011-01-04 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2398 (false - positive: Uninitialized variable) - -2011-01-04 Daniel Marjamäki - - * scripts/comment.pl, scripts/magic-numbers.pl, scripts/readme.txt: - scripts: added a two simple perl scripts for checking code. - -2011-01-04 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Fixed #2393 (Token::Match called with - varid 0) - -2011-01-04 Daniel Marjamäki - - * : commit 85897c3991cacbceab2d121b989d6de9664f9f76 Merge: 45b6d09 - 2b1ec9a Author: Daniel Marjamäki - Date: Tue Jan 4 18:17:39 2011 +0100 - -2011-01-04 Daniel Marjamäki - - * man/writing-rules-3.docbook: Writing rules: Added part 3. - Introduction to writing rules with C++. - -2011-01-04 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - typedef: delete unhandled typedefs. ticket: #2348 - -2011-01-04 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: typedef: fix - testcase 4. ticket: #2375 - -2011-01-04 Robert Reif - - * lib/tokenize.cpp: Fixed #2400 (Tests crashing in Windows) - -2011-01-03 Raphael Geissert - - * lib/checkmemoryleak.cpp: Mention the name of the variable in the - inconclusive leak msg - -2011-01-03 Markus Elfring - - * lib/checkclass.cpp, test/testclass.cpp, test/testconstructors.cpp: - Fixed #2389 (mistakable warning from 'CheckClass::uninitVarError') - -2011-01-03 Markus Elfring - - * lib/checkother.cpp, test/testother.cpp: Bug #2390: Enclose the - output of a variable name with quotes in - "CheckOther::variableScopeError" The variable name output was enclosed by quotation marks in the - member function "CheckOther::variableScopeError" and corresponding - test functions. Signed-off-by: Markus Elfring - -2011-01-02 Raphael Geissert - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Simplify "x = - realloc (0, n);" to "x = malloc(n);" - -2011-01-02 Raphael Geissert - - * lib/tokenize.cpp: Move simplification of realloc after - simplification of math ops - -2011-01-02 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: typedef: Fixed - testcase. ticket: #2375 - -2011-01-02 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Buffer overruns: Added comments - -2011-01-02 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2392 - (Preprocessor: Wrong simplification of __VA_ARGS__) - -2011-01-02 Daniel Marjamäki - - * test/testpreprocessor.cpp: Added TODO testcase for ticket #2392 - (Preprocessor: Wrong simplification of __VA_ARGS__) - -2011-01-02 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2391 - (cstdlib file and memory function check misbehavior) - -2011-01-02 Daniel Marjamäki - - * test/testsimplifytokens.cpp: typedef: added more tests. ticket: - #2375 - -2011-01-01 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Fixed #2215 (Improve check: Writing - outside malloc bounds not detected) - -2011-01-01 Daniel Marjamäki - - * lib/tokenize.cpp: typedef: don't simplify typedef after 'case'. it - means that there is a typedef and constant with the same names. - Ticket: #2386 - -2011-01-01 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2246 - (Improve check: Memory leak, function is not noreturn if return - value is taken) - -2011-01-01 Daniel Marjamäki - - * lib/checkuninitvar.cpp: uninitialized variables: Added some - comments - -2011-01-01 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed TODO testcase. Use - symbol database instead of token list. Ticket: #2375 - -2011-01-01 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Added comments in the memory leaks - checking - -2011-01-01 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Memory leaks: localized variables - -2011-01-01 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Added more comments - -2011-01-01 Daniel Marjamäki - - * lib/tokenize.h: Tokenizer: Added doxygen comments - -2011-01-01 Daniel Marjamäki - - * lib/tokenize.h: Tokenizer: added doxygen comments - -2011-01-01 Daniel Marjamäki - - * Makefile, test/testcmdlineparser.cpp, test/testerrorlogger.cpp, - test/testfilelister_unix.cpp, test/testpreprocessor.cpp, - test/testtoken.cpp, tools/dmake.cpp: gcc: disabled -Wconversion - again - too many warnings - -2010-12-31 Zachary Blair - - * lib/checkother.cpp: Fixed #2382 (Catching exceptions by value - instead of reference) - -2010-12-31 Daniel Marjamäki - - * lib/executionpath.cpp, lib/tokenize.cpp, - test/testbufferoverrun.cpp: Fixed #2386 (segmentation fault occurs - in the checking when typedef has same name as an enum constant) - -2010-12-31 Daniel Marjamäki - - * lib/checknullpointer.cpp, lib/checknullpointer.h: Null Pointer: - Refactoring - broke out CheckNullPointer::isPointer - -2010-12-31 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2378 (Refactoring: create utility function that skips redundant - if/for/while) - -2010-12-31 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2385 (False positive: array index out of bounds) - -2010-12-31 Daniel Marjamäki - - * lib/checknullpointer.cpp: astyle formatting - -2010-12-31 Daniel Marjamäki - - * lib/checknullpointer.cpp: added more comments - -2010-12-31 Daniel Marjamäki - - * lib/checknullpointer.cpp: Added comments for - CheckNullPointer::nullPointerLinkedList - -2010-12-31 Daniel Marjamäki - - * lib/checknullpointer.cpp: Remove redundant condition - -2010-12-31 Daniel Marjamäki - - * lib/checknullpointer.cpp: gcc: fixed compiler warning (suggest - parantheses around assignment) - -2010-12-31 Daniel Marjamäki - - * lib/checknullpointer.cpp: Refactoring and commenting - CheckNullPointer::nullPointerAfterLoop - -2010-12-31 Daniel Marjamäki - - * lib/checknullpointer.h: added doxygen comments - -2010-12-31 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h: added - some comments - -2010-12-31 Pete Johns - - * lib/symboldatabase.cpp, lib/symboldatabase.h, test/testclass.cpp, - test/testsymboldatabase.cpp: Fixed #2384 ("The function 's::f' can - be const" reported for pointer-to-pointer) Moved check for pointer variables into isVariableDeclaration() Can now handle multiple scopes and multiple levels of indirection. - Simplified check for strucs and unions, too, reducing the size of - getVarList(). skipScopeIdentifiers() and skipPointers() should probably be methods - on class Token. - -2010-12-31 Daniel Marjamäki - - * cli/threadexecutor.cpp: testrunner: fix runtime problems with - TestThreadExecutor - -2010-12-31 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #2382 (Catching exceptions by value instead of reference) - -2010-12-31 Daniel Marjamäki - - * cppcheck.cbproj, cppcheck.sln, lib/cppcheck.cpp, - lib/symboldatabase.h, lib/tokenize.cpp: Borland C++: Fixed compiler - errors - -2010-12-31 Daniel Marjamäki - - * cli/threadexecutor.cpp, lib/checkbufferoverrun.cpp, - lib/checkuninitvar.cpp, lib/tokenize.cpp: gcc: fixed -Wconversion - errors - -2010-12-31 Daniel Marjamäki - - * lib/symboldatabase.h: gcc: Fixed -Wconversion warnings in symbol - database - -2010-12-31 Daniel Marjamäki - - * lib/tokenize.cpp: gcc: fixed -Wconversion warnings in tokenizer - -2010-12-31 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h: gcc: fixed - -Wconversion warnings - -2010-12-30 Daniel Marjamäki - - * Makefile, test/testmathlib.cpp, test/testsuite.cpp, - test/testsuite.h, tools/dmake.cpp: Added -Wconversion compiler flag. - The ASSERT_EQUALS_DOUBLE was added that can be used when comparing - double values. - -2010-12-30 Daniel Marjamäki - - * lib/checkstl.cpp: improved TODO comments - -2010-12-30 Daniel Marjamäki - - * lib/checkstl.cpp: CheckStl: Added comments - -2010-12-30 Daniel Marjamäki - - * lib/settings.h, lib/tokenize.h: fixed doxygen warnings - -2010-12-30 Daniel Marjamäki - - * lib/cppcheck.cpp: gcc: fixed compiler warning - -2010-12-30 Daniel Marjamäki - - * lib/errorlogger.cpp: Added comments - -2010-12-30 Daniel Marjamäki - - * cli/threadexecutor.cpp: usleep: use nanosleep instead of usleep as - the usleep is obsolete. Ticket: #2283 - -2010-12-30 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Uninitialized - variables: typeof doesn't dereference. Ticket: #2367 - -2010-12-30 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: Better - handling of duplicate enums. Ticket: #2381 - -2010-12-30 Daniel Marjamäki - - * man/writing-rules-2.docbook: writing rules #2: tweaks. published - -2010-12-30 Daniel Marjamäki - - * lib/checkpostfixoperator.cpp, test/testpostfixoperator.cpp: Fixed - #2321 (false positive: (performance) Prefer prefix ++/-- operators - for non-primitive types.) - -2010-12-30 Daniel Marjamäki - - * man/cppcheck-design.docbook: Cppcheck design: more tweaks - -2010-12-30 Daniel Marjamäki - - * man/writing-rules-1.docbook, man/writing-rules-2.docbook: writing - rules: more tweaks - -2010-12-30 Pete Johns - - * Makefile, lib/symboldatabase.cpp, lib/symboldatabase.h, - test/testsymboldatabase.cpp, test/testtoken.cpp, test/testutils.h: - Refactoring following #2377 (Technically the member function xxx can - be const) symboldatabase now recognises variables with arbitrarily many - scopes. Extracted method isVariableDeclaration() Added unit tests for isVariableDeclaration in new file - testsymboldatabase.cpp Extracted givenACodeSampleToTokenize helper class into testutils.h - to reduce duplication. - -2010-12-30 Pete Johns - - * lib/symboldatabase.cpp, test/testclass.cpp: Fixed #2377 - (Technically the member function xxx can be const) TODO: Add unit test for getVarList() and refactor variable check. [Removed my testcase for #2377 and removed two TODOs.] - -2010-12-30 Ettl Martin - - * test/testclass.cpp: const correctness: added further testcases for - increment/decrement member functions - -2010-12-30 Ettl Martin - - * test/testclass.cpp: ticket 2377: added further testcases - -2010-12-30 Ettl Martin - - * : commit c29824fc4936e100057d37393fcccdfd6bec8f5f Author: Ettl - Martin Date: Thu Dec 30 01:29:09 2010 +0100 - -2010-12-30 Pete Johns - - * build.txt: Added Mac OSX build instructins for PCRE. - -2010-12-29 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2374 (False - 'memory leak' report (assigning to map in subfunction)) - -2010-12-29 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: simplifyTypedef: - Better handling of 'typedef int RexxFunctionHandler();'. Ticket: - #2348 - -2010-12-29 Robert Reif - - * lib/symboldatabase.cpp, lib/tokenize.cpp, test/testclass.cpp: - simplifyTypedef: operator typedef. Ticket: #2375 - -2010-12-29 Daniel Marjamäki - - * man/cppcheck-design.docbook: Cppcheck Design: some more tweaks - -2010-12-29 Daniel Marjamäki - - * cli/cmdlineparser.cpp, cli/cppcheckexecutor.cpp, lib/check.h, - lib/checkautovariables.h, lib/checkbufferoverrun.h, - lib/checkclass.h, lib/checkexceptionsafety.h, - lib/checkmemoryleak.h, lib/checknullpointer.h, - lib/checkobsoletefunctions.h, lib/checkother.h, - lib/checkpostfixoperator.h, lib/checkstl.h, lib/checkuninitvar.h, - lib/checkunusedfunctions.h, lib/cppcheck.cpp, lib/preprocessor.cpp, - lib/preprocessor.h, lib/tokenize.cpp, lib/tokenize.h, - test/testbufferoverrun.cpp: Fixed #2373 (Using XML2 in --errorlist - output) - -2010-12-29 Daniel Marjamäki - - * lib/checkother.cpp: Fixed #2372 (internal error in logicaloperator - check (varid=0)) - -2010-12-29 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: typedef: fixed - problem with 'typedef int pread_f(int);'. ticket: #2348 - -2010-12-28 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: typedef: fix - typedef simplification. ticket: #2348 - -2010-12-28 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2370 (false negative: Buffer access out-of-bounds (for with if, no - break)) - -2010-12-28 Daniel Marjamäki - - * man/buildman.sh, man/cppcheck-design-overview.docbook, - man/cppcheck-design.docbook: Cppcheck Design: updated article - -2010-12-28 Daniel Marjamäki - - * man/cppcheck-design-overview.docbook: Cppcheck Design Overview: - Added article - -2010-12-28 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2355 - (simplifyTypedef: wrong simplification of 'typedef FMAC1 void - (*a)();') - -2010-12-28 Daniel Marjamäki - - * man/writing-rules-1.docbook, man/writing-rules-2.docbook, - man/writing-rules.docbook: Writing Rules: Added a second article - about writing rules that discuss the data representation - -2010-12-28 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2354 - (simplifyTypedef: function pointers are not simplified into valid - code) - -2010-12-28 Pete Johns - - * test/testsuite.cpp, test/testsuite.h: Fixed #2360 (testrunner - fails to build in Mac OS X Leopard (10.5) - assert macro vs assert - method) Renamed assert to assert_. Tested with gcc v4.0.1 on Snow Leopard. - -2010-12-27 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2367 (false - positive: (error) Uninitialized variable: s) - -2010-12-27 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2367 (false - positive: (error) Uninitialized variable: s) - -2010-12-27 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp, test/testunusedvar.cpp: - Fixed #2368 (assigned a value that is never used) - -2010-12-27 Kimmo Varis - - * gui/settings.ui, gui/settingsdialog.cpp: GUI: Show ideal thread - count next to current thread count. Ideal thread count is determined by Qt as number of available cores. - Ticket: #2194 (Automatically match thread count to available cores) - -2010-12-27 Kimmo Varis - - * lib/checkother.cpp, test/testother.cpp: Change 'Scope of - variable'-message to information message. - -2010-12-27 Ettl Martin - - * test/testunusedvar.cpp: Created to testcase (#2368) for assigned a - value that is never used false positive - -2010-12-27 Daniel Marjamäki - - * lib/checkother.cpp: Fixed #2365 (Internal error: Token::Match - called with varid 0) - -2010-12-27 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ja.ts, gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/cppcheck_sr.ts: GUI: - Update translation files. - -2010-12-27 Kimmo Varis - - * gui/main.ui: GUI: Use simple "Errors" instead of "Common errors". We have only one "error" category nowadays so we don't need to - separate different error categories anymore. - -2010-12-27 Kimmo Varis - - * gui/main.ui: GUI: Improve toolbar button tooltips. - -2010-12-27 Kimmo Varis - - * gui/stats.ui: GUI: Fix EOL style of stats.ui. - -2010-12-27 Kimmo Varis - - * gui/stats.ui, gui/statsdialog.cpp: GUI: Add 'portability' warnings - to statistics-dialog. - -2010-12-27 Kimmo Varis - - * gui/common.h, gui/gui.qrc, gui/main.ui, gui/mainwindow.cpp, - gui/mainwindow.h, gui/resultstree.cpp: GUI: Add GUI for showing - 'portability' warnings. Add menuitem, icon and toolbar button for portability warnings. - Ticket #2359 (Gui: Show portability warnings). - -2010-12-27 Daniel Marjamäki - - * test/testclass.cpp: TestClass: addon for 12f28507, fix a few more - error messages. - -2010-12-27 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2361 (false - positive on t[0X10]) - -2010-12-26 Kimmo Varis - - * gui/settings.ui: GUI: Fix building with Qt < 4.7.0. I accidentally added the 'placeholderText' attribute to settings.ui - when editing it with Qt Creator. That attribute was added in Qt - 4.7.0 and we are not using it for anything. So removing it to fix - building with older Qt versions. - -2010-12-26 Kimmo Varis - - * lib/checkclass.cpp, test/testclass.cpp: Improve the message about - const function. See discussion thread: - https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192 - -2010-12-26 Kimmo Varis - - * lib/checkstl.cpp, test/teststl.cpp: Improve message for container - type range check. See thread: - - https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192&start=0 - -2010-12-26 Kimmo Varis - - * lib/checkother.cpp, test/testother.cpp: Improve error message - about overlapping buffers for s[n]printf(). See forum thread: - - https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192&start=0 - -2010-12-26 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Buffer overrun: UB when pointer - arithmetic result points out of bounds. Ticket #1774 - -2010-12-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2304 - (Tokenizer::simplifyKnownVariables: known strcpy parameter) - -2010-12-26 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2090 - (False negative: null pointer dereference 's=0; strcpy(s,p);') - -2010-12-26 Kimmo Varis - - * gui/settings.ui: GUI: Improve Preferences-dialog layout. Make threads-textfield smaller as it can contain only three numbers. - Also set the input mask so that three numbers at max are accepted. - -2010-12-26 Peter Pentchev - - * Makefile, tools/dmake.cpp: Makefile: honor the C preprocessor - flags in CPPFLAGS. Ticket: #2254 - -2010-12-26 Kimmo Varis - - * gui/mainwindow.cpp: GUI: zero is not valid value for bool type. - -2010-12-26 Kimmo Varis - - * gui/common.h: GUI: Reorder settings-constants in common.h It is easier to manage those constants when there is even some basic - ordering and organization. - -2010-12-26 Kimmo Varis - - * gui/common.h, gui/mainwindow.cpp, gui/settings.ui, - gui/settingsdialog.cpp: GUI: Allow enabling inline suppressions from - the GUI. Ticket #2342 (inline suppressions not available from the GUI) - -2010-12-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Bailout if @ - is encountered in the code - -2010-12-26 Kimmo Varis - - * gui/stats.ui, gui/statsdialog.cpp: GUI: Show information messages - count in stats dialog. - -2010-12-26 Kimmo Varis - - * gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h, - gui/resultstree.cpp: GUI: Add "Information" errors items to menu and - toolbar. - -2010-12-26 Kimmo Varis - - * gui/gui.qrc, gui/main.ui, gui/resultstree.cpp: GUI: Change - Style-warnings icon. I want to use the current Style-warning icon for Information - messages. So change the Style-warning icon first to new icon. - -2010-12-26 Kimmo Varis - - * gui/checkstatistics.cpp, gui/checkstatistics.h, gui/common.h, - gui/mainwindow.cpp, gui/resultstree.cpp: GUI: Add - Information-severity support. - -2010-12-26 Daniel Marjamäki - - * lib/executionpath.cpp, test/testnullpointer.cpp: Fixed #2350 - (false positive: possible null pointer dereference) - -2010-12-26 Daniel Marjamäki - - * test/testfilelister_unix.cpp: astyle formatting - -2010-12-26 Pete Johns - - * lib/filelister_unix.cpp: Fixed Linux build. OSX built without limits.h - -2010-12-26 Pete Johns - - * Makefile, lib/filelister_unix.cpp, test/testfilelister_unix.cpp: - Fixed #2358 (Compilation fail on Mac) Added test case to prove it works. Not a true unit-test as it - accesses the file-system. - -2010-12-26 Daniel Marjamäki - - * lib/preprocessor.cpp: Fixed #2326 (Preprocessor: inline-suppr does - not work for id=missingInclude) - -2010-12-26 Pete Johns - - * lib/filelister_unix.cpp: canonicalize_file_name() is a - GNU-extension. Replaced with call to realpath() to build on non-Linux systems, such - as Mac OSX. - -2010-12-25 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2346 (False - positive: pointer is assigned value that is never used. used here: - 'pCol = pCol->GetNext()') - -2010-12-25 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2339 - (Tokenizer::setVarId : Wrong handling of 'int gr = id - - (TLFPressProperties::OIL_FLUID * nb);') - -2010-12-25 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Fixed #2353 - (Tokenizer::simplifyKnownVariables: wrong simplification after - return) - -2010-12-25 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Misused scope objects: - Don't use this check if the checked file is a pure C file. Ticket: - #2352 - -2010-12-24 Daniel Marjamäki - - * lib/errorlogger.cpp: Fixed #2349 (Empty 'msg' in output when using - '-j') - -2010-12-24 Daniel Marjamäki - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: Fixed #2356 - (False positive reported with iterator deletion) - -2010-12-23 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: - Tokenizer::simplifyGoto: Don't simplify 'goto' inside unhandled - macro calls. Ticket: #2348 - -2010-12-23 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: Fixed - calculation simplification of '0*(*p)'. Ticket: #2348 - -2010-12-23 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2345 (False - positive: uninitialized variable (in sub-condition in if inside a - loop)) - -2010-12-22 Daniel Marjamäki - - * lib/filelister_unix.cpp, lib/filelister_unix.h: Fixed #2344 - (FileLister Unix: Don't convert to absolute paths) - -2010-12-22 Daniel Marjamäki - - * lib/checkclass.cpp, lib/errorlogger.h, lib/preprocessor.cpp, - test/testclass.cpp: Information: Added new severity - -2010-12-22 Daniel Marjamäki - - * lib/errorlogger.cpp: xml2: changed the format of the - cppcheck-version info - -2010-12-22 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2341 (false - positive for function pointer returning typedef) - -2010-12-22 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2337 (False - Positive: memory leak) - -2010-12-22 Daniel Marjamäki - - * lib/errorlogger.cpp, lib/errorlogger.h: xml2: Added - cppcheck-version - -2010-12-22 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2338 (False - positive: Deallocating a deallocated pointer) - -2010-12-21 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2336 (False - positive: memory leak (passing pointer to subfunction)) - -2010-12-21 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2330 - (unreadVariable error for a fstream object when only extraction - operator (>>) is used) - -2010-12-21 Robert Reif - - * lib/checkother.cpp, lib/symboldatabase.cpp, lib/symboldatabase.h, - test/testunusedvar.cpp: unused variables: fixed false negatives with - the help of the symbol database. ticket: #2317 - -2010-12-20 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2317 ((style) - Variable is allocated memory that is never used) - -2010-12-20 Daniel Marjamäki - - * lib/checkobsoletefunctions.h, test/testobsoletefunctions.cpp: - Fixed #2334 (Internal class index function (no need to 'strchr')) - -2010-12-19 Daniel Marjamäki - - * lib/checknullpointer.cpp: Fixed #2331 (Token::Match is called with - varid 0) - -2010-12-19 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2286 (Variable - 'ownKilled' is assigned a value that is never used) - -2010-12-19 Daniel Marjamäki - - * lib/filelister_unix.cpp: Fixed #2322 (cppcheck follows recursive - symlinks) - -2010-12-19 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2328 (false positive: buffer overrun (for loop with a break => the - end value is not reached)) - -2010-12-19 Daniel Marjamäki - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, test/test.vcproj, - test/test.vcxproj, test/test.vcxproj.filters: Visual Studio: updated - project files with qmake - -2010-12-18 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2325 - (Tokenizer: Remove for-loop if condition is false) - -2010-12-18 Robert Reif - - * lib/checkother.cpp: CheckOther: Use SymbolDatabase. Ticket: #2318 - -2010-12-18 Kimmo Varis - - * Makefile: Update Makefile. - -2010-12-18 Kimmo Varis - - * tools/dmake.cpp: Update dmake to use basepath in lib.pri. - -2010-12-18 Kimmo Varis - - * test/test.pro: Update test.pro for using base path for included - pri files. - -2010-12-18 Kimmo Varis - - * cli/cli.pro, gui/gui.pro, lib/lib.pri: Don't use relative paths in - lib.pri. Using relative path in included file binds it to be usable only - included from one directory. Instead use variable for giving the - base path for files. - -2010-12-18 Kimmo Varis - - * cli/cli.pro, externals/tinyxml/tinyxml.pri: Don't use relative - paths in tinyxml.pri. Using relative path in included file binds it to be usable only - included from one directory. Instead use variable for giving the - base path for files. - -2010-12-18 Kimmo Varis - - * externals/tinyxml/tinyxml.pri: Reformat tinyxml qmake file. Have one filename at one line. - -2010-12-18 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Report 'missing system - include' with debug severity. temporary solution until the handling - of system includes is better. - -2010-12-18 Daniel Marjamäki - - * test/test.pro: QMake: added test/test.pro - -2010-12-18 Kimmo Varis - - * cli/cli.pro: Add _CRT_SECURE_NO_WARNINGS for Windows CLI build. - -2010-12-18 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: better - handling for switch/break in the simplifyKnownVariables. Ticket: - #2324 - -2010-12-18 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2323 (false positive: Buffer access out of bounds) - -2010-12-18 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2320 (false - positive: Uninitialized variable: kbuf) - -2010-12-18 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Remove - redundant parantheses in rhs. Ticket: #2320 - -2010-12-17 Daniel Marjamäki - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cli/cppcheck.vcxproj.filters, externals/tinyxml/tinyxml.pri, - lib/lib.pri: QMake: auto-generate the visual studio project files - with qmake - -2010-12-17 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2313 (False - Positive: memory leak) - -2010-12-17 Daniel Marjamäki - - * test/testmemleak.cpp: checkmemoryleaks: added assertion for todo - assertion - -2010-12-17 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2306 (False - positive: array of std::string is reported as uninitialized) - -2010-12-17 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2299 - (false positive: possible nullpointer dereference) - -2010-12-17 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2307 (No - constructor defined false positive when class is enclosed in - namespace) - -2010-12-16 Daniel Marjamäki - - * lib/mathlib.h: removed the NOLONGLONG handling. it seems unlikely - it is needed - -2010-12-16 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2300 - (false positive: possible nullpointer dereference) - -2010-12-16 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2301 (false - positive: The given size 3 is mismatching) - -2010-12-16 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2311 (False - positive: Index out of bounds) - -2010-12-16 Daniel Marjamäki - - * test/testbufferoverrun.cpp: astyle formatting - -2010-12-16 Daniel Marjamäki - - * build.txt: build.txt: some updated instructions - -2010-12-16 Robert Reif - - * lib/checkother.cpp, lib/symboldatabase.cpp: Symbol database: reuse - in CheckOther. Ticket: #2318 - -2010-12-16 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2314 (False - positive: (style) Template instantiation 'Foo' hides typedef with - same name) - -2010-12-15 Kimmo Varis - - * : commit ac8eb30d681c38f3951af77f410f18077b76b80b Author: Kimmo - Varis Date: Wed Dec 15 22:39:46 2010 +0200 - -2010-12-15 Ettl Martin - - * test/testpreprocessor.cpp: test:testpreprocessor.cpp; fixed broken - unit test due to wrong charcter encoding - -2010-12-15 Kimmo Varis - - * cli/cppcheck.vcxproj, cli/cppcheck.vcxproj.filters, - test/test.vcxproj, test/test.vcxproj.filters: Update VS2010 project - files for new TinyXml location. - -2010-12-15 Kimmo Varis - - * cli/cppcheck.vcproj, test/test.vcproj: Update VS2008 project files - for new TinyXml location. - -2010-12-15 Daniel Marjamäki - - * : Merge commit 'vBm/master' - -2010-12-15 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: Fix typo 'IntallationPath' - to 'InstallationPath'. - -2010-12-15 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: Add Japanese and Serbian - translation files. I forgot to add Japanese and Serbian translation files to the - Windows installer when adding them. - -2010-12-15 vBm - - * : commit 500c0a19c39ec8fdd434a0d6f97363f4db9b5275 Author: Zachary - Blair Date: Tue Dec 14 23:51:21 2010 - -0800 - -2010-12-14 vBm - - * : commit 05ebf120c3fd254ea1c896e48017f3202d6ddcfb Author: Zachary - Blair Date: Tue Dec 14 00:16:26 2010 - -0800 - -2010-12-13 Daniel Marjamäki - - * createrelease: createrelease: Added comment to test 'cppcheck - --errorlist'. Ticket: #2292 - -2010-12-13 vBm - - * : commit 5ce63a1df0616e3d4e03841f45cb14caad361773 Author: Daniel - Marjamäki Date: Mon Dec 13 18:17:33 2010 - +0100 - -2010-12-13 vBm - - * man/manual.docbook: Change case for some standardized words - -2010-12-13 Ettl Martin - - * tools/dmake.cpp: fixed mistake from previous commit. changes path - from test/tinyxml to external/tinyxml; Thanks to kimmov. - -2010-12-13 Ettl Martin - - * tools/dmake.cpp: dmake: added test/tinyxml path to make clean - -2010-12-13 Kimmo Varis - - * gui/checkstatistics.cpp, gui/checkstatistics.h, gui/common.h, - gui/resultstree.cpp: GUI: Add partial support for portability - severity. Add 'backend' support for the new 'portability' severity. The new - severity is handled, converted to new SHOW_PORTABILITY and added - with correct type to the result view. There is no menuitem/toolbar button to show/hide portability items. - Likewise there is no line for portability issues in stats- dialog. Ticket #2106 (More severities and new xml format) - -2010-12-12 Daniel Marjamäki - - * cli/cli.pro, lib/lib.pri, tools/dmake.cpp: dmake: add include path - '../externals' to lib.pri in case the pcre.h is placed there. - -2010-12-12 Daniel Marjamäki - - * Makefile, build.txt, cli/cli.pro, cli/cmdlineparser.cpp, - externals/tinyxml/changes.txt, externals/tinyxml/tinystr.cpp, - externals/tinyxml/tinystr.h, externals/tinyxml/tinyxml.cpp, - externals/tinyxml/tinyxml.h, externals/tinyxml/tinyxml.pri, - externals/tinyxml/tinyxmlerror.cpp, - externals/tinyxml/tinyxmlparser.cpp, gui/gui.pro, lib/cppcheck.cpp, - lib/lib.pri, lib/settings.h, test/tinyxml/changes.txt, - test/tinyxml/tinystr.cpp, test/tinyxml/tinystr.h, - test/tinyxml/tinyxml.cpp, test/tinyxml/tinyxml.h, - test/tinyxml/tinyxmlerror.cpp, test/tinyxml/tinyxmlparser.cpp, - tools/dmake.cpp: Add support for user defined rules - -2010-12-12 Daniel Marjamäki - - * Makefile: Makefile: switch back to debug mode - -2010-12-12 Daniel Marjamäki - - * Makefile: 1.46: updated Makefile for release - -2010-12-12 Daniel Marjamäki - - * Changelog: 1.46: Updated Changelog - -2010-12-12 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, lib/cppcheck.cpp, - win_installer/productInfo.wxi: 1.46: updated version information - -2010-12-11 Daniel Marjamäki - - * lib/errorlogger.h: XML2: Added severity 'portability' for future - use. Ticket: #2106 - -2010-12-11 Daniel Marjamäki - - * gui/help/buildhelp.bat: online-help: Remove old files before - generating new ones. - -2010-12-11 Daniel Marjamäki - - * gui/help/ch01.html, gui/help/ch02.html, gui/help/ch02s02.html, - gui/help/ch02s03.html, gui/help/ch02s04.html, - gui/help/ch02s05.html, gui/help/ch02s06.html, - gui/help/ch02s07.html, gui/help/ch02s08.html, gui/help/ch03.html, - gui/help/ch04.html, gui/help/ch05.html, gui/help/ch06.html, - gui/help/ch07.html, gui/help/ch08.html, gui/help/ch09.html, - gui/help/ch10.html, gui/help/ch10s02.html, gui/help/ch10s03.html, - gui/help/ch10s04.html, gui/help/ch10s05.html, gui/help/index.html, - gui/help/manual.html, gui/help/online-help.qhp: GUI: updated help - file. Use latest manual. - -2010-12-10 vBm - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ja.ts, gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/cppcheck_sr.ts, - gui/gui.pro, gui/translationhandler.cpp: GUI: Initial addition of - Serbian localization using clean English template. - -2010-12-09 Daniel Marjamäki - - * man/manual.docbook: Manual: minor tweaks. remark that it is not - certain that fixing 'performance' messages will have a positive - effect on the speed. and in general it doesn't make the code more - readable. - -2010-12-09 Daniel Marjamäki - - * lib/checkobsoletefunctions.h: Obsolete functions: added better - verbose messages - -2010-12-09 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: Cleanup - redundant statement '; x = x + 0;'. Ticket: #2283 - -2010-12-09 Daniel Marjamäki - - * cli/threadexecutor.cpp: ThreadExecutor: Fixed error message - 'member variable _pipe not initialized'. Ticket: #2283 - -2010-12-09 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2284 - (False positive: Possible null pointer reference) - -2010-12-09 Robert Reif - - * lib/checkmemoryleak.cpp: Symbol database: use in - checkmemoryleaks.cpp. ticket: #2219 - -2010-12-09 Daniel Marjamäki - - * test/testmemleak.cpp: memory leaks: fixed test that I broke in my - last commit - -2010-12-08 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2285 (False - Positive: memory leak) - -2010-12-08 Kimmo Varis - - * gui/checkthread.cpp, gui/checkthread.h: GUI: Small cleanup - use - const reference. - -2010-12-08 Kimmo Varis - - * gui/threadhandler.cpp, gui/threadhandler.h: GUI: Small cleanup - - use const reference. - -2010-12-08 Kimmo Varis - - * gui/translationhandler.cpp: GUI: Fix typo in Japanese translation - name. The typo was visible in the Language-menu. - -2010-12-08 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ja.ts, gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts: GUI: Update language files. - -2010-12-08 Kimmo Varis - - * gui/cppcheck_ja.ts, gui/gui.pro, gui/translationhandler.cpp: GUI - Add Japanese translation. The translation was contributed by cjohnk7@sourceforge.net. Ticket - #2276. - -2010-12-08 Kimmo Varis - - * gui/stats.ui: Fix EOL style for stats.ui. I accidentally committed stats.ui with Windows EOL style. - -2010-12-08 Robert Reif - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - lib/symboldatabase.cpp, lib/symboldatabase.h: Symbol database: use - symbol database in the memory leaks function checking. Ticket: #2219 - -2010-12-07 Robert Reif - - * lib/symboldatabase.cpp, lib/symboldatabase.h, test/testclass.cpp: - Fixed #2282 (Improve check: Function can be const) - -2010-12-07 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts: GUI: Update translation files. - -2010-12-07 Kimmo Varis - - * gui/stats.ui: GUI: Don't translate placeholder texts in stats - dialog. - -2010-12-07 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, lib/checkmemoryleak.cpp, - lib/tokenize.cpp, lib/tokenize.h: Symbol database: creates a single - symbol database within Tokenizer on demand and changes all checks to - use it - -2010-12-07 Robert Reif - - * test/testmemleak.cpp: Symbol database: adds new tests that verify - that namespaces work for the class check - -2010-12-07 Robert Reif - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Symbol database: fixed a TODO test where class - variables were qualified with the class name - -2010-12-07 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkmemoryleak.cpp, - lib/symboldatabase.cpp, lib/tokenize.cpp: Symbol database: removed - unnecessary null pointer checks - -2010-12-06 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Memory leaks: Removed the experimental - checking using ExecutionPath. - -2010-12-06 Daniel Marjamäki - - * man/buildman.sh, man/writing-rules.docbook: Writing rules: - converting the docbook to pdf with buildman.sh - -2010-12-06 Daniel Marjamäki - - * man/writing-rules.docbook: Writing rules: More simplifications - -2010-12-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2280 - (Tokenizer::setVarId : variable id not set for inner iterator) - -2010-12-05 Kimmo Varis - - * .gitignore: Update GUI executable name to .gitignore. - -2010-12-05 Kimmo Varis - - * Makefile: Update Makefile. - -2010-12-05 Daniel Marjamäki - - * man/writing-rules.docbook: Writing rules: minor tweaks - -2010-12-05 Kimmo Varis - - * : commit 3ab725fa047a1546339f22c96ee3442d1ec022c8 Author: Kimmo - Varis Date: Sun Dec 5 22:23:36 2010 +0200 - -2010-12-05 Robert Reif - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Symbol database: - better handling of inline functions. Ticket: #2219 - -2010-12-05 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2279 ((style) - struct of union member is never used) - -2010-12-05 Daniel Marjamäki - - * man/writing-rules.docbook: Writing rules: use 'cppcheck --rule=.+' - instead of 'cppcheck --debug' to see simplified code - -2010-12-05 Daniel Marjamäki - - * man/writing-rules.docbook: Writing rules: Minor updates. Trying to - make it easier. - -2010-12-05 Daniel Marjamäki - - * man/writing-rules.docbook: Writing rules: rewrote the chapter - about writing rule files - -2010-12-04 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: Fixed #2275 (False - Positive: Member variable not initialized in the constructor) - -2010-12-04 Daniel Marjamäki - - * man/writing-rules.docbook: Writing rules: Target this guide for - beginners. Skip C++ and only describe how rules are created with - regular expressions. - -2010-12-04 Robert Reif - - * lib/checkclass.cpp, lib/symboldatabase.cpp, test/testclass.cpp: - Fixed #2273 (False Positive: Member variable not initialized in the - constructor) - -2010-12-04 Daniel Marjamäki - - * man/writing-rules.docbook: Writing rules: Removed the C++ - information. I'll focus on regular expressions to begin with. - -2010-12-04 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h: Tokenizer: Added a few comments - -2010-12-04 Daniel Marjamäki - - * cli/cmdlineparser.cpp, lib/settings.h: xml2: rename '--xmlver' to - '--xml-version'. bugfix in settings, change the type of _xml_version - from bool to int. - -2010-12-04 Daniel Marjamäki - - * : commit c6c5fc6a1ce986e045ccbfcc4bfb05961f1e2ff5 Author: Kimmo - Varis Date: Sat Dec 4 14:13:44 2010 +0200 - -2010-12-04 Daniel Marjamäki - - * man/writing-rules.docbook: Writing rules: Start writing document. - A beginners guide to writing rules. - -2010-12-04 Kimmo Varis - - * lib/checkstl.cpp, test/teststl.cpp: Improve 'Use x.empty() instead - of x.size() for emptiness' warning. Improve the performance warning message as discussed at dev-forum: - - https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192#p926 - -2010-12-04 Kimmo Varis - - * lib/checkautovariables.cpp, test/testautovariables.cpp: Improving - 'Wrong assignment of auto variable' error message. Improving the error message as discussed at dev-forum: - - https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192&start=0 - -2010-12-04 Robert Reif - - * lib/checkmemoryleak.cpp, lib/symboldatabase.cpp, - test/testmemleak.cpp: Memory leaks: Determine that some classes are - not auto-deallocated. Reduce false negatives. Ticket: #2219 and - #1618 - -2010-12-03 Daniel Marjamäki - - * man/manual.docbook: Manual: updated the manual - -2010-12-03 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2264 (False - positive: variable assigned value that is never used) - -2010-12-03 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2271 (Tokenizer: - simplify Qt signals and slots) - -2010-12-03 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: Symbol database: The - symbol database has a bug where it can find an out of line - constructor when looking for a destructor. Ticket: #2272 - -2010-12-02 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2263 (False - positive: variable assigned value that is never used) - -2010-12-02 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h: Preprocessor: Don't - include system headers twice. - -2010-12-02 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: Fixed - #2271 (Tokenizer: simplify Qt signals and slots) - -2010-12-02 Daniel Marjamäki - - * cli/cmdlineparser.cpp, cli/cppcheckexecutor.cpp, lib/check.h, - lib/cppcheck.cpp, lib/errorlogger.cpp, lib/errorlogger.h, - lib/preprocessor.cpp, lib/settings.cpp, lib/settings.h, - test/testcppcheck.cpp: xml2: replace --xml2 with --xmlver=2. Ticket: - #2106 - -2010-12-02 Robert Reif - - * lib/checkclass.cpp, lib/symboldatabase.cpp, lib/symboldatabase.h, - test/testclass.cpp, test/testconstructors.cpp: Fixed #2172 (False - positive: struct is not initialized in constructor) - -2010-12-01 Daniel Marjamäki - - * cli/cmdlineparser.cpp, cli/cppcheckexecutor.cpp, lib/check.h, - lib/cppcheck.cpp, lib/errorlogger.cpp, lib/errorlogger.h, - lib/preprocessor.cpp, lib/settings.cpp, lib/settings.h, - test/testcppcheck.cpp: xml2: Added experimental --xml2 result - format. Ticket: #2106 - -2010-12-01 Daniel Marjamäki - - * lib/checkuninitvar.cpp: checkuninitvar: fixed possible - null-pointer dereference. thanks orbitcowboy for spotting it. - -2010-12-01 Robert Reif - - * lib/preprocessor.cpp, lib/tokenize.cpp, lib/tokenize.h, - test/testautovariables.cpp, test/testbufferoverrun.cpp, - test/testcharvar.cpp, test/testclass.cpp, - test/testconstructors.cpp, test/testdivision.cpp, - test/testexceptionsafety.cpp, test/testincompletestatement.cpp, - test/testmemleak.cpp, test/testnullpointer.cpp, - test/testobsoletefunctions.cpp, test/testother.cpp, - test/testpostfixoperator.cpp, test/testpreprocessor.cpp, - test/testsimplifytokens.cpp, test/teststl.cpp, test/testtoken.cpp, - test/testtokenize.cpp, test/testuninitvar.cpp, - test/testunusedfunctions.cpp, test/testunusedprivfunc.cpp, - test/testunusedvar.cpp: Tokenizer: add assert(_settings) to - Tokenizer to insure the tokenizer always has settings. Ticket: #2219 - -2010-12-01 Kimmo Varis - - * gui/resultsview.cpp: GUI: Don't show summary/details for the - parent items. - -2010-12-01 Kimmo Varis - - * gui/resultsview.cpp: Fix ticket #2269 ([GUI] Crash when rechecking - files while having hidden stuff) If there is no current item show empty details panel. - -2010-12-01 Kimmo Varis - - * lib/checkclass.cpp: Fixed #2268 ([GUI] Generic class name is shown - for 'Message' while correct one for 'Summary') - -2010-11-30 Kimmo Varis - - * gui/checkstatistics.cpp, gui/checkstatistics.h: GUI: Add files I - forgot to add when committing statistic patches. - -2010-11-30 Kimmo Varis - - * gui/resultsview.cpp: GUI: Show also summary in the details pane. Show both short summary and verbose message in lower details panel - in the GUI: Add titles for short summary and message. Hopefully this - makes it easier to read the messages and copy/paste them too. - -2010-11-30 Kimmo Varis - - * gui/statsdialog.cpp, gui/statsdialog.h: GUI: Copy statistics also - to clipboard. - -2010-11-30 Kimmo Varis - - * gui/gui.pro, gui/mainwindow.cpp, gui/resultstree.cpp, - gui/resultstree.h, gui/resultsview.cpp, gui/resultsview.h, - gui/stats.ui, gui/statsdialog.cpp, gui/statsdialog.h: GUI: Collect - statistics about amount of different severities. Add new class for collecting statistics per each error severity. Add - a new tab to Statistics-dialog for these numbers. - -2010-11-30 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: Fixed #2252 - (segmentation fault with enable=all) - -2010-11-30 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: Fixed #2252 - (segmentation fault with enable=all) - -2010-11-30 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2261 (False - positive: memory leak) - -2010-11-30 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2262 (False - positive: Resource leak: fd) - -2010-11-30 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2265 (False - positive: Uninitialized variable: path) - -2010-11-29 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2251 - (False positive: Possible null pointer reference) - -2010-11-29 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2245 - (False positive: Possible null pointer dereference) - -2010-11-29 Daniel Marjamäki - - * Makefile: Makefile: updated with dmake - -2010-11-29 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2248 (memory - leak : pointer inserted in an object) - -2010-11-29 Kimmo Varis - - * lib/checkstl.cpp: Remove extra space char from begin of verbose - message. - -2010-11-29 Kimmo Varis - - * lib/checkstl.cpp, test/teststl.cpp: Improve redundant STL - container condition -message. Have separate summary and verbose messages. Se discusion at forum: - https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192 - -2010-11-29 Kimmo Varis - - * lib/checkother.cpp, test/testother.cpp: Improve "Assert statement - 'varname' -message. Modifying the message so that we have short message and verbose - message. As discussed in dev-forum: - https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192 - -2010-11-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2232 - (segmentation fault of cppcheck) - -2010-11-28 Kimmo Varis - - * lib/checkother.cpp: Run astyle. - -2010-11-28 Kimmo Varis - - * gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.ui: GUI: - Allow selecting multiple items in results tree. If multiple items are selected then other than "Hide" context menu - items are disabled. - -2010-11-28 Kimmo Varis - - * lib/checkother.cpp, test/testother.cpp: Improve the 'suspicious - code sizeof sizeof' -message. As discussed at dev-forum: - https://sourceforge.net/apps/phpbb/cppcheck/viewtopic.php?f=3&t=192 - -2010-11-28 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Temporarily skip 'missing - include' warnings for system headers in release mode. When the - handling works better these messages should not be skipped. Ticket: - #1937 - -2010-11-28 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2236 (False - positive: Assignment to itself) - -2010-11-28 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed #2241 (Segfault checking a file) - -2010-11-27 Kimmo Varis - - * lib/checkpostfixoperator.cpp: Remove extra space from error - message. - -2010-11-27 Kimmo Varis - - * lib/checkother.cpp: Small fix to error message. Start with capital letter and no space in beginning. - -2010-11-27 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2218 (False - positive: Data is allocated but not initialized) - -2010-11-27 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2235 (false - Resource leak) - -2010-11-27 Kimmo Varis - - * lib/checkstl.cpp, test/teststl.cpp: Ticket #2237 (Too long "short" - message about iterator increment) Improve the message for suspicious iterator increment in loop. - -2010-11-27 Kimmo Varis - - * lib/checkother.cpp, test/testother.cpp: Ticket #2239 (Too long - "short" message about function parameter passing) Have a proper short message for the parameter passing warning and - improve the message. - -2010-11-27 Kimmo Varis - - * lib/checkpostfixoperator.cpp, test/testpostfixoperator.cpp: Ticket - #2238 (Improve postincrement warning message) Have a proper short message for post ++/-- operators. Pre ++/-- - operators are usually more efficient for non-primitive types. - -2010-11-27 Kimmo Varis - - * lib/checkclass.cpp, test/testclass.cpp, test/testconstructors.cpp: - Ticket #2240 (Improve no constructor-message). Improve the message about missing constructor but having class - attributes. Have proper short and long messages. - -2010-11-26 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts: GUI: Update translation files. - -2010-11-26 Kimmo Varis - - * gui/application.ui: GUI: Change text in Add Application-dialog - back to plain text. Revert change ca9f8a7036559415e22364e0d078c20647943a32 that - converted text in Add Application -dialog to rich text. The text is - plain text and doesn't use any formatting so plain text is good for - it. - -2010-11-26 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Cleanup duplicate code. - -2010-11-26 Kimmo Varis - - * gui/common.h, gui/mainwindow.cpp, gui/settings.ui, - gui/settingsdialog.cpp, gui/settingsdialog.h: GUI: Add Setting for - global include paths. This commit adds new setting and GUI for global include dirs. When - project file with include dirs is loaded, global includes dirs are - added first and after them the include dirs from project file. - -2010-11-25 Robert Reif - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h: Symbol database: - refactor CheckMemoryLeakInClass::checkPublicFunctions to use the - symbol database. Ticket: #2219 - -2010-11-25 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2234 (Variable is - assigned a value that is never used) - -2010-11-25 Robert Reif - - * lib/symboldatabase.cpp: Symbol database: Avoid possible null - pointer dereference if _settings is null. Ticket: #2219 - -2010-11-25 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: Fixed #2230 - (segmentation fault of cppcheck) - -2010-11-25 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: Fixed #2228 (False - positive: Claims function can be const when it can not be - (shared_ptr)) - -2010-11-24 Kimmo Varis - - * win_installer/cppcheck.wxs, win_installer/productInfo.wxi: - Installer: Write Cppcheck version and install path to registry. As suggested by mcartoixa at forums. This helps 3rd party software - to find the Cppcheck in Windows environment. Note that this commit - writes to HKCU instead of suggested HKLM. - -2010-11-24 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2226 - (segmentation fault of cppcheck) - -2010-11-24 Kimmo Varis - - * gui/resultsview.cpp, gui/resultsview.h: GUI: Fixing includes. - -2010-11-24 Kimmo Varis - - * : commit c6046b6663209770a00964e9a7bf405a5eda9fa5 Author: Kimmo - Varis Date: Wed Nov 24 17:09:02 2010 +0200 - -2010-11-24 Zachary Blair - - * gui/main.ui, gui/mainwindow.cpp, gui/resultstree.cpp, - gui/resultstree.h, gui/resultsview.cpp, gui/resultsview.h: Fixed - #1861 (GUI: Allow hiding error) Disabled menu item when not - applicable - -2010-11-23 Kimmo Varis - - * gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.cpp, - gui/resultsview.h: GUI: Improve updating details view. After previous patches the details view was only updated when the - item was clicked with mouse. This patch improves the updating and - now it works also when changing selected item using keyboard. - -2010-11-23 Kimmo Varis - - * gui/common.h, gui/mainwindow.cpp, gui/resultsview.cpp, - gui/resultsview.h: GUI: Remember main window splitter state. Save and restore the vertical splitter state (sizes of tree view and - details panel). - -2010-11-23 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2225 (false - positive: variable is assigned a value that is never used - '*(stack[0])+=arg') - -2010-11-23 Kimmo Varis - - * gui/resultsview.ui: GUI: Rename the splitter widget. - -2010-11-23 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, lib/checkmemoryleak.cpp, - lib/checkmemoryleak.h, lib/symboldatabase.cpp, lib/tokenize.cpp, - lib/tokenize.h, test/testmemleak.cpp, test/testtokenize.cpp: reuse - symbol database in checkmemoryleak.cpp. ticket: #2219 - -2010-11-23 Robert Reif - - * lib/symboldatabase.cpp, test/testclass.cpp: Fixed #2221 - (segmentation fault of cppcheck) - -2010-11-23 Kimmo Varis - - * gui/resultsview.cpp, gui/resultsview.h: GUI: Add missing include - lines. - -2010-11-22 Kimmo Varis - - * gui/resultstree.cpp: GUI: Remove Message-column from the error - tree view. The full detailed message is shown in the own panel below error - tree. - -2010-11-22 Kimmo Varis - - * gui/resultsview.cpp, gui/resultsview.h, gui/resultsview.ui: GUI: - Add own panel for detailed error messages. This commit adds new rich text panel for the detailed error - messages. When user clicks error item the detailed error text is - updated to the panel. This way we have much more freedom in - formatting the message and user can easily copy/paste (parts of) the - message. - -2010-11-21 Zachary Blair - - * gui/main.ui, gui/mainwindow.cpp, gui/resultstree.cpp, - gui/resultstree.h, gui/resultsview.cpp, gui/resultsview.h: Fixed - #1861 (GUI: Allow hiding error) - -2010-11-21 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer::simplifyKnownVariables: suppress - debug warnings about pointer aliases. Temporary solution that limits - the amount of debug warnings somewhat. - -2010-11-21 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: - Tokenizer::simplifyKnownVariables: Reduce debug-warnings for - conditional increment - -2010-11-21 Daniel Marjamäki - - * test/testbufferoverrun.cpp: Buffer overflow: Added unit test that - makes sure that array index out of bounds is detected inside loop. - Ticket: #2199 - -2010-11-21 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h: VS: Fixed - compiler warnings. Ticket: #2200 - -2010-11-21 Daniel Marjamäki - - * lib/mathlib.cpp: gcc: fixed compiler warnings - -2010-11-21 Zachary Blair - - * cli/cmdlineparser.cpp, lib/checkother.cpp, lib/checkother.h, - test/testother.cpp: Fixed #2162 (false positive: Mutual exclusion - over ||) - -2010-11-20 Reijo Tomperi - - * cli/cmdlineparser.cpp: Increase number of cores allowed by the cli - to 10000 and add comment about the limit (it is there just to catch - typos) - -2010-11-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2216 (wrong - warning when C++0x keyword delete is used) - -2010-11-20 Ettl Martin - - * lib/mathlib.h: mathlib: toString() parameter changed to const - reference - -2010-11-20 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: VS: Fixed compiler warnings - -2010-11-20 Daniel Marjamäki - - * lib/checkother.cpp: VS: fixed compiler warning. Ticket: #2200 - -2010-11-20 Daniel Marjamäki - - * lib/checkuninitvar.cpp, lib/mathlib.cpp, lib/mathlib.h, - lib/tokenize.cpp, test/testmathlib.cpp: Fixed #2200 (MathLib: - Calculation overflow) - -2010-11-20 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2214 - (Improve check: Memory leak not detected when pointer is - incremented) - -2010-11-20 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Mutual - exclusion: Disable this check until #2162 is fixed. - -2010-11-20 Robert Reif - - * lib/checkclass.cpp, lib/symboldatabase.cpp, lib/symboldatabase.h: - Symbol database: add global space and add all global functions and - variables to it. Ticket: #2198 - -2010-11-19 Kimmo Varis - - * gui/resultstree.cpp, gui/resultstree.h: GUI: Right-align line - number. - -2010-11-19 Kimmo Varis - - * gui/resultstree.cpp, gui/resultstree.h: GUI: Add tooltips for - error items. - -2010-11-18 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2210 (False positive: buffer overrun (snprintf, unknown type)) - -2010-11-16 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Uninitialized - variables: Fixed simple undetected case for '= %var% |' and '| %var% - ;' - -2010-11-16 Daniel Marjamäki - - * lib/checkuninitvar.cpp: Uninitialized variables: Cleanup '+=' - handling. This is simplified in the Tokenizer now. - -2010-11-16 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Uninitialized - variables: Fixed simple undetected case for '= %var% -' - -2010-11-16 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Uninitialized - variables: Fixed false negative. Ticket: #2207 - -2010-11-16 Robert Reif - - * lib/checkclass.cpp, lib/symboldatabase.cpp, lib/symboldatabase.h, - test/testconstructors.cpp: Fixed #2204 (False positive when using - const class members) - -2010-11-15 Ettl Martin - - * test/testmathlib.cpp: fixed: wrong testcase from my last commit im - testmathlib.cpp - -2010-11-15 Ettl Martin - - * test/testmathlib.cpp, test/testother.cpp: mathlib: added todo - testcases for ticket #2200 - -2010-11-15 Daniel Marjamäki - - * lib/executionpath.cpp, test/testnullpointer.cpp, - test/testuninitvar.cpp: Fixed #2207 (False positive: uninitialized - variable (return if uninitialized)) - -2010-11-15 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2206 (False - positive: variable is assigned a value that is never used (array - initializers)) - -2010-11-15 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2205 (False - positive: variable is assigned a value that is never used (assigning - to dereferenced casted pointers)) - -2010-11-15 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2202 (false - postive: Data is allocated but not initialized: rbdc) - -2010-11-14 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testunusedvar.cpp: - Fixed #2058 (Warn for unused variable when only doing malloc/free) - -2010-11-14 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2201 (false - positive: Uninitialized variable: __v0) - -2010-11-14 Kimmo Varis - - * cli/cppcheck.vcxproj, cli/cppcheck.vcxproj.filters, - test/test.vcxproj, test/test.vcxproj.filters: Update VS2010 - solution/project files. - -2010-11-14 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h: Fixed #2131 - (Preprocessor: incorrect include file loading) - -2010-11-14 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: CheckClass: Refactoring - - organize each check so the check function comes first, any helper - functions come second, and the message functions come last. Ticket: - #2198 - -2010-11-13 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: - Tokenizer::simplifyKnownVariables: Simplify known variables for - struct members - -2010-11-13 Daniel Marjamäki - - * test/testtokenize.cpp: Tokenizer: added assertions to check that - no debug messages are given. - -2010-11-13 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Skip debug - warnings in Tokenizer::simplifyKnownVariables for loop variable - -2010-11-13 Daniel Marjamäki - - * test/testtokenize.cpp: Tokenizer: Added TODO test cases for - splitting up variable declarations - -2010-11-13 Daniel Marjamäki - - * lib/checkautovariables.cpp, lib/checkautovariables.h, - test/testautovariables.cpp: Auto variables: improved the check for - 'return retval.c_str()'. Ticket: #2191 - -2010-11-13 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Uninitialized - variables: Fixed false negatives when calling unknown function with - uninitialized variable by value: 'f(a+1)' - -2010-11-13 Daniel Marjamäki - - * lib/preprocessor.cpp: system headers: merged the systemheaders - branch into master. it works pretty well. Ticket: #1937 - -2010-11-13 Daniel Marjamäki - - * cli/cppcheck.vcproj, test/test.vcproj: Visual Studio 2008: Added - lib/symboldatabase files - -2010-11-13 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2196 (False - positive: Invalid data is allocated but not initialized - (initialization in loop)) - -2010-11-13 Daniel Marjamäki - - * lib/symboldatabase.cpp, lib/symboldatabase.h: Symbol database: - Added files - -2010-11-13 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: uninitialized - variables: fixed problem when parsing loop bodies - -2010-11-13 Daniel Marjamäki - - * Makefile: Makefile: updated the Makefile. addon to my commit - yesterday where I added new leak checking - -2010-11-13 Robert Reif - - * Makefile, lib/checkclass.cpp, lib/checkclass.h, lib/lib.pri: Fixed - #2198 (SymbolDatabase: separate SymbolDatabase from CheckClass) - -2010-11-12 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #2151 (false negative: memory leak when - calling subfunction that doesn't deallocate the memory) - -2010-11-12 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2193 - (false negative: nullpointer dereference) - -2010-11-12 Robert Reif - - * lib/checkclass.cpp: This patch fixes a bug I introduced in the - previous patch. It also speeds up nested class parsing by skipping - the entire class implementation using { link to jump to } rather - than parsing for }. Ticket: #2172 - -2010-11-12 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Uninitialized - variables: Passing uninitialized array as parameter to function. - Ticket: #2188 - -2010-11-12 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #914 - (improve check: usage of uninitialized variable) - -2010-11-12 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2148 - (uninitialized variable: false negative, function parameter that is - passed by value) - -2010-11-12 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2188 (Does - not detect initialization) - -2010-11-12 Daniel Marjamäki - - * lib/errorlogger.cpp: Fixed #2195 (unit tests failing) - -2010-11-11 Kimmo Varis - - * gui/resultstree.cpp: GUI: Add new "Summary" column to results. Summary column contains the short message core produces. - -2010-11-11 Kimmo Varis - - * gui/csvreport.cpp, gui/erroritem.cpp, gui/erroritem.h, - gui/resultstree.cpp, gui/threadresult.cpp, gui/txtreport.cpp, - gui/xmlreport.cpp: GUI: Add new short summary to error structures. Also rename 'msg' in structures to 'message' for consistency. - -2010-11-11 Kimmo Varis - - * gui/projectfiledialog.cpp: GUI: Add path separator in ProjectFiles - dialog. Add path separator to end of the paths user added via Browse-dialog. - -2010-11-11 Kimmo Varis - - * gui/projectfiledialog.cpp: GUI: Show native paths in ProjectFiles - -dialog. When adding paths to the dialog convert them to native separators. - When saving the paths convert them to internal separators. - -2010-11-11 Kimmo Varis - - * gui/projectfile.ui, gui/projectfiledialog.cpp, - gui/projectfiledialog.h: GUI: Add buttons to add new paths to - ProjectFile dialog. - -2010-11-11 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp, cli/threadexecutor.cpp, - gui/threadresult.cpp, lib/check.h, lib/checkother.cpp, - lib/cppcheck.cpp, lib/errorlogger.cpp, lib/errorlogger.h, - lib/preprocessor.cpp, test/testcppcheck.cpp, test/testsuite.cpp: - Fixed #2167 (Drop linefeeds from error messages) - -2010-11-11 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2192 (false - positive: resource leak) - -2010-11-11 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: typedef: better - handling of __typeof__ - -2010-11-11 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: typedefs: handle - __typeof__ - -2010-11-10 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Fixed #2185 (False - negative: when constant is undefined a 'dangerous usage of strncpy' - is not found) - -2010-11-10 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2182 - (Context sensitive false positive) - -2010-11-10 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2184 (False - Positive: memory leak) - -2010-11-10 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: Symbol database: code - cleanups - -2010-11-09 Daniel Marjamäki - - * lib/filelister_win32.cpp: FileLister: fixed compiler errors in - win32. accept all files given by user. - -2010-11-09 Daniel Marjamäki - - * lib/filelister.cpp, lib/filelister_unix.cpp: Fixed #2181 (How can - I select the extension of the files to check?) - -2010-11-09 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp, lib/cppcheck.cpp, lib/filelister.h, - lib/filelister_unix.cpp, lib/filelister_unix.h, - lib/filelister_win32.cpp, lib/filelister_win32.h, tools/dmake.cpp: - FileLister: minor cleanup - -2010-11-09 Daniel Marjamäki - - * lib/checkclass.cpp, test/testconstructors.cpp: Symbol database: - add support for class inline functions with classes - -2010-11-09 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Fixed - #2179 (Segmentation fault in assignment operator) - -2010-11-08 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #2178 (segmentation - fault of cppcheck) - -2010-11-08 Daniel Marjamäki - - * lib/filelister_win32.cpp: Fixed #2169 (Inline suppression does not - work unless filename is given) - -2010-11-08 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Only show 'failed to instantiate - template' debug messages if the --debug-warnings has been given - -2010-11-08 Daniel Marjamäki - - * lib/checkother.cpp: Visual Studio: Fixed compiler warnings about - assignment in condition - -2010-11-08 Robert Reif - - * lib/checkclass.cpp: Symbol database: delay finding class variables - until after all classes have been found. - -2010-11-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testbufferoverrun.cpp: - Tokenizer::simplifyKnownVariables: Fixed TODO test cases in - TestBufferOverrun - -2010-11-07 Daniel Marjamäki - - * lib/tokenize.cpp: Revert "Tokenizer: More specific bailout in - simplifyKnownVariables for loop variable" This reverts commit 7e9bb62dffd0b13303c66560e92d5d818576d3c1. - -2010-11-07 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: More specific bailout in - simplifyKnownVariables for loop variable - -2010-11-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testautovariables.cpp, - test/testtokenize.cpp: Tokenizer: More specific bail outs in - simplifyKnownVariables - -2010-11-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: better bailout - in simplifyKnownVariables when there is loop - -2010-11-07 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2170 (false positive: After a strncpy() the buffer should be - zero-terminated) - -2010-11-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: better - handling of const variables - -2010-11-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Bailout - simplifyKnownVariables for loop variables - -2010-11-06 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Symbol database: fixed - problem - -2010-11-06 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Refactoring the simplifyKnownVariable - -2010-11-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: improved - simplifyKnownVariables - -2010-11-06 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Refactoring. Merged two patterns into - one pattern. - -2010-11-06 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Added debug warning that is shown - when bailing out in simplifyKnownVariables - -2010-11-06 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2176 - (Tokenizer::simplifyTypedef function pointer bug) - -2010-11-06 Robert Reif - - * lib/checkclass.cpp: Symbol database: improved handling of out of - line functions returning function pointers - -2010-11-06 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2175 - (Tokenizer::simplifyTypedef : wrong simplification of 'typedef float - vec_t[3];') - -2010-11-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: - Tokenizer::simplifyKnownVariables : Fixed TODO test case when - simplifying pointer alias in function call - -2010-11-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: - Tokenizer::simplifyKnownVariables: Fixed TODO test case. - -2010-11-06 Daniel Marjamäki - - * test/testtokenize.cpp: Refactoring: Added ASSERT_EQUALS above - TODO_ASSERT_EQUALS to catch changes in the behaviour better - -2010-11-06 Daniel Marjamäki - - * test/testsimplifytokens.cpp: Added TODO unit test for ticket - #2175. simplify 'typedef float x[3];' - -2010-11-06 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2136 (false negative: array bounds) - -2010-11-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: removed - redundant assignments such as 'x+=0;'. Ticket: #2173 - -2010-11-06 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2174 - (Tokenizer::simplifyFunctionReturn bug) - -2010-11-05 Daniel Marjamäki - - * lib/tokenize.cpp, test/testbufferoverrun.cpp, - test/testsimplifytokens.cpp: Tokenizer: simplify calculations with - zero better - -2010-11-05 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: - simplifyknownvariables, improved handling of string constant - -2010-11-05 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Uninitialized - variables: better handling of for example 'a[1] = 1+a[2];' - -2010-11-05 Daniel Marjamäki - - * lib/checkuninitvar.cpp, test/testuninitvar.cpp: Uninitialized - variables: detect usage of dead pointer: '*p += 10' - -2010-11-04 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointers: - Fixed false negatives in the CheckAndDeRef checking - -2010-11-04 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2171 - (false positive: possible nullpointer dereference) - -2010-11-04 Daniel Marjamäki - - * lib/checkother.cpp: GCC: Fixed compiler warnings about - sign-conversion - -2010-11-04 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp, test/testuninitvar.cpp: - Fixed #2161 (false positive: assigned a value that is never used) - -2010-11-04 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Fixed 'a[b-1]+=1' - -2010-11-04 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: simplify - 'a[b-1]+=1' better - -2010-11-04 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2166 - (false positive: possible null pointer dereference) - -2010-11-04 Robert Reif - - * lib/checkpostfixoperator.cpp, test/testpostfixoperator.cpp: Fixed - #2168 (Segmentation fault of cppcheck) - -2010-11-04 Zachary Blair - - * lib/checkother.cpp, test/testother.cpp: Fixed #2137 (Invalid - mutual exclusion report) - -2010-11-04 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Symbol - database: Fixed bug. Ticket: #2149 - -2010-11-03 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Symbol database: Bug fix - -2010-11-03 Daniel Marjamäki - - * test/testtokenize.cpp: Tokenizer: Added TODO test case for better - handling of function calls - -2010-11-03 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2160 (#2160 - (Invalid unused variable report (style))) - -2010-11-03 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: empty - string test: Removed this check - -2010-11-02 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Unused variables: - better handling of '= %var% ++'. Ticket: #2160 - -2010-11-02 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp, test/testuninitvar.cpp: - Tokenizer: simplify 'x[0] += 1;' - -2010-11-02 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Symbol - Database: Better handling of namespaces. Ticket: #2149 - -2010-11-01 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: simplify 'x.y - += 1;' - -2010-11-01 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: simplify 'case - 0: x += y;' - -2010-11-01 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Fixed #2159 - (False positive: Null pointer dereference 'if (!x) return *y;') - -2010-11-01 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2158 (False - positive: value is not unused when using +=) - -2010-10-31 Kimmo Varis - - * cli/cppcheck.vcxproj, cli/cppcheck.vcxproj.filters, - test/test.vcxproj, test/test.vcxproj.filters: Update VS2010 project - files. - -2010-10-31 Daniel Marjamäki - - * lib/checknullpointer.cpp, test/testnullpointer.cpp: Null pointers: - Fixed false positive for 'x && x->y' - -2010-10-31 Daniel Marjamäki - - * lib/checknullpointer.cpp: CheckNullPointer: Reuse - CheckNullPointer::isPointerDeRef in - CheckNullPointer::nullPointerByDeRefAndChec - -2010-10-31 Daniel Marjamäki - - * lib/checknullpointer.cpp: CheckNullPointer: Reuse the - CheckNullPointer::isPointerDeRef function - -2010-10-31 Daniel Marjamäki - - * lib/checknullpointer.cpp: CheckNullPointer: Reduced false - negatives by making pattern more generic - -2010-10-31 Daniel Marjamäki - - * lib/checknullpointer.cpp, lib/checknullpointer.h: - CheckNullPointer: Refactoring. Created the function - CheckNullPointer::isPointerDeRef that can be used to detect if a - pointer is dereferenced - -2010-10-31 Kimmo Varis - - * gui/aboutdialog.cpp, gui/applicationdialog.cpp, - gui/applicationlist.cpp, gui/checkthread.cpp, gui/csvreport.cpp, - gui/filelist.cpp, gui/projectfiledialog.cpp, gui/report.cpp, - gui/resultstree.cpp, gui/settingsdialog.cpp, gui/statsdialog.cpp, - gui/threadhandler.cpp, gui/threadresult.cpp, gui/xmlreport.cpp: Add - missing include lines. - -2010-10-31 Daniel Marjamäki - - * cli/cppcheck.vcproj, test/test.vcproj: Visual Studio 2008: added - nullpointer and uninitvar files - -2010-10-31 Daniel Marjamäki - - * lib/checkother.cpp: Visual Studio: Fixed compiler error - -2010-10-31 Daniel Marjamäki - - * Makefile, lib/checkother.cpp, lib/checkother.h, - lib/checkuninitvar.cpp, lib/checkuninitvar.h, lib/lib.pri, - test/testother.cpp, test/testuninitvar.cpp: Uninitialized variables: - Broke out the checking into separate file - -2010-10-31 Daniel Marjamäki - - * Makefile, lib/checknullpointer.cpp, lib/checknullpointer.h, - lib/checkother.cpp, lib/checkother.h, lib/lib.pri, - test/testnullpointer.cpp, test/testother.cpp: Null pointers: Broke - out the checking into separate file - -2010-10-31 Daniel Marjamäki - - * lib/checkother.h: CheckOther: updated CheckOther::getErrorMessages - -2010-10-31 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: Added a few comments - -2010-10-31 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Variable usage: Fixed - false negative that I introduced when simplifying compound - assignments - -2010-10-31 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/tokenize.cpp, lib/tokenize.h, - test/testtokenize.cpp, test/testunusedvar.cpp: Fixed #2147 - (uninitialized variable: false negative for 'x += y;') - -2010-10-30 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: GCC: Fixed compiler warnings - -2010-10-30 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2120 (False positive: array index out of bounds (unknown type in - struct, sub function)) - -2010-10-30 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #2154 (false positive: - The loop might unintentionally skip an element in the container) - -2010-10-29 Kimmo Varis - - * Makefile: Update Makefile. - -2010-10-29 Kimmo Varis - - * test/test.vcxproj, test/test.vcxproj.filters: Update VS2010 - project files. - -2010-10-29 Kimmo Varis - - * test/test.vcproj, test/testfilelister.cpp, test/testpath.cpp: - Update tests after moving simplifyPath method to Path class. - -2010-10-29 Kimmo Varis - - * lib/cppcheck.cpp, lib/errorlogger.cpp, lib/filelister.cpp, - lib/filelister.h, lib/filelister_unix.h, lib/path.cpp, lib/path.h, - lib/preprocessor.cpp, lib/tokenize.cpp: Move simplifyPath method - from FileLister to Path class. simplifyPath() "fits" better to Path class conceptually. It handles - paths, not lists them. Also this way we get rid of few unneeded - dependencies to FileLister class. - -2010-10-28 Kimmo Varis - - * gui/application.ui: GUI: Improve External editor add/edit dialog - layout. Get rid of the form layout stretching the Browse-button so wide. Use - form-like but more flexible layout. Change the term 'Application to - execute' to 'Command to execute'. This reduces duplication and makes - clear difference between application name and the command to execute - to start the application. Fix also tab ordering so that the - application name field gets the focus initially. - -2010-10-28 Kimmo Varis - - * gui/applicationlist.cpp, gui/applicationlist.h: GUI: Use Notepad - in Windows as default editor if Notepad++ not found. - -2010-10-28 Kimmo Varis - - * gui/applicationlist.cpp: GUI: Failed to start default Notepad++. Notepad++ found and set as editor by default failed to start. There - were no quotation marks around path containing space chars. - -2010-10-28 Kimmo Varis - - * gui/applicationlist.cpp: GUI: It is Notepad++ with capital first - letter. - -2010-10-28 Kimmo Varis - - * gui/application.ui, gui/settingsdialog.cpp: GUI: Fix modality of - Application dialog when editing application. - -2010-10-28 Kimmo Varis - - * gui/resultstree.cpp: GUI: Fix saving new error categories names. - -2010-10-28 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkobsoletefunctions.cpp, - lib/checkother.cpp, lib/tokenize.cpp, lib/tokenize.h: Tokenizer: - Added function for checking if code is Java/C# - -2010-10-28 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Java: Removed bailout - added in 120073f0001 - -2010-10-27 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #2130 (Invalid possible NULL pointer dereference, etc.) - -2010-10-27 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #2141 (false - positive: possible null pointer dereference) - -2010-10-27 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #2142 (false - positive: null pointer dereference (throw)) - -2010-10-27 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1195 (Uninitialized - member variable not detected 'std::vector *ints;') - -2010-10-27 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #2135 (False - positive 'Can be const') - -2010-10-27 Pete Johns - - * test/testtokenize.cpp: Fixed test case so that it would compile. - -2010-10-27 Pete Johns - - * lib/tokenize.cpp, lib/tokenize.h: Removed unnecessary code - duplication. - -2010-10-26 Cary R - - * lib/settings.cpp: Fixed #2138 (Add support for comments in - suppression file) - -2010-10-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Tokenizer: Remove redundant semi colons - -2010-10-26 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: #2133 - (cppcheck: floating point exception) - -2010-10-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2118 (Invalid - syntax error report.) - -2010-10-26 Kimmo Varis - - * readme_64-bit_Windows.txt: Update GUI build instructions for - 64-bit Windows. - -2010-10-26 Kimmo Varis - - * readme_64-bit_Windows.txt: Improve 64-bit VS compiling - instructions for GUI. No extra tricks needed for compiling 64-bit GUI. Though it seems to - work only in command prompt but not in IDE. - -2010-10-25 Kimmo Varis - - * readme_64-bit_Windows.txt: Improve 64-bit VS compiling - instructions. Format the instructions being specifically for VS Express editions. - -2010-10-25 Kimmo Varis - - * readme_64-bit_Windows.txt: Couple of fixes to VS2010 and 64-bit - compile doc. - -2010-10-25 Kimmo Varis - - * cli/cppcheck.vcproj, cppcheck.sln, test/test.vcproj: Add 64-bit - targets for VS2008 project/solution files. Since VS2008 Express does not support x64 platform we must create - new configurations named Debug-x64 and Release-x64. - -2010-10-24 Kimmo Varis - - * readme_64-bit_Windows.txt: Add readme file for building Cppcheck - for 64-bit Windows. - -2010-10-24 Kimmo Varis - - * cli/cppcheck.vcxproj, cppcheck_vs2010.sln, test/test.vcxproj: Add - x64 build targets for VS 2010. This commit adds new x64-Debug and x64-Release -targets for VS 2010. - To use those targets you need Windows SDK with x64 compiler. - -2010-10-26 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #2134 (sizeof(*list) - complains of null pointer dereference) - -2010-10-26 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Fixed #2132 (Internal error. - Token::Match called with varid 0.) - -2010-10-26 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2129 - (Invalid dereference after release report) - -2010-10-26 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #2130 (Invalid - possible NULL pointer dereference, etc.) - -2010-10-25 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: null - pointer: use simplified token list in the 'check and deref' checking - -2010-10-25 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: uninitialized variables: - fixed fp when analysing loops - -2010-10-25 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #2127 (null pointer dereference after condition (SRD nr 522)) - -2010-10-25 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: using deallocated - pointer: detect first problem reported in ticket #2090 - -2010-10-24 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, lib/token.cpp, lib/token.h, - test/testother.cpp, test/testtoken.cpp: Fixed #2105 (Incorrect - operator: mutual exclusion over ||) - -2010-10-24 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Execution Path: Fixed - FP in improved handling of loop bodies - -2010-10-24 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Null pointers: Better - handling of loops - -2010-10-24 Daniel Marjamäki - - * lib/checkother.cpp: uninitialized variables: handling loop bodies. - end upon '}' - -2010-10-24 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp, test/testsuite.cpp: - uninitialized variables: refactoring handling of loop bodies - -2010-10-24 Daniel Marjamäki - - * lib/checkother.cpp, lib/executionpath.cpp, lib/executionpath.h, - test/testother.cpp: Fixed #2125 (uninitialized variable: better - handling of for loops) - -2010-10-24 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #2111 (Class methods - writing to a union are detected as 'can be const') - -2010-10-24 Kimmo Varis - - * cli/cppcheck.vcxproj, cli/cppcheck.vcxproj.filters, - test/test.vcxproj, test/test.vcxproj.filters: Add missing files to - VS2010 project/solution files. - -2010-10-24 Daniel Marjamäki - - * lib/checkother.cpp: Visual Studio: Fixed compiler warning. Ticket: - #2123 - -2010-10-24 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Buffer - overruns: Fixed TODO test case - -2010-10-23 Daniel Marjamäki - - * test/testcppcheck.cpp: fixed 'deprecated conversion' compiler - warning - -2010-10-23 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2121 (False positive: Buffer access out-of-bounds when using - uint32_t) - -2010-10-23 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Java: fixed false - positives about uninitialized variable - -2010-10-23 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2120 (False positive: array index out of bounds (unknown type in - struct, sub function)) - -2010-10-22 Daniel Marjamäki - - * lib/checkautovariables.cpp, test/testautovariables.cpp: Fixed - #1819 (False positive: auto variable assignment (unseen typedef)) - -2010-10-22 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2117 (false positive: buffer access out of bounds) - -2010-10-22 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp: astyle formatting - -2010-10-22 Lauri Nurmi - - * Makefile, cli/cppcheckexecutor.cpp, test/test.vcproj, - test/testcppcheck.cpp, tools/dmake.cpp: Fixed #2099 (Show an error - if none of the given paths was found) - -2010-10-22 Daniel Marjamäki - - * : Merge commit 'tigbuh/master' - -2010-10-21 ms - - * Cppcheck.xcodeproj/project.pbxproj: Adapted Xcode project for - version 1.45 and Xcode 3.2.4 - -2010-10-21 Daniel Marjamäki - - * test/testmemleak.cpp: memleak: activated todo test case. ticket: - #1401 - -2010-10-21 Daniel Marjamäki - - * lib/checkpostfixoperator.cpp: Fixed #2116 (Internal error. - Token::Match called with varid 0) - -2010-10-21 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2112 (Crash - scanning qtcreator sources) - -2010-10-20 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkobsoletefunctions.cpp, - lib/tokenize.cpp, test/testtokenize.cpp: JAVA: better handling of - java code - -2010-10-20 Daniel Marjamäki - - * lib/filelister.cpp: Objective C: activate checking of .m and .mm - files. The normal checking is used. - -2010-10-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testmemleak.cpp, test/testtokenize.cpp: - Fixed #2103 (false positive when variable is checked to NULL and not - freed) - -2010-10-20 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2113 (False - positive: Memory leak where a pointer is passed in a struct to - another function to be freed) - -2010-10-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2110 - (Tokenizer::simplifyTypedef: regression - wrong simplification of - 'typedef char TString[256];') - -2010-10-19 Daniel Marjamäki - - * lib/checkmemoryleak.h, lib/checkother.cpp, lib/filelister.cpp, - lib/tokenize.cpp, test/testtokenize.cpp: Activated checking of .java - and .cs files - -2010-10-19 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Stl: improved check for - dangerous usage of c_str - -2010-10-19 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2109 (false positive: buffer overrun) - -2010-10-18 Kimmo Varis - - * : Merge remote branch 'remotes/origin/master' - -2010-10-18 Reijo Tomperi - - * cppcheck.cbp: Update codeblocks project file - -2010-10-18 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #2108 (False positive: - the loop might unintentionally skip an element in the container.) - -2010-10-18 Kimmo Varis - - * gui/main.ui: GUI: Shorten menutexts for error/style items. Items located in 'View' menu don't need 'Show' word as View-menu - name already implies it is about viewing items. - -2010-10-18 Kimmo Varis - - * gui/common.h, gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h, - gui/resultstree.cpp: GUI: Add support for warning and performance - -error types. - -2010-10-17 Daniel Marjamäki - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: STL: check for - dangerous usage of string::c_str(). Ticket: #1116 - -2010-10-17 Daniel Marjamäki - - * man/manual.docbook: manual: added info about - warning/style/performance. Ticket: #2106 - -2010-10-17 Ettl Martin - - * : commit 92a1e9e76e903b570ba1b0d04128b425a48789d1 Author: Daniel - Marjamäki Date: Sun Oct 17 14:41:00 2010 - +0200 - -2010-10-17 Ettl Martin - - * lib/checkclass.cpp: fixed style waring (You should use ++ and -- - as prefix whenever possible as these are more efficient than postfix - operators) in lib/checkclass.cpp - -2010-10-17 Kimmo Varis - - * Makefile, lib/lib.pri: Run dmake to update Makefile and - lib/lib.pri. - -2010-10-17 Kimmo Varis - - * lib/filelister_win32.cpp: Add comment that qmake doesn't add - _UNICODE define for project files. - -2010-10-17 Kimmo Varis - - * cli/cppcheck.vcxproj, cli/cppcheck.vcxproj.filters, - test/test.vcxproj, test/test.vcxproj.filters: Add missing files to - VS2010 project files. - -2010-10-16 Kimmo Varis - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cli/cppcheck.vcxproj.filters, test/test.vcproj, test/test.vcxproj, - test/test.vcxproj.filters: Add missing files to VS projects. Part of fixing ticket #2101. - -2010-10-16 Daniel Marjamäki - - * cli/cppcheck.vcproj, lib/filelister_win32.cpp: unicode: updates to - the handling of unicode filenames. Ticket: #2100 - -2010-10-16 Daniel Marjamäki - - * cli/cppcheck.vcproj, lib/filelister_win32.cpp: unicode: use short - filenames when long filename doesn't work. Temporary solution for - #2100 - -2010-10-15 Daniel Marjamäki - - * lib/checkstl.h: some more comments - -2010-10-15 Daniel Marjamäki - - * lib/checkstl.cpp: added comments in CheckStl - -2010-10-15 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #2101 (list in vector - iterator usage) - -2010-10-14 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2097 (false positive: buffer access out of bounds) - -2010-10-14 Daniel Marjamäki - - * lib/checkpostfixoperator.cpp, test/testpostfixoperator.cpp: astyle - formatting - -2010-10-14 Debrard Sebastien - - * : commit fb928b67781e57348f62104b49d94099c825cc9c Merge: d062980 - 6c582f9 Author: Debrard Sebastien - Date: Thu Oct 14 19:08:31 2010 +0200 - -2010-10-14 Debrard Sebastien - - * : commit 6c582f9362ca13da701aa3b6b1ed6808ec78db01 Merge: e199e31 - b6c995e Author: Kimmo Varis Date: Wed Oct 13 - 22:16:17 2010 +0300 - -2010-10-13 Kimmo Varis - - * win_installer/cppcheck.wxs: WiX Installer: Remove old gui.exe. - -2010-10-13 Kimmo Varis - - * win_installer/readme.txt: Update WiX installer documentation. - -2010-10-13 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2096 (False positive: buffer overrun (extern array)) - -2010-10-13 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2082 - (Tokenizer::simplifyTypedef: wrong handling of array) - -2010-10-13 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2093 (False positive: buffer access out of bounds (unknown type)) - -2010-10-13 Pete Johns - - * lib/checkother.cpp: Fixed MSVC++ compiler warning (pointers are - not bools) - -2010-10-13 Pete Johns - - * lib/checkother.cpp: Removed redundant code. localClassDefinition is no longer required due to improved - isIdentifierObjectType() in commit fbd3d92. - -2010-10-13 Pete Johns - - * lib/checkother.cpp, test/testother.cpp: Fixed #2084 (False - positive: object destroyed immediately (struct and function with - same name)) Tightened up class definition matching so as not to match C-style - struct tags. - -2010-10-13 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Fixed - #2089 (False negative: Function can be const (calling const - function)) - -2010-10-12 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2087 (False - positive: Array 'str[1]' index 1 out of bounds) - -2010-10-12 Debrard Sebastien - - * lib/checkpostfixoperator.cpp: warning de compilation - -2010-10-12 Debrard Sebastien - - * lib/checkpostfixoperator.cpp: comment - -2010-10-12 Debrard Sebastien - - * Makefile, lib/checkother.cpp, lib/checkother.h, - lib/checkpostfixoperator.cpp, lib/checkpostfixoperator.h, - test/testother.cpp, test/testpostfixoperator.cpp: increment check - -2010-10-12 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #2088 ([test.c:12]: (error) Buffer access out-of-bounds: l) - -2010-10-12 Pete Johns - - * .gitignore, Makefile, tools/dmake.cpp: Added tags file for faster - code navigation. [Helpful for newbies like me] - -2010-10-12 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #2085 (False - negative: function can be const when member variable is compared) - -2010-10-12 Pete Johns - - * man/cppcheck.1.xml: Licensing: Using the GPL 3 license - -2010-10-11 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Array - index: detect array index out of bounds when datatype is unknown. - Ticket: #2086 - -2010-10-11 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: assignment in assert: - modified the error message to better explain the reason why the - warning is given. - -2010-10-11 Robert Reif - - * lib/checkclass.cpp: Fixed #2081 (false negative: the function can - be declared as const) - -2010-10-10 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, lib/tokenize.cpp, - test/testother.cpp: Fixed #2079 (detect side effects in assert) - -2010-10-10 Daniel Marjamäki - - * lib/tokenize.cpp, test/teststl.cpp, test/testtokenize.cpp: - Tokenize: Fixed bug in Tokenize::simplifyKnownVariables - -2010-10-10 Daniel Marjamäki - - * test/teststl.cpp: STL: Added TODO test case for the new - double-increment check - -2010-10-10 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: STL: fixed false positives in - the new double-increment check when iterator shadows outer iterator - -2010-10-10 Daniel Marjamäki - - * test/testother.cpp: fix unit testing - -2010-10-10 Daniel Marjamäki - - * lib/checkother.cpp: Parameter passed by value: updated error - message so it mentions the reason. - -2010-10-10 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: STL: fixed false positives for - the new double-increment check - -2010-10-10 Daniel Marjamäki - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: STL: Added - double-increment check. - -2010-10-10 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1705 (false negative: access past end of buffer) - -2010-10-10 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #2078 (false - negative: member variable not intialized) - -2010-10-09 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1778 (false - negative: nullpointer dereference (std::string pointer)) - -2010-10-09 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: STL: Fixed TODO test case - TestStl::erase5 - -2010-10-08 Daniel Marjamäki - - * test/teststl.cpp: Unit testing: Added TODO test case - TestStl::erase5 - -2010-10-08 Daniel Marjamäki - - * test/teststl.cpp: Unit testing: activated TODO test - -2010-10-08 Daniel Marjamäki - - * Makefile, lib/classinfo.h, lib/tokenize.cpp, lib/tokenize.h, - test/testtokenize.cpp: ClassInfo: Removed unused functionality - -2010-10-08 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp: CLI: added newline when printing version - info - -2010-10-08 Robert Reif - - * test/testsimplifytokens.cpp: Unit Testing: Added more typedef - tests - -2010-10-06 Robert Reif - - * lib/tokenize.cpp: Fixed #2074 ('Internal error in Cppcheck' on - complex function typedef (even 2 typedefs!)) - -2010-10-05 Daniel Marjamäki - - * lib/checkstl.cpp, lib/checkstl.h, lib/executionpath.cpp, - lib/executionpath.h, test/testother.cpp, test/teststl.cpp: STL: - refactoring CheckStl::erase so ExecutionPath is used - -2010-10-05 Daniel Marjamäki - - * man/manual.docbook: 1.45: updated the manual - -2010-10-04 Kimmo Varis - - * win_installer/cppcheck.wxs: Fix invalid ID error in MSI installer. - -2010-10-04 Pete Johns - - * lib/checkother.h: Fixed 2072 (object destroyed immediately: add - --doc info) - -2010-10-04 Pete Johns - - * lib/checkother.cpp, test/testother.cpp: Fixed 2071 (false - positive: object destroyed immediately (when using '= { ... }')) Simplified check within CheckOther::checkMisusedScopedObject() as a - result. - -2010-10-03 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Revert "temporarily - disable the 'object destroyed immediately' message" This reverts commit fa94312c9a31e4d078464e6e96089b44d86aaeb9. - -2010-10-03 Daniel Marjamäki - - * createrelease: createrelease: removed the tagging from the script - -2010-10-03 Daniel Marjamäki - - * Makefile: Makefile: switch back to debug mode - -2010-10-03 Daniel Marjamäki - - * Makefile: 1.45: updated Makefile for release - -2010-10-03 Daniel Marjamäki - - * Changelog: 1.45: Updated Changelog - -2010-10-03 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, lib/cppcheck.cpp, - win_installer/productInfo.wxi: 1.45: updated version information - -2010-10-03 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: temporarily disable the - 'object destroyed immediately' message - -2010-10-03 Reijo Tomperi - - * gui/erroritem.cpp, gui/erroritem.h, gui/logview.cpp, - gui/logview.h, gui/project.cpp, gui/project.h, - gui/projectfiledialog.cpp, gui/projectfiledialog.h, - gui/statsdialog.cpp, gui/statsdialog.h: Fix encoding in some files - -2010-10-03 Reijo Tomperi - - * man/cppcheck.1.xml: Update man page - -2010-10-02 Pete Johns - - * lib/checkother.cpp, test/testother.cpp: Fix false positive: - Misused Scope Object does not pick constructors of local class - declarations. It does pick up if there is an unused construction within the - function, though. - -2010-10-02 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2069 - (cppcheck fails to scan OpenBSDs ftp source code) - -2010-10-02 Pete Johns - - * lib/checkother.cpp, test/testother.cpp: Fixed false positive: - checkMisusedScopedObject no longer errors on calls to function - objects. - -2010-10-02 Pete Johns - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Prevent - Tokenizer::simplifyCalculations() from removing parantheses from - calls to Functors. - -2010-10-02 Daniel Marjamäki - - * test/testtokenize.cpp: Unit Testing: added missing TEST_CASE - -2010-10-02 Pete Johns - - * lib/checkother.cpp, test/testother.cpp: Fixed false-positive: - Object is referenced on construction struct Foo { void bar() { } }; void fn() { Foo().bar(); // This caused a false-positive } - -2010-10-02 Pete Johns - - * lib/checkother.cpp, test/testother.cpp: Check misused scope object - does not pick local class method. Also fixed mistyped withinFuntion ->withinFunction. - -2010-10-02 Pete Johns - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Added - test for functor false-positive [passing] Also removed typedef's following danmar's review and renamed - isClassresults -> isClassResults to make more clear. - -2010-10-02 Daniel Marjamäki - - * test/test.vcproj: Visual Studio: updated test/test.vcproj - -2010-10-02 Daniel Marjamäki - - * test/options.cpp: Visual Studio: Fixed compiler error. It seems - visual studio 2008 doesn't like 'not'. - -2010-10-02 Pete Johns - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #1132 (Detection of misused scope objects in functions) Emits error in the form: [useless_lock.cpp:18]: (error) instance of "Lock" object - destroyed immediately ...if an instance of a class or struct is unnamed and therefore - destroyed straight after creation. Only checks for misused scope objects within functions. Optimised isIdentifierObjectType() by memoizing. - -2010-10-01 Pete Johns - - * lib/checkother.cpp, lib/checkother.h, lib/token.cpp, - test/testother.cpp: Revert "Fixed #1132 (Detection of misused scope - objects)" This reverts commit c6acdccfa05dc31c4297d7e6f2467763161874ed. - -2010-10-01 Pete Johns - - * lib/checkother.cpp, lib/checkother.h, lib/token.cpp, - test/testother.cpp: Fixed #1132 (Detection of misused scope objects) Emits error in the form: [useless_lock.cpp:18]: (error) instance of "Lock" object - destroyed immediately ...if an instance of a class or struct is unnamed and therefore - destroyed straight after creation. Removed "internal error" from token.cpp, since in this case varid - would be NULL. - -2010-09-30 Daniel Marjamäki - - * lib/checkclass.cpp, lib/tokenize.cpp, lib/tokenize.h, - test/testunusedprivfunc.cpp: Fixed #2067 (Template methods do not - 'use' private ones) - -2010-09-27 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #2066 (false - positive: uninitialized variable when initializing through function - pointer) - -2010-09-27 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2065 (false - positive: memory leak) - -2010-09-27 Pete Johns - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1949: - assert() hides memory leaks Added separate unit-test (trac1949), initially broken to highlight - the error and added "assert" to call_func_white_list. Left TestMemleakInFunction::call_func() as is, as this wouldn't - highlight the actual problem. - -2010-09-26 Daniel Marjamäki - - * lib/tokenize.cpp: Optimisation: Made Tokenizer::simplifyInitVar - faster - -2010-09-26 Pete Johns - - * .gitignore: Ignore gcov and doxygen ephemera. - -2010-09-26 Pete Johns - - * test/options.h, test/redirect.h: Added Doxygen commenting, per - kimmov's request. Of course test/ is not covered currently by the settings in - doxyfile. - -2010-09-26 Kimmo Varis - - * gui/gui.pro: GUI: Fix path separators in project file. Qt 4.7 qmake warns about using backslash in paths. - -2010-09-26 Pete Johns - - * test/options.cpp, test/options.h, test/testoptions.cpp: Removed - static std::string. which_test() doesn't have to calculate anything, could be inlined. - -2010-09-26 Pete Johns - - * test/testtoken.cpp: Replaced TODO in numeric test with two passing - tests. Just getting to grips with how the tokenizer behaves. - -2010-09-26 Pete Johns - - * test/testtoken.cpp: Improved test coverage. Refactored to extract givenACodeSampleToTokenize, reducing LOC. - -2010-09-26 Pete Johns - - * Makefile, test/options.cpp, test/options.h, test/testoptions.cpp, - test/testrunner.cpp, test/testsuite.cpp, test/testsuite.h, - tools/dmake.cpp: Added `check` target. Runs the test as per `make test`, but with less verbosity. -g GCC-style errors -q quiet tests - -2010-09-26 Pete Johns - - * test/redirect.h: Renamed RedirectInputOutput -> - RedirectOutputError This class does not redirect input. - -2010-09-26 Pete Johns - - * test/redirect.h, test/testcmdlineparser.cpp: Extracted Error and - Output redirection. Making reuse possible. - -2010-09-24 Daniel Marjamäki - - * lib/tokenize.cpp: Revert "Optimisation: small speedups in the - Tokenizer::simplifyTokenList handling" This reverts commit 056037feed8503f5e51428da5cf37aa24d502ffc. - -2010-09-24 Daniel Marjamäki - - * lib/tokenize.cpp: Optimisation: small speedups in the - Tokenizer::simplifyTokenList handling - -2010-09-24 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1951 - (Preprocessor: Compound macro statements not handled correctly) - -2010-09-24 Daniel Marjamäki - - * lib/checkother.cpp: Optimisation: Removed unused and slow code. - The code was added to fix #1225 but it is now redundant. - -2010-09-23 Daniel Marjamäki - - * lib/checkother.cpp: Optimisation to make the CheckUninitVar::parse - slightly faster - -2010-09-23 Pete Johns - - * .gitignore: dmake can now be made from ./Makefile Ignore this build artefact as well as the one under ./tools, since - that can be built too. - -2010-09-22 Reijo Tomperi - - * Makefile, tools/dmake.cpp: Makefile improvements related to clean, - dmake and man targets. - -2010-09-22 Daniel Marjamäki - - * lib/cppcheck.cpp, lib/errorlogger.cpp, lib/filelister.cpp, - lib/path.cpp, lib/path.h, test/testfilelister.cpp: Fixed #2059 - (cppcheck gives wrong path in error description) - -2010-09-20 Daniel Marjamäki - - * lib/token.cpp: Optimisation: optimised Token::Match - -2010-09-20 Kimmo Varis - - * lib/lib.vcproj, lib/lib.vcxproj, lib/lib.vcxproj.filters: Delete - unused VS lib-projects. Those projects are just remainder from tries to create a real - library from the lib code. - -2010-09-20 Kimmo Varis - - * cppcheck_vs2010.sln: VS2010: Remove lib-project from the solution. The lib-project is not really used for anything. It is just - remainder from tries to create real library from lib code. - -2010-09-20 Daniel Marjamäki - - * lib/checkclass.cpp: Optimisation: small optimisation of - CheckClass::privateFunctions - -2010-09-20 Kimmo Varis - - * lib/lib.vcxproj, lib/lib.vcxproj.filters, test/test.vcxproj, - test/test.vcxproj.filters: Update VS2010 solution/project files. - -2010-09-20 Pete Johns - - * Makefile: Autogenerated Makefile updated. - -2010-09-19 Pete Johns - - * tools/dmake.cpp: Wrapped variables in conditions This allows CXX and CXXFLAGS to be overridden without patching. - Added PREFIX for MacPorts compatibility, allowing staging to - $(DESTDIR)$(PREFIX)/bin, leaving original behaviour unchanged. Exit early if run in incorrect directory or if Makefile cannot be - written. - -2010-09-19 Pete Johns - - * runastyle: Fixed syntax error "./runastyle: line 4: --suffix=none: command not found" - -2010-09-19 Daniel Marjamäki - - * lib/token.cpp: Refactorings: Optimised the Token::multiCompare - function - -2010-09-19 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2056 (False - positive: Resource leak) - -2010-09-18 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1802 - (Preprocessor: macros are expanded wrong) - -2010-09-18 Daniel Marjamäki - - * test/teststl.cpp: STL: added TODO test case - -2010-09-18 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Check - Class: Removed the 'operator= should not return a const reference' - -2010-09-18 Daniel Marjamäki - - * lib/checkclass.h: CheckClass: the 'virtual destructor' checking is - currently inactive - -2010-09-18 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #2053 (false positive on - list erase) - -2010-09-18 Daniel Marjamäki - - * cli/cmdlineparser.cpp: Fixed #2054 (Missing newline in 'invalid - parameter' error message) - -2010-09-18 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #2052 (False - positive: possible null pointer dereference 'else continue') - -2010-09-18 Daniel Marjamäki - - * all.pro, test/test.pro: removed qmake files for the cli and unit - tests - -2010-09-18 Daniel Marjamäki - - * cli/cppcheck.vcproj: Visual Studio 2008: Updated - cli/cppcheck.vcproj - -2010-09-18 Daniel Marjamäki - - * cppcheck.sln, test/test.vcproj: Visual Studio 2008: Updated the - project/solution files - -2010-09-18 Daniel Marjamäki - - * test/test.pro: updated test/test.pro - -2010-09-17 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #2045 (False - negative: Uninitialized variable (found with gcc)) - -2010-09-17 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Execution Paths: fixed - TODO test cases - -2010-09-16 Daniel Marjamäki - - * gui/about.ui: ln-: updated copyright - -2010-09-16 Ettl Martin - - * Makefile: reverted makefile changes back from clang++ to g++ - -2010-09-16 Ettl Martin - - * Makefile, lib/path.cpp: fixed clang++ warning: lib/path.cpp:80:2: - warning: no newline at end of file [-pedantic] - -2010-09-16 Daniel Marjamäki - - * Makefile, lib/checkother.cpp, lib/checkother.h, lib/checkstl.cpp, - lib/checkstl.h, test/test.pro, test/testother.cpp, - test/testredundantif.cpp, test/teststl.cpp: Redundant conditions: - some refactorings * removed the 'redundant null pointer' check. sometimes it's unsafe - to delete NULL pointer. and this check doesn't point out errors - anyway. * moved the 'redundant condition' check for set::remove. Moved it to - CheckStl. - -2010-09-15 Ettl Martin - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h: fixed - warning from cppcheck: [lib/checkbufferoverrun.h:129]: (style) - 'operator=' should not return a const reference - -2010-09-15 Daniel Marjamäki - - * lib/preprocessor.cpp: Fixed #2032 (inline suppressions fail with - comment on the same line as function) - -2010-09-15 Daniel Marjamäki - - * lib/preprocessor.cpp: Fixed #2033 (all inline suppressions fail - with relative paths) - -2010-09-15 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #2049 (False - negative: 'Uninitialized variable' error won't show) - -2010-09-15 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: fixed variable - declaration simplification - -2010-09-14 Daniel Marjamäki - - * verify/codeeditor.cpp, verify/codeeditor.h: cppcheck-verify: added - 'codeeditor' files - -2010-09-14 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: the 'failed to parse typedef' - messages should not be shown unless --debug-warnings are given - -2010-09-14 Daniel Marjamäki - - * verify/cppcheck-verify.pro, verify/mainwindow.cpp, - verify/mainwindow.h, verify/mainwindow.ui: cppcheck-verify: added - code editor that highlight the errors - -2010-09-14 Daniel Marjamäki - - * verify/mainwindow.cpp, verify/mainwindow.h, verify/mainwindow.ui: - cppcheck-verify: added 'open' menu - -2010-09-14 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #2048 - (Preprocessor: ifndef incorrectly simplified) - -2010-09-14 Robert Reif - - * lib/preprocessor.cpp: Preprocessor: Report #error configuration - when -D is used. Ticket: #2042 - -2010-09-14 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Symbol database: Skip bail - out in constructors if a virtual function might be called because - that would be undefined behaviour. Ticket: #1895 - -2010-09-13 Daniel Marjamäki - - * verify/Makefile, verify/cppcheck-verify.pro, verify/main.cpp, - verify/mainwindow.cpp, verify/mainwindow.h, verify/mainwindow.ui: - cppcheck-verify: changed it into a Qt project - -2010-09-13 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - Handle C++0x rawstrings by replacing them with normal strings. - Ticket: #2022 - -2010-09-13 Daniel Marjamäki - - * lib/preprocessor.cpp: Revert "Preprocessor: Report #error - configuration when -D is used. Ticket: #2042" This reverts commit 674644cb29f3eed4dcfba7f5dceb8dd0baca229a. - -2010-09-13 Robert Reif - - * lib/preprocessor.cpp: Preprocessor: Report #error configuration - when -D is used. Ticket: #2042 - -2010-09-12 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Symbol - database: reduce false negatives for 'uninitialized variable' when - calling base class function. ticket: #1895 - -2010-09-12 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - remove redundant 'if return ; else|' - -2010-09-12 Robert Reif - - * lib/cppcheck.cpp, lib/preprocessor.cpp, lib/preprocessor.h, - test/testpreprocessor.cpp: Fixed #2042 (#error messages should be - displayed when user defines are used) - -2010-09-12 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - reduce 'loop { if continue ;' to 'loop {' - -2010-09-12 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Memory leaks: insert ';' in the - simplifycode to split up the commands - -2010-09-12 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - simplify 'loop { use ; callfunc ; }' to 'use ;' - -2010-09-12 Daniel Marjamäki - - * verify/main.cpp: cppcheck-verify: fixed some false positives for - array declarations - -2010-09-12 Daniel Marjamäki - - * verify/Makefile, verify/main.cpp, verify/readme.txt: - cppcheck-verify : added subproject - -2010-09-11 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - simplify 'if break ; break ;' - -2010-09-11 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - simplify 'use use' - -2010-09-11 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Memory leaks: don't write debug warning - for '; alloc ; dealloc ; return ; }' - -2010-09-11 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: fixed - try/catch and nested loops simplifications - -2010-09-11 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - improved simplification for 'callfunc' - -2010-09-11 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - Improved the simplifycode for 'use ; if| use ;' - -2010-09-11 Kimmo Varis - - * win_installer/cppcheck.wxs, win_installer/productInfo.wxi: - Installer: Update executable name to cppcheck-gui. - -2010-09-11 Kimmo Varis - - * : commit b88ce77e4ac85d1b32981c63cb5c538e9740b6e9 Author: Kimmo - Varis Date: Sat Sep 11 12:15:46 2010 +0300 - -2010-09-11 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2023 (false - positive with realloc()) - -2010-09-11 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Symbol - database: fixed false positive. ticket: #1895 - -2010-09-10 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #2030 (False - positive: Uninitialized variable when function does not return) - -2010-09-10 Kimmo Varis - - * cli/cmdlineparser.cpp, cli/cmdlineparser.h: Fix ticket #2040 (some - cli messages are missing a return at the end) - -2010-09-10 Kimmo Varis - - * : commit 0fd51a814f480ec5ac3dd01b848ec9d5a07cf05a Author: Kimmo - Varis Date: Fri Sep 10 17:42:14 2010 +0300 - -2010-09-10 Robert Reif - - * lib/checkclass.cpp: Symbol database: Refactoring. ticket: #1895 - -2010-09-09 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp, test/testunusedvar.cpp: - Fixed #2039 (unions not handled properly, false positive about - initialization) - -2010-09-09 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: Fixed - #2038 (memleak false positive with assignment expression in - arguments) - -2010-09-09 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2025 (iso646 c++ - operators are not handled correctly) - -2010-09-09 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: Symbol database: refactoring - - differentiate between member data initialization and assignment - and save the order of variable declarations. makes it possible to - create some additional checks. ticket: #1895 - -2010-09-09 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Symbol database: fixed - false negative for uninitialized variable. ticket: #1895 - -2010-09-08 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #2037 - (memleak not detected in exit path when variable used) - -2010-09-08 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: CheckMemoryleaks: - reduce 'use ; if return ; dealloc ;' to 'if return ; dealloc ;'. - ticket: #2037 - -2010-09-08 Daniel Marjamäki - - * cli/cmdlineparser.cpp, test/testcmdlineparser.cpp: cmdlineparser: - allow space between -D and define name. ticket: #2036 - -2010-09-08 Kimmo Varis - - * test/testcmdlineparser.cpp: Add tests for userdefines and - userincludes for CmdLineParser. - -2010-09-08 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2035 (Enum - 'qboolean' hides typedef with same name) - -2010-09-07 Daniel Marjamäki - - * test/testtoken.cpp, test/testtokenize.cpp: unit testing: moved - TestTokenizer::match tests to the TestToken - -2010-09-07 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #2030 (False - positive: Uninitialized variable when function does not return) - -2010-09-07 Daniel Marjamäki - - * lib/checkclass.cpp, lib/tokenize.cpp, test/testtokenize.cpp, - test/testunusedprivfunc.cpp: Fixed #2034 (false positive: unused - private function (Borland C++ __property)) - -2010-09-07 Reijo Tomperi - - * test/testcmdlineparser.cpp: One more encoding fix. - -2010-09-06 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp: cmdlineparser: use given settings - -2010-09-06 Kimmo Varis - - * gui/mainwindow.cpp: GUI: use new style API to enable style checks. - -2010-09-06 Kimmo Varis - - * test/testcmdlineparser.cpp: Add more tests for CmdLineParser. - -2010-09-06 Kimmo Varis - - * : commit ed656e02e47df47d98ba079aa418012072fd7584 Author: Kimmo - Varis Date: Mon Sep 6 22:45:29 2010 +0300 - -2010-09-06 Reijo Tomperi - - * cli/cmdlineparser.cpp, cli/cmdlineparser.h, lib/timer.cpp: Set - encoding to UTF-8 for some files. - -2010-09-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2024 - (Internal Error on multiple append calls on same string object) - -2010-09-06 Kimmo Varis - - * cli/cmdlineparser.cpp, cli/cmdlineparser.h, test/test.vcproj, - test/test.vcxproj, test/test.vcxproj.filters, - test/testcmdlineparser.cpp: Add couple of basic tests for - CmdLineParser. - -2010-09-06 Kimmo Varis - - * lib/cppcheck.cpp: Add back as GCC requires it. I removed after checking it builds with VS 2008. But Dan - pointed out GCC needs that header. - -2010-09-06 Kimmo Varis - - * lib/cppcheck.cpp, lib/cppcheck.h: Remove unneeded includes. - -2010-09-06 Kimmo Varis - - * cli/cmdlineparser.h: Add some comments for the CmdLineParser - class. Also remove one unneeded forward declaration. - -2010-09-06 Daniel Marjamäki - - * cli/cmdlineparser.cpp: --help : added info about the - '--enable=missingInclude' command - -2010-09-06 Stefan Naewe - - * cli/cmdlineparser.cpp: cmdlineparser: handle '-h'/'--help' - correctly - -2010-09-06 Robert Reif - - * lib/checkclass.cpp: const functions: fixed false negatives for the - type P. ticket: #1884 - -2010-09-05 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: removed - 'empty catch block' check. to avoid false positives we'll need to - check if it is bad with an empty catch block (dead pointer/undefined - behaviour/etc) - -2010-09-05 Kimmo Varis - - * : commit c02d1bdce464968dcbe6ec64bb0d036dbb9a7d9d Author: Kimmo - Varis Date: Sun Sep 5 14:15:24 2010 +0300 - -2010-09-05 Kimmo Varis - - * win_installer/cppcheck.wxs, win_installer/productInfo.wxi: - Installer: Fix GUIDs and attributes for couple of components. - -2010-09-05 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: Add own component for GUI - translation files. - -2010-09-05 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: combine readme.txt and - authors.txt to one component. - -2010-09-05 Kimmo Varis - - * win_installer/config.wxi, win_installer/cppcheck.wxs: Installer: - Install new Qt-help help file. - -2010-09-05 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts: GUI: Upate translation files. - -2010-09-05 Kimmo Varis - - * Makefile, cli/cmdlineparser.cpp: Fix compiling with GCC. - -2010-09-05 Kimmo Varis - - * lib/cppcheck.cpp: Remove unused function. I forgot to remove the function that was used in command line - parsing code. - -2010-09-05 Kimmo Varis - - * test/testcppcheck.cpp: Disable command line tests after - refactoring command line handling. Disable the tests until I create tests that work with the new code. - -2010-08-31 Kimmo Varis - - * cli/cmdlineparser.cpp, cli/cmdlineparser.h, cli/cppcheck.vcproj, - cli/cppcheck.vcxproj, cli/cppcheck.vcxproj.filters, - cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h, lib/cppcheck.cpp, - lib/cppcheck.h: Move CLI command line parsing to own class. - -2010-09-05 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2021 (false - positive: syntax error with -std=gnu++0x code) - -2010-09-05 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2020 (false - positive: (error) Uninitialized variable, used in asm statement) - -2010-09-05 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Fixed problem - in Tokenizer::simplifyRedundantParanthesis when simplifying 'void - delete(double num);' - -2010-09-04 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #2010 (missing - continue in switch check ?) - -2010-09-04 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #2015 (### Internal - error in Cppcheck. Please report it.) - -2010-09-04 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2017 (false - positive::struct or union member 'Base::m_ui' is never used) - -2010-09-04 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Refactoring CheckMemoryLeaks - -2010-09-03 Daniel Marjamäki - - * lib/cppcheck.cpp, lib/preprocessor.cpp, lib/preprocessor.h, - lib/settings.cpp, test/testpreprocessor.cpp: Fixed #1872 (Confused - -v switch) - -2010-09-03 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1976 (False - Positives with unions) - -2010-09-03 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/executionpath.cpp, - test/testmemleak.cpp, test/testother.cpp: Fixed #2014 (False - positive with longjmp) - -2010-09-03 Robert Reif - - * test/testclass.cpp: Symbol database: Added todo testcase for - better namespace handling. Ticket: #1895 - -2010-09-02 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/tokenize.cpp, lib/tokenize.h, - test/testpreprocessor.cpp: Fixed #1975 (segmentation fault of - cppcheck) - -2010-09-02 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Null pointer: Fixed false - positive - -2010-09-02 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Fixed Cppcheck - warnings - -2010-09-02 Robert Reif - - * lib/checkclass.cpp, test/testunusedprivfunc.cpp: Symbol database: - Fixed false negatives for unused private functions. Ticket: #1895 - -2010-09-02 Sbastien Debrard - - * gui/filelist.cpp, lib/filelister.cpp: Fixed #1972 (file - extensions) - -2010-09-02 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #2011 (Parser - error in template function) - -2010-09-02 Kimmo Varis - - * win_installer/cppcheck.wxs: GUI: Add more QT DLLs to Windows - installer. Help viewer requires help dll and couple of deoendent dlls to be - installed also. - -2010-09-02 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: Symbol database: adds - support for inline functions returning function pointers and starts - to convert privateFunctions over to the symbol database. Ticket: - #1895 - -2010-09-01 Kimmo Varis - - * gui/threadhandler.cpp: GUI: Fix slot name for debugerrors. Now DebugErrors get correctly routed to check log. The wrong slot - name also caused a warning printed to the console as reported by - thevbm in ticket #2006. - -2010-09-01 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testclass.cpp, - test/testtokenize.cpp: Fixed #2007 (False positive: member variable - not initialized (Borland C++ property)) - -2010-09-01 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: refactoring namespace - handling. ticket: #2001 - -2010-08-31 Zachary Blair - - * gui/gui.pro, gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h, - gui/stats.ui, gui/statsdialog.cpp, gui/statsdialog.h, - gui/threadhandler.cpp, gui/threadhandler.h: Fixed #1934 (GUI: Add - checking info display) - -2010-09-01 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #2002 (Wrong - operator() parsing) - -2010-09-01 Robert Reif - - * test/testclass.cpp: const functions: Added unit test for ticket - #2003 - -2010-08-31 Kimmo Varis - - * : commit 55e0e435bd0e6c01f8335c148e95bb2bcf225508 Author: Daniel - Marjamäki Date: Tue Aug 31 21:40:51 2010 - +0200 - -2010-08-31 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h, - lib/cppcheck.cpp, lib/settings.cpp, test/testexceptionsafety.cpp: - Exception safety: Removed the noisy checks and keep the useful - checks - -2010-08-31 Kimmo Varis - - * Makefile, lib/lib.pri: Fix Linux makefile after moving timer code - to own files. - -2010-08-31 Kimmo Varis - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cli/cppcheck.vcxproj.filters, lib/cppcheck.cpp, lib/lib.vcproj, - lib/lib.vcxproj, lib/lib.vcxproj.filters, lib/timer.cpp, - lib/timer.h, test/test.vcproj, test/test.vcxproj, - test/test.vcxproj.filters: Move timer code to own cpp/h files. - -2010-08-31 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1959 (Do you - support the oracle Pro*C ?) - -2010-08-31 Kimmo Varis - - * : commit 688b2aefe9689d70abc2c00eb2ab34f24ff12bc4 Author: Daniel - Marjamäki Date: Tue Aug 31 21:04:17 2010 - +0200 - -2010-08-31 Kimmo Varis - - * cli/cppcheck.vcxproj, cli/cppcheck.vcxproj.filters, - lib/lib.vcxproj, lib/lib.vcxproj.filters, test/test.vcxproj, - test/test.vcxproj.filters: Fix building CLI with VS2010. - -2010-08-31 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #2004 (False - positive in 'variable assigned a value but is never used' check) - -2010-08-31 Kimmo Varis - - * cli/cppcheck.vcproj, lib/lib.vcproj, test/test.vcproj: Fix CLI - build with VS2008. - -2010-08-31 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1996 (False - positive for 'Variable foo is assigned a value that is never used') - -2010-08-31 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer::setVarId : - don't give operator function variable id 'operator new []('. Ticket: - #1997 - -2010-08-31 Daniel Marjamäki - - * lib/checkobsoletefunctions.h, lib/tokenize.cpp, - test/testobsoletefunctions.cpp, test/testtokenize.cpp: Fixed #1999 - (False positive: uninitialized variable (__published variables)) - -2010-08-31 Debrard Sébastien - - * Makefile, lib/checkdangerousfunctions.cpp, - lib/checkdangerousfunctions.h, lib/checkobsoletefunctions.h, - lib/lib.pri, test/testdangerousfunctions.cpp, - test/testobsoletefunctions.cpp: Fixed #2005 (refactoring dangerous / - obsolete functions checks) - -2010-08-31 Robert Reif - - * lib/checkclass.cpp: Fixed #2003 (false positive in set functions) - -2010-08-31 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #2001 (No 'The - function ... can be const' warnings when base class is in - namespace.) - -2010-08-31 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #2000 (segmentation - fault of cppcheck with bitfield) - -2010-08-31 Robert Reif - - * lib/tokenize.cpp: Fixed #1887 (internal error in GLee) - -2010-08-30 Daniel Marjamäki - - * lib/checkclass.h: Fixed #1998 (VS compiler warning with current - HEAD) - -2010-08-30 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1997 - (operator new [] simplified wrong) - -2010-08-30 Daniel Marjamäki - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, lib/lib.vcproj, - lib/lib.vcxproj, test/test.vcproj, test/test.vcxproj: Revert "Visual - Studio: Added /MP switch" This reverts commit 2450a80556def477ff43459484ca8ace3dc17e57. - -2010-08-30 Daniel Marjamäki - - * lib/check.h, lib/errorlogger.h: Fixed #1886 (Associate header file - with code file including it) - -2010-08-30 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Symbol - database: better handling of operator functions. Ticket: #1895 - -2010-08-30 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1988 - (segmentation fault of cppcheck with wrong syntax of -std=c++0x) - -2010-08-29 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1993 (False - negatives: uninitialised variables in constructor) - -2010-08-29 Daniel Marjamäki - - * test/testtokenize.cpp: Tokenizer: Added testcase that asserts that - there are not internal errors when using typedefs. Ticket: #1887 - -2010-08-29 Daniel Marjamäki - - * lib/cppcheck.cpp, readme.txt: mention the manual in the --help - output - -2010-08-29 Kimmo Varis - - * gui/threadresult.cpp: Fix error I made merging my internal error - handling. GUI didn't show debug warnings even if they were enabled. - -2010-08-29 Daniel Marjamäki - - * lib/checkobsoletefunctions.cpp, test/testobsoletefunctions.cpp: - Fixed #1994 (False 'Found obsolete function' positive) - -2010-08-29 Daniel Marjamäki - - * runastyle, runastyle.bat: astyle: prevent creating backup files - -2010-08-29 Kimmo Varis - - * : commit b0fa7bfd8cdbd344ae5cf4134d76460e7fc8b695 Author: Kimmo - Varis Date: Sun Aug 29 09:38:03 2010 +0300 - -2010-08-28 Kimmo Varis - - * gui/erroritem.cpp, gui/erroritem.h, gui/mainwindow.cpp, - gui/mainwindow.h, gui/threadhandler.cpp, gui/threadresult.cpp, - gui/threadresult.h: GUI: Output debug errors to log view. Debug errors were not shown anywhere in the GUI, they were just - ignored. This commit adds new signal for those debug errors and - directs them to checking log. Solves ticket #1898 (GUI: Handle internal errors from lib) - -2010-08-28 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp, test/testunusedvar.cpp: - Fixed #1989 (false positive: Variable 'Aux13' is assigned a value - that is never used) - -2010-08-28 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: Symbol database: - Refactorings. Ticket: #1895 - -2010-08-28 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Disable debug warnings for now. - -2010-08-28 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Fix compiling. - -2010-08-27 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp, test/testunusedvar.cpp: - Tokenizer::simplifyInitVar : Refactorings and fixes related to - ticket #1989 - -2010-08-27 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h, lib/checkmemoryleak.cpp, - lib/cppcheck.cpp, lib/preprocessor.cpp, lib/settings.cpp, - lib/settings.h, lib/tokenize.cpp, test/testmemleak.cpp, - test/testpreprocessor.cpp, test/testsimplifytokens.cpp: Added - --debug-warnings that we can use to enable various debug warnings - -2010-08-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1984 (false - positive: syntax error in for loop (< -operator)) - -2010-08-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1985 (false - positive: syntax error in try catch-block with for()-loop inside) - -2010-08-26 Daniel Marjamäki - - * lib/executionpath.cpp: quick fix for #1969 (False positive: - Uninitialized variable when exit() is called before variable is - used.) - -2010-08-26 Daniel Marjamäki - - * lib/checkclass.cpp, test/testunusedprivfunc.cpp: Fixed #1966 - (False positive: Unused private function (virtual function in base - class)) - -2010-08-26 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1945 (False - positives when a for loop header is in a macro) - -2010-08-26 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1951 - (Preprocessor: Compound macro statements not handled correctly) - -2010-08-26 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Tokenizer::simplifyTypedef: Report about unhandled typedefs. Ticket: - #1821 - -2010-08-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1981 (false - positive: syntax error on template operator <) - -2010-08-26 Robert Reif - - * lib/tokenize.cpp: Code cleanup - -2010-08-25 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Tokenizer: If syntax errors are found then - don't return a token list. Ticket: #1961 - -2010-08-25 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Detect some - syntax errors when trying to use templates. Ticket: #1961 - -2010-08-25 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp, test/testunusedvar.cpp: fix 2 problems - related to ticket 1976: 1. nested unnamed anonymous structures and unions were not - supported. 2. declaration split up in class had bug if proceeded by access - specifier. - -2010-08-25 Daniel Marjamäki - - * gui/helpwindow.cpp, gui/helpwindow.h, gui/mainwindow.cpp: GUI: - some fixes of help * moved the help file to the application folder * use absolute path instead of relative path for helpfile * show warning messages if help file doesn't exist or fails to be - loaded - -2010-08-25 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Disable project opening - while checking files. - -2010-08-25 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Fix enabling project - closing action. Project closing action was not enabled when the project file was - opened from the checked directory. Also update the window caption to - contain project file name that was opened from the checked - directory. - -2010-08-25 Robert Reif - - * lib/tokenize.cpp: Fixed gcc compiler warning about uninitialized - variable tok1. Ticket: #1965 - -2010-08-25 Kimmo Varis - - * gui/mainwindow.h: GUI: Fix GCC build failure because of copy-paste - error. - -2010-08-25 Kimmo Varis - - * gui/mainwindow.cpp: Fixed #1978 (Fix compiler warnings in GUI - (MainWindow::mExiting’ will be initialized after...)) - -2010-08-25 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: Fixed #1977 (GUI crashes - when checking a directory) The GUI was crashing if no project files were in checked directory. - I missed this case in my own testing because I had created test - project files for each directory. Whoops! Anyway, this now also makes silently loaded project files (project - file residing in directory but not load by the user) as normal - projects in the GUI. - -2010-08-24 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1948 (C++ class scoping not followed) - -2010-08-24 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1936 - (Internal error. Token::Match called with varid 0.) - -2010-08-24 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Fixed #1960 (cppcheck hangs with 100% cpu - load) - -2010-08-24 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Fix for loading "oldstyle" project file. - -2010-08-24 Kimmo Varis - - * : Merge remote branch 'remotes/kimmo/loadable-project' Conflicts: gui/gui.qrc gui/mainwindow.cpp gui/mainwindow.h - -2010-08-23 Daniel Marjamäki - - * gui/gui.qrc, gui/helpwindow.cpp, gui/helpwindow.ui: GUI: Added - icons to the help window. - -2010-08-23 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1970 (Internal - error. CheckClass::SpaceInfo::getVarList found variable '_root' with - varid 0.) - -2010-08-23 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1967 - (Tokenizer::setVarid doesn't set variable value (list of function - pointers)) - -2010-08-23 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Simplified the - bitfields handling. This patch just looks for the bitfield signature - but doesn't care about the type. I don't think any other code would - have this same signature so it should be OK. We could add code to - only look in structures and classes but I don't think that is - necessary. Ticket: #1956 - -2010-08-22 Robert Reif - - * lib/token.cpp, lib/token.h, lib/tokenize.cpp: Refactoring handling - of microsoft types. Ticket: #1956 - -2010-08-22 Robert Reif - - * lib/token.cpp, lib/tokenize.cpp, test/testtokenize.cpp: - Tokenizer::simplifyBitfields: fixed more issues. Ticket #1956 - -2010-08-22 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: better - handling of bitfields. Ticket: #1956 - -2010-08-22 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: simplify - DECLARE_DYNAMIC and DECLARE_DYNCREATE - -2010-08-22 Kimmo Varis - - * cppcheck.cppcheck: GUI: Add project file for Cppcheck. - -2010-08-21 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Fix bug that same defines were added to - list several times. - -2010-08-21 Kimmo Varis - - * gui/projectfile.txt: Improve project file documentation. - -2010-08-21 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Use rootpath from Project file. If rootpath is given in project file then use it as a current - directory. Also check if paths given in project file are relative - and use rootpath as base path for relative paths. - -2010-08-21 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: simplify - bitfields. Ticket: #1956 - -2010-08-21 Kimmo Varis - - * gui/project.cpp, gui/projectfile.ui, gui/projectfiledialog.cpp, - gui/projectfiledialog.h: GUI: Add project root path to Project file - -dialog. - -2010-08-21 Daniel Marjamäki - - * gui/helpwindow.cpp, gui/helpwindow.ui: GUI: updated helpwindow ui - -2010-08-21 Daniel Marjamäki - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Fixed help window leaks - and made sure it is closed when the gui is closed - -2010-08-21 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: handle - DECLARE_DYNAMIC. Ticket: #1956 - -2010-08-21 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1965 - (tokenizer::simplifyEnum add support for C++0x enums) - -2010-08-20 Kimmo Varis - - * gui/projectfile.cpp, gui/projectfile.h, gui/projectfile.txt: GUI: - Add new optional root-element to project file. Add support for new root-element to project file. This element - defines project root directory if given. If not given then project - root is directory where the project file is located. - -2010-08-20 Daniel Marjamäki - - * gui/help/online-help.qhp: GUI: fixed the online-help.qhp file - listing - -2010-08-20 Daniel Marjamäki - - * : GUI: Removed the help collection file because it didn't work on - different Qt setups - -2010-08-20 Daniel Marjamäki - - * gui/gui.pro, gui/gui.qrc, gui/help/ch01.html, gui/help/ch02.html, - gui/help/ch02s02.html, gui/help/ch02s03.html, - gui/help/ch02s04.html, gui/help/ch02s05.html, - gui/help/ch02s06.html, gui/help/ch02s07.html, - gui/help/ch02s08.html, gui/help/ch03.html, gui/help/ch04.html, - gui/help/ch05.html, gui/help/ch06.html, gui/help/ch07.html, - gui/help/ch08.html, gui/help/ch09.html, gui/help/ch10.html, - gui/help/ch10s02.html, gui/help/ch10s03.html, - gui/help/ch10s04.html, gui/help/ch10s05.html, gui/help/index.html, - gui/help/online-help.qhp, gui/helpwindow.cpp, gui/helpwindow.h, - gui/helpwindow.ui, gui/mainwindow.cpp: GUI: Updated online-help. - This is still under work. - -2010-08-20 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1964 (False - positive: function can be const (get this)) - -2010-08-20 Daniel Marjamäki - - * gui/mainwindow.cpp: astyle formatting - -2010-08-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer::setVarId : - fixed problem for class members - -2010-08-20 Daniel Marjamäki - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, lib/lib.vcproj, - lib/lib.vcxproj, test/test.vcproj, test/test.vcxproj: updates of - Visual Studio files - -2010-08-20 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1954 (False - positive: function can be const (derived class)) - -2010-08-20 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1963 - (typedef array incorrectly simplified) - -2010-08-19 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Prevent opening new files or directories - when project file loaded. - -2010-08-19 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Set current directory when loading a - project file. - -2010-08-19 Daniel Marjamäki - - * : GUI: Added generated file online-help.qhc because it is not yet - autogenerated when building - -2010-08-19 Daniel Marjamäki - - * gui/gui.qrc, gui/help/buildhelp.bat, gui/help/index.html, - gui/help/online-help.qhcp, gui/help/online-help.qhp: GUI: added - simple help file - -2010-08-19 Daniel Marjamäki - - * gui/gui.pro, gui/mainwindow.cpp: GUI: quick fix for #1957 (Unable - to compile gui.pro with Qt Creator in Windows) - -2010-08-19 Kimmo Varis - - * gui/gui.qrc, gui/main.ui: GUI: Add icon for Open Project and add - it to toolbar. - -2010-08-18 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h, lib/tokenize.cpp, - lib/tokenize.h, test/testclass.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Symbol database: bug fixes. Ticket: #1895 - -2010-08-18 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1955 (cppcheck - hangs with 100% cpu load) - -2010-08-17 Daniel Marjamäki - - * lib/tokenize.cpp, test/testpreprocessor.cpp: Fixed #1944 (segfault - in Tokenizer::simplifyLogicalOperator) - -2010-08-17 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: #1943 (segmentation fault - of cppcheck (= default)) - -2010-08-17 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #1946 ('Dereferenced - iterator erased' false positive) - -2010-08-17 Kimmo Varis - - * gui/project.cpp, gui/projectfile.ui, gui/projectfiledialog.cpp, - gui/projectfiledialog.h: GUI: Add check paths field to Project File - -dialog. - -2010-08-17 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: Symbol database: Fixed the - error reporting so errors are shown in the gui. Ticket: #1895 - -2010-08-17 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Set project filename to main window - caption. When project file is closed the caption is emptied. - -2010-08-16 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1942 (false - positive: uninitialized variable in __asm__ statement) - -2010-08-16 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Symbol database: fixed - problems with namespaces. Ticket: #1895 - -2010-08-16 Daniel Marjamäki - - * lib/checkobsoletefunctions.cpp, lib/checkobsoletefunctions.h, - lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1941 (Internal - error::Space Info::getVarList found variable with varid 0) - -2010-08-15 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Leave new project file open and selected. When user creates new project file one probably wants to keep using - the same project file. So leave it open for use. - -2010-08-15 Sbastien Debrard - - * lib/checkobsoletefunctions.cpp, lib/checkobsoletefunctions.h: - Refactoring of obsolete functions checks. Ticket: #1940 - -2010-08-15 Daniel Marjamäki - - * lib/checkobsoletefunctions.cpp, lib/checkobsoletefunctions.h, - lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Reverted - 7398453cb09aa9f726ac9b19ee2feadf27664744 - -2010-08-15 Sbastien Debrard - - * lib/checkobsoletefunctions.cpp, lib/checkobsoletefunctions.h, - lib/checkother.cpp, lib/checkother.h, test/testother.cpp: - Refactoring of obsolete functions checks. Ticket: #1940 - -2010-08-15 Daniel Marjamäki - - * gui/applicationlist.cpp: GUI: Use Notepad++ by default in windows. - Ticket: #1931 - -2010-08-15 Tim Gerundt - - * gui/cppcheck_de.ts: Fixed #1916 (gui: Update german translation) - -2010-08-15 Kimmo Varis - - * gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h: GUI: Add - menuitem to edit open project file. Earlier we opened project file only for editing. But now that we - really use project files we need separate feature for editing them. - -2010-08-15 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: Variable - Id: Fixed various bugs related to templates and bitfields. Ticket: - #1928 - -2010-08-15 Kimmo Varis - - * gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h: GUI: Add - menuitem to close open project file. - -2010-08-15 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h, gui/project.h: GUI: Open - project file and check contained paths. Now we load user-selected project file and start checking paths it - contains. Project file can be anywhere as long as it contains valid - path(s) to check. - -2010-08-15 Daniel Marjamäki - - * lib/tokenize.cpp: removed unused variable 'dot' - -2010-08-15 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: Disabled the -Wconversion. There are - too many compiler warnings currently when using it. - -2010-08-15 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: quick fix for #1905 (false - positive: the function '...' can be declared as const (member array - is assigned)) - -2010-08-15 Daniel Marjamäki - - * gui/applicationlist.cpp: astyle formatting - -2010-08-15 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: Symbol database: report - error when it is detected that a variable id is missing. Ticket: - #1928 - -2010-08-15 Erik Lax - - * gui/applicationlist.cpp: Fixed #1931 (GUI should try to detect the - best possible editor) - -2010-08-15 Erik Lax - - * lib/checkclass.cpp, test/testunusedprivfunc.cpp: Fixed #1932 - (false positive: unused private function) - -2010-08-14 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #162 (Initialisation of a variable by itself) - -2010-08-14 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1928 (missing - varId for template class variable) - -2010-08-14 Erik Lax - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1935 (false negative: detect buffer overrun from network functions - (recv, recvfrom..)) - -2010-08-14 Sbastien Debrard - - * Makefile, lib/checkobsoletefunctions.cpp, - lib/checkobsoletefunctions.h, lib/lib.pri, - test/testobsoletefunctions.cpp: Fixed #1933 (Add checks for obsolete - functions) - -2010-08-14 Daniel Marjamäki - - * lib/errorlogger.cpp: ErrorLogger: Added better \n handling to the - XML output - -2010-08-14 Daniel Marjamäki - - * lib/checkother.cpp: dangerous scanf usage: Added verbose - information - -2010-08-14 Kimmo Varis - - * gui/projectfile.cpp, gui/projectfile.h, gui/projectfile.txt: GUI: - Add check paths to project file. Add new element containing paths to check into the project file. - This is for growing project files to real project files that can be - loaded and selected from the GUI. And decoupling project files from - the directory they reside. So you can put project file in any - directory, load it and it checks paths listed. - -2010-08-14 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Added - scanf check. Modified patch submitted by Eric Sesterhenn - -2010-08-14 Ettl Martin - - * test/testdangerousfunctions.cpp: fixed unit test of dangerous - functions - -2010-08-14 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Symbol database: Fixed bug - when end of namespace wasn't found. Ticket: #1895 - -2010-08-14 Daniel Marjamäki - - * lib/checkdangerousfunctions.cpp, lib/checkdangerousfunctions.h: - dangerous functions: removed 'scanf' because it can be used in a - safe way - -2010-08-13 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Symbol database: fixed - linenr problem in virtual destructors check - -2010-08-13 Daniel Marjamäki - - * lib/checkdangerousfunctions.cpp: Dangerous functions: Improved - error messages - -2010-08-13 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: dmake: removed _GLIBCXX_DEBUG because - it doesn't work in cygwin. added -Wconversion - -2010-08-13 Erik Lax - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #1930 (false negative: - bad iterators checks fails to detect bugs with preincrement) - -2010-08-13 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Symbol - database: Refactoring virtual destructors check. Ticket: #1895 - -2010-08-13 Robert Reif - - * lib/checkclass.cpp: Symbol database: move finding base classes - until after all classes are found because of template instantiation. - Ticket: #1895 - -2010-08-13 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: Symbol database: refactoring - variable handling. Ticket: #1895 - -2010-08-12 Daniel Marjamäki - - * man/manual.docbook: doc: added a little section about excluding a - file or folder from checking - -2010-08-12 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp, lib/cppcheck.cpp, lib/settings.cpp, - lib/settings.h, man/cppcheck.1.xml: Added command line option - --report-progress. ticket: #1926 - -2010-08-12 Ettl Martin - - * Makefile, lib/checkbufferoverrun.cpp, lib/preprocessor.cpp: - actived Wconversion flag in Makefile and fixed almost all Warnings - from gcc-4.4 - -2010-08-12 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Symbol database: fix a - small bug and add more tests. ticket: #1895 - -2010-08-11 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: Symbol database: better - handling of 'friend'. ticket: #1895 - -2010-08-11 Daniel Marjamäki - - * lib/tokenize.cpp: Optimisation in Tokenizer::tokenize - -2010-08-11 Kimmo Varis - - * gui/FileList.cpp, gui/FileList.h, gui/filelist.cpp, - gui/filelist.h, gui/mainwindow.cpp: Fix filenames starting with - capital letters. I accidentally committed two new files with filenames starting with - capital letters from Windows machine. The Linux build breakage was - fixed by fixing the include lines. But the correct fix is to fix - filenames as we are using all lower letter filenames in this - project. - -2010-08-10 Ettl Martin - - * gui/FileList.cpp, gui/mainwindow.cpp: gui: fixed regression du to - case sensitifity of Linux - -2010-08-10 Daniel Marjamäki - - * lib/tokenize.cpp: Optimisation: Made inner loop in - Tokenizer::setVarId faster - -2010-08-10 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer::setVarId : - Fixed a problem when using static class members - -2010-08-10 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: Symbol database: Refactoring - -2010-08-09 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Use canonical path as checking path. Cleanup the path name before starting checking and saving it. - -2010-08-09 Kimmo Varis - - * gui/FileList.cpp, gui/FileList.h, gui/gui.pro, - gui/mainwindow.cpp, gui/mainwindow.h: GUI: Implement FileList class - to handle list of files to check. Create a list of files to check. Currently we only read this list - once. But later on we can refer to this list to for example - determine which files were checked and which not in aborted - checking. - -2010-08-10 Robert Reif - - * test/testclass.cpp: const function check: Added more unit tests - -2010-08-10 Robert Reif - - * gui/resultstree.cpp, gui/resultstree.h, gui/settingsdialog.cpp, - gui/settingsdialog.h, gui/translationhandler.cpp, - gui/translationhandler.h, lib/checkbufferoverrun.cpp: Fixed #1925 - (fix some cppcheck warnings in cppcheck) - -2010-08-09 Robert Reif - - * test/testclass.cpp: Virtual destructors: extended and fixed the - testing - -2010-08-09 Robert Reif - - * test/testclass.cpp: Fixed typo in testcase. Ticket: #1311 - -2010-08-09 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1922 (False - positive: function can be const when both const and non-const - functions are provided.) - -2010-08-09 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Symbol - database: Enhancements and fixes. Ticket: #1895 - -2010-08-08 Daniel Marjamäki - - * lib/tokenize.cpp: Optimising: Tokenizer::setVarId when setting - variable ids for struct/class members - -2010-08-08 Daniel Marjamäki - - * lib/token.cpp: astyle formatting - -2010-08-08 Daniel Marjamäki - - * lib/token.cpp: Optimisation: Optimised firstWordEquals - -2010-08-08 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: 'simplifyCalculations();' should have - the same results as 'while (simplifyCalculations());' - -2010-08-08 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp: CLI: increase delay between progress - reports from 1s to 10s - -2010-08-08 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h, - lib/cppcheck.cpp, lib/cppcheck.h: Refactoring: - Cppcheck::reportProgress needs to call _errorLogger::reportProgress. - Ticket: #1625 - -2010-08-08 Daniel Marjamäki - - * lib/tokenize.cpp: Refactoring: Made - Tokenizer::simplifyCalculations a little faster - -2010-08-07 Daniel Marjamäki - - * test/testpreprocessor.cpp: Visual Studio: Fixed unit tests. - Ticket: #640 - -2010-08-07 Daniel Marjamäki - - * lib/checkother.cpp: Performance: Refactoring - CheckOther::nullPointerStructByDeRefAndChec to make it faster - -2010-08-07 Daniel Marjamäki - - * lib/preprocessor.cpp: visual studio: fixed a few compiler warnings - (when saving istream::get result in a char) - -2010-08-07 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1923 (False - positive: Possible null pointer derefence in else if) - -2010-08-07 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Fixed - #1921 (false positive: the function '...' can be declared as const - (inline friend)) - -2010-08-07 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1894 - (unreadVariable false positive with const references) - -2010-08-07 Daniel Marjamäki - - * lib/checkclass.cpp, lib/cppcheck.cpp, lib/settings.cpp, - lib/settings.h, test/testclass.cpp: Fixed #1881 (false positive: The - function '...' can be const (nonconst code is hidden inside #if)) - -2010-08-07 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h: Symbol Database: Don't use - it when it is not needed - -2010-08-07 Daniel Marjamäki - - * lib/checkclass.h: Refactoring: Made CheckClass members private - -2010-08-07 Daniel Marjamäki - - * test/testother.cpp: calculation in sizeof: added two more - ASSERT_EQUALS to guard against false positives - -2010-08-06 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: New - check: look for calculation inside sizeof - -2010-08-06 Daniel Marjamäki - - * lib/filelister.cpp, lib/tokenize.cpp: gcc: fixed some more - -Wsign-conversion warnings - -2010-08-06 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkmemoryleak.cpp, - lib/checkother.cpp, lib/cppcheck.cpp, lib/mathlib.cpp, - lib/mathlib.h, lib/tokenize.cpp: gcc: fixed some more - -Wsign-conversion warnings - -2010-08-06 Daniel Marjamäki - - * Makefile, lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - lib/checkclass.cpp, lib/filelister.cpp, lib/preprocessor.cpp, - lib/token.cpp, test/testthreadexecutor.cpp, tools/dmake.cpp: Fixed - #1487 (fix gcc compiler warnings) - -2010-08-06 Daniel Marjamäki - - * lib/mathlib.cpp: gcc: Fixed some compiler warnings when using - -Wsign-conversion. Ticket: #1487 - -2010-08-06 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h: gcc: Fixed some compiler - warnings when using -Wsign-conversion. Ticket: #1487 - -2010-08-06 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h: gcc: Fixed some compiler - warnings when using -Wsign-conversion. Ticket: #1487 - -2010-08-06 Daniel Marjamäki - - * lib/settings.h: gcc: Fixed some compiler warnings when using - -Wsign-conversion. Ticket: #1487 - -2010-08-06 Daniel Marjamäki - - * lib/tokenize.cpp: gcc: Fixed some compiler warnings when using - -Wsign-conversion. Ticket: #1487 - -2010-08-06 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/tokenize.cpp, lib/tokenize.h: gcc: - fixed some compiler warnings when using -Wsign-conversion - -2010-08-06 Daniel Marjamäki - - * lib/checkclass.h, lib/cppcheck.cpp, lib/tokenize.cpp, - lib/tokenize.h: Borland C++: Fixed compiler errors - -2010-08-06 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/cppcheck.cpp, lib/cppcheck.h, - lib/errorlogger.h: Visual Studio: Fixed warnings - -2010-08-06 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Compiler dependent parsing of - ''. Maybe it should be possible to - control it from the commandline instead. Ticket: #640 - -2010-08-05 Daniel Marjamäki - - * lib/token.h: suppress visual studio warnings about loosing data - when calculating Token::progressValue - -2010-08-05 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - better handling of 'return strcmp(..' etc - -2010-08-05 Daniel Marjamäki - - * : commit 2450a80556def477ff43459484ca8ace3dc17e57 Author: Daniel - Marjamäki Date: Thu Aug 5 19:02:05 2010 - +0200 - -2010-08-05 Ettl Martin - - * lib/checkbufferoverrun.cpp: fixed compiler Warning in - lib/checkbufferoverrun about comparison of signed and unsigned - variable - -2010-08-05 Daniel Marjamäki - - * test/testmemleak.cpp: Memory leaks: Added ASSERT_EQUALS near the - TODO_ASSERT_EQUALS - -2010-08-05 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Buffer overflow: Fixed two TODO test - cases - -2010-08-05 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: null pointers: fixed TODO - assertion - dereference pointer in function call and then checking - that it is not NULL - -2010-08-05 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: null pointers: fixed todo - test case - -2010-08-04 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - refactoring return handling - -2010-08-04 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: uninitialized variables: - fixed false negatives when uninitialized pointer data is read - -2010-08-04 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: don't - translate 'return p[10];' to 'return use ;' - -2010-08-04 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1670 (False negative: Array index out of bounds in return - statement) - -2010-08-04 Daniel Marjamäki - - * lib/settings.cpp: astyle formatting - -2010-08-03 Daniel Marjamäki - - * lib/settings.cpp, test/testsettings.cpp: Fixed #1919 (option - '--suppressions file' can not work when filename includes colon) - -2010-08-03 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/cppcheck.cpp, lib/cppcheck.h, - lib/errorlogger.cpp, lib/errorlogger.h, lib/preprocessor.cpp, - lib/token.cpp, lib/token.h, lib/tokenize.cpp: Added - ErrorLogger::reportProgress and removed ErrorLogger::ReportProgress. - This will make it easier for GUI and other clients to display - progress information. - -2010-08-02 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1833 (memory - leak detected in version 1.37 not detected in 1.43) - -2010-08-02 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: - better handling of 'loop { dealloc ; alloc ; }' - -2010-08-02 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: - simplify 'callfunc ; ;' - -2010-08-02 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: - better checking of function calls. If there are statements after the - function call it is unlikely the function call is noreturn - -2010-08-02 Cary R - - * .gitignore: Fixed #1915 (Patch to ignore cppcheck.exe and - testrunner.exe) When compiling in the cygwin environment the executables have a .exe - extension, so to keep the git status clean ignore both cppcheck.exe - and testrunner.exe. - -2010-07-31 Kimmo Varis - - * runastyle, runastyle.bat: Improve Astyle scripts to use variables. Using variables for style and options makes it easier to edit the - scripts. Also avoids copy/paste errors when editing scripts. - -2010-07-31 Kimmo Varis - - * cli/threadexecutor.cpp, lib/cppcheck.cpp, - test/testthreadexecutor.cpp: Astyle cleanup with new Astyle options. - -2010-07-31 Kimmo Varis - - * runastyle, runastyle.bat: Ticket #1914 Improve Astyle for - parenthesis style Tell Astyle to remove extra spaces around parenthesis. - -2010-07-31 Daniel Marjamäki - - * Makefile, lib/check.h, lib/checkexceptionsafety.cpp, - lib/checkother.cpp, lib/checkstl.cpp, lib/errorlogger.cpp, - lib/filelister_unix.cpp, lib/settings.cpp, lib/settings.h, - lib/tokenize.h: cleanup headers - -2010-07-30 Kimmo Varis - - * cli/threadexecutor.cpp: Astyle cleanup. - -2010-07-24 Kimmo Varis - - * runastyle, runastyle.bat: Ticket #1899 Update Astyle flags to - match older Astyle behavior. - -2010-07-30 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1912 (False - positive: memory leak (calling noreturn function)) - -2010-07-28 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1909 (### - Internal error in Cppcheck. Please report it) - -2010-07-28 Kimmo Varis - - * win_installer/cppcheck.wxs: Fixing ticket #1908 (setup don't - install GUI translations) Patch submitted by Tim Gerundt. - -2010-07-27 Ettl Martin - - * lib/errorlogger.cpp: checkheaders: removed redundant include - (token.h) from errorlogger.cpp - -2010-07-27 Daniel Marjamäki - - * lib/preprocessor.cpp: Fixed #1864 (Relative Path of #include-File - doesn't work) - -2010-07-27 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed a vs compiler warning. Ticket: #1901 - -2010-07-27 Kimmo Varis - - * gui/gui.pro: GUI: Add lib to include- and dependency-directories. - -2010-07-27 Kimmo Varis - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, gui/gui.pro, - lib/lib.vcproj, lib/lib.vcxproj, test/test.vcproj, - test/test.vcxproj: Windows: Add _CRT_SECURE_NO_WARNINGS define. The _CRT_SECURE_NO_WARNINGS define suppresses some Windows-specific - compile warnings. Windows has "secure" versions of some functions - and compiler outputs warnings that those "secure" versions should be - used instead. Since other platforms don't have those functions we - just suppress this warning for now on. - -2010-07-27 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: updated dmake. updated Makefile - (includes cleanup). - -2010-07-27 Emmanuel Blot - - * .gitignore, Cppcheck.xcodeproj/project.pbxproj: Fix build error on - XCode - -2010-07-27 Daniel Marjamäki - - * lib/errorlogger.cpp: Cleanup redundant include - -2010-07-26 Zachary Blair - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1889 (false - positive: Common realloc mistake) - -2010-07-26 Ettl Martin - - * gui/mainwindow.h: fixed regression due to missing settings.h - -2010-07-26 Daniel Marjamäki - - * lib/errorlogger.h, lib/preprocessor.cpp, - test/testpreprocessor.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Refactoring: Cleanup include that - checkheaders reported as not needed - -2010-07-26 Kimmo Varis - - * lib/cppcheck.cpp: Remove unneeded path separator conversion. - -2010-07-26 Kimmo Varis - - * lib/cppcheck.cpp: Fix path separators for couple of messages. - -2010-07-26 Kimmo Varis - - * lib/filelister_win32.cpp: Windows: convert to internal separators - when finding files. - -2010-07-26 Kimmo Varis - - * cli/cppcheck.vcxproj, cli/cppcheck.vcxproj.filters, - lib/lib.vcxproj, lib/lib.vcxproj.filters, test/test.vcxproj, - test/test.vcxproj.filters: Update VS 2010 project files. - -2010-07-26 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, lib/token.cpp, lib/token.h, - test/testclass.cpp, test/testconstructors.cpp: Create a symbol - database - -2010-07-25 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed #1887 (internal error in GLee) - -2010-07-25 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/errorlogger.cpp, - lib/errorlogger.h, lib/preprocessor.cpp, lib/tokenize.cpp: - Refactoring: Report progress when checking takes a long time. - Ticket: #1868 - -2010-07-25 Daniel Marjamäki - - * lib/token.h: Refactoring: changed 'bool varid=0' to 'bool - varid=false' - -2010-07-25 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1383 - (Preprocessor: define - ifndef problem) - -2010-07-24 Daniel Marjamäki - - * lib/mathlib.h, lib/preprocessor.cpp, lib/preprocessor.h, - lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: - Refactoring: Cleanup headers using checkheaders - -2010-07-24 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: CheckBufferOverrun: report progress. - Ticket: #1868 - -2010-07-24 Daniel Marjamäki - - * lib/errorlogger.cpp, lib/errorlogger.h, lib/tokenize.cpp: Report - progress when checking a file takes a long time. Ticket: #1868 - -2010-07-24 Daniel Marjamäki - - * lib/cppcheck.h: Refactoring: Removed unused variable _xmllist - -2010-07-24 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1893 (false - positive: dereferencing null pointer (try/catch)) - -2010-07-24 Daniel Marjamäki - - * lib/token.cpp: Refactoring Token::Match: Report errors through - ErrorLogger. Ticket: #1839 - -2010-07-24 Daniel Marjamäki - - * lib/tokenize.cpp: Refactoring Tokenizer::syntaxError - -2010-07-24 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/mathlib.cpp, lib/mathlib.h, - lib/tokenize.cpp: Refactoring MathLib: Report errors through the - tokenizer. Ticket: #1839 - -2010-07-24 Daniel Marjamäki - - * lib/tokenize.cpp: Refactoring: use MathLib add/sub instead of - calculate - -2010-07-23 Daniel Marjamäki - - * lib/cppcheck.cpp, lib/preprocessor.cpp, lib/settings.cpp, - lib/settings.h, test/testsettings.cpp: Refactoring: - Settings::addSuppression return error message and callers make sure - it's reported properly. Ticket: #1839 - -2010-07-23 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Refactoring: Use Check::reportError - instead of writing to std::cout. Ticket: #1839 - -2010-07-23 Daniel Marjamäki - - * lib/tokenize.cpp: Refactoring: Don't throw exceptions in the - tokenizer upon errors. Ticket: #1866 - -2010-07-23 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h, - test/testpreprocessor.cpp: Refactoring: The preprocessor will report - errors instead of throwing exceptions. Ticket: #1866 - -2010-07-23 Daniel Marjamäki - - * lib/cppcheck.cpp, lib/settings.cpp, lib/settings.h: Refactoring: - The Settings::addEnabled will return error message instead of - throwing it. Ticket: #1866 - -2010-07-23 Daniel Marjamäki - - * lib/checkother.cpp: Variable scope: Improved verbose information - (see also 7ef0296) - -2010-07-22 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1891 - (Internal error when enum assigned to sizeof without brackets) - -2010-07-22 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: Fixed - #1828 (### Internal error in Cppcheck. Please report it.) - -2010-07-21 Kimmo Varis - - * lib/preprocessor.cpp: Fix path separators for missing include - files-message. - -2010-07-21 Kimmo Varis - - * lib/cppcheck.cpp: Fixed #1892 (Verbosity setting set to false and - not set back to original value) Verbosity was set to false to temporarily reduce printing messages. - But it was not set back to its original value so rest of the - messages that should have been printed for verbose setting enabled - were not printed. - -2010-07-21 Kimmo Varis - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Better fix for - #1371. Now handles also system includes. And have couple of tests. - -2010-07-21 Kimmo Varis - - * lib/preprocessor.cpp, lib/preprocessor.h, - test/testpreprocessor.cpp: Use enum for header file types - -2010-07-20 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1883 (false - positive: (style) The function 'A::SetPos' can be const) - -2010-07-19 Daniel Marjamäki - - * test/testcppcheck.cpp: filelocation-refactoring: Fixed unit tests - in windows - -2010-07-19 Daniel Marjamäki - - * cppcheck.cbproj, testrunner.cbproj: Borland C++: Updated project - files - -2010-07-19 Kimmo Varis - - * lib/filelister.h: Formatting and improving comments. - -2010-07-19 Daniel Marjamäki - - * : pulled changes from kimmov (filelocation-refactor) - -2010-07-19 Kimmo Varis - - * lib/cppcheck.cpp, lib/path.cpp: Remove './' from begin of paths - when printing progress. - -2010-07-19 Kimmo Varis - - * lib/errorlogger.cpp, lib/path.cpp, lib/path.h: Move path - simplifying code to Path class. - -2010-07-19 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Fixed - #1883 (false positive: (style) The function 'A::SetPos' can be - const) - -2010-07-19 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1865 - (Tokenizer::simplifyRedundantParantheses: wrong handling of - 'operator delete') - -2010-07-19 Kimmo Varis - - * lib/path.cpp: Use std::replace() to replace chars in paths. - -2010-07-19 Daniel Marjamäki - - * lib/checkother.cpp: --verbose: added more information for the - variableScope error message. - -2010-07-19 Kimmo Varis - - * : Merge remote branch 'remotes/kimmo/master' - -2010-07-19 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1880 (false - positive: Uninitialized array (initialized in subfunction)) - -2010-07-19 Kimmo Varis - - * lib/errorlogger.h: Remove misleading comment. - -2010-07-18 Zachary Blair - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1856 (false - positive: "pData" nulled but not freed upon failure) - -2010-07-19 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1882 (false - negative: function can be declared const) - -2010-07-18 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: Refactoring - CheckClass::initializeVarList. Ticket #1811 - -2010-07-18 Daniel Marjamäki - - * lib/tokenize.cpp: fixed the mistake I made when applying patch - -2010-07-18 Robert Reif - - * lib/checkclass.cpp, lib/tokenize.cpp, test/testconstructors.cpp: - uninitialized class members: better handling of nested classes - -2010-07-18 Kimmo Varis - - * : Merge remote branch 'origin/master' - -2010-07-18 Martin Ettl - - * test/testother.cpp: #1880: added todo testcase (false positive: - (error) Uninitialized variable: y) - -2010-07-18 Martin Ettl - - * test/testmemleak.cpp: added a testcase for ticket #1879 - -2010-07-18 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1855 (false - positive: uninitialized variable (function call in switch - condition)) - -2010-07-18 Daniel Marjamäki - - * lib/tokenize.cpp: use cppcheckError to report - Tokenizer/Preprocessor error instead of std::cerr - -2010-07-18 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed #1843 (Tokenizer::createTokens() calls - std::exit(0)) - -2010-07-18 Kimmo Varis - - * gui/resultstree.cpp: GUI: Fix bug that every error item got own - parent item. The code could not find existing parent item since items have paths - with native separators and search was done with non-native path - separators. - -2010-07-18 Kimmo Varis - - * gui/mainwindow.cpp: Fixed #1870 (Wrong path in report) Current directory was set from first file in the list. That file - could be in subdirectory when wrong path was set. Also getting - absolute path was buggy. - -2010-07-18 Kimmo Varis - - * gui/mainwindow.cpp: Fixed #1870 (Wrong path in report) Current directory was set from first file in the list. That file - could be in subdirectory when wrong path was set. Also getting - absolute path was buggy. - -2010-07-18 Daniel Marjamäki - - * lib/checkunusedfunctions.cpp, test/testunusedfunctions.cpp: Fixed - #1857 (XML tag no more included for unusedFunction error (1.44 - regression)) - -2010-07-18 Kimmo Varis - - * gui/threadresult.cpp, lib/errorlogger.cpp, lib/errorlogger.h: GUI: - Avoid unnecessary path separator conversion. - -2010-07-18 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Fixed - #1311 (false negative: missing const not found in derived classes) - -2010-07-17 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Close application - cleanly when exiting while checking. Earlier commit allowed cppcheck to exit immediately while checking. - This however leads crashes and error logs shown since the thread - termination leaves things in inconsistent state. I thought cppcheck - would close fast enough so these could be ignored. But apparently - not. So this commits adds new bool mExiting for MainWindow and sets that - to true when exiting while checking. When the checking is ready this - attribute is checked and if it is true the application can now be - cleanly exited. - -2010-07-17 Kimmo Varis - - * gui/aboutdialog.cpp, gui/aboutdialog.h, - gui/applicationdialog.cpp, gui/applicationdialog.h, - gui/fileviewdialog.cpp, gui/fileviewdialog.h, gui/resultsview.cpp, - gui/resultsview.h, gui/settingsdialog.cpp, gui/settingsdialog.h: - GUI: Fix includes for dialogs/views. At first we created the GUI in the code and so needed all the - layouts etc include to the code. Now when we are using UI files we - don't need all those included. So clean them up. Also use forward - declarations instead of includes in header files when possible. - -2010-07-17 Kimmo Varis - - * gui/csvreport.cpp, gui/txtreport.cpp, gui/xmlreport.cpp: GUI: - Ensure native path separators in reports. Ensure that native separators are used in saved reports. Reports may - be parsed by other programs/scripts so it is important that paths - are properly formatted. - -2010-07-17 Kimmo Varis - - * gui/resultstree.cpp: GUI: Show paths with native separators in - result tree. GUI used to show paths with / separator which is not native - separator in Windows. So lets convert shown paths to native - separators before adding them to the GUI. - -2010-07-17 Kimmo Varis - - * .gitignore: Add *.orig files to gitignore. - -2010-07-17 Kimmo Varis - - * gui/threadresult.cpp: GUI: Fix building after path handling - refactorings. - -2010-07-17 Kimmo Varis - - * cli/cppcheck.vcproj, lib/lib.vcproj, test/test.vcproj: Update - Visual Studio projects. - -2010-07-17 Kimmo Varis - - * lib/cppcheck.cpp, lib/mathlib.cpp, test/testthreadexecutor.cpp: - Astyle cleanup. - -2010-07-17 Kimmo Varis - - * Makefile, lib/errorlogger.cpp, lib/lib.pri, lib/path.cpp, - lib/path.h: Add Path class for path handling routines. In this initial commit the Path class contains two methods for - converting path separators. I want to move cppcheck path handling to - direction that we internally have paths with / separator. And - convert from/to native separators when needed. - -2010-07-17 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1730 (False - negative in 'variable not initialized in ctor') - -2010-07-17 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h: Fixed #1875 - (CheckClass::getVarList: simplify function use) - -2010-07-17 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts: GUI: Update translation files. - -2010-07-17 Kimmo Varis - - * : commit 6db365e6f7004872a6d1076ab6c73276af7c14f4 Author: Kimmo - Varis Date: Sat Jul 17 01:27:40 2010 +0300 - -2010-07-16 Kimmo Varis - - * gui/common.h, gui/logview.cpp, gui/logview.h, gui/mainwindow.cpp: - GUI: Remember log view size. - -2010-07-16 Kimmo Varis - - * lib/errorlogger.cpp: Fix comment. - -2010-07-16 Kimmo Varis - - * lib/errorlogger.cpp, lib/errorlogger.h: Remove unused - ErrorLogger::_writemsg() methods. - -2010-07-16 Kimmo Varis - - * gui/logview.cpp, gui/logview.h, gui/logview.ui: GUI: Add - Clear-button to log view. - -2010-07-16 Kimmo Varis - - * gui/logview.cpp, gui/logview.h, gui/logview.ui: GUI: Add - close-button to log view. - -2010-07-16 Kimmo Varis - - * gui/gui.pro, gui/logview.cpp, gui/logview.h, gui/logview.ui, - gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h, - gui/threadhandler.cpp, gui/threadresult.cpp, gui/threadresult.h: - GUI: Add simple log view. Adding a simple log view which shows log messages the core code - emits. - -2010-07-16 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts, gui/mainwindow.cpp: Fixed #1853 (GUI: Allow - closing gui.exe while checking) The GUI now asks if user wants to stop the current checking and exit - the application. - -2010-07-15 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp, test/testconstructors.cpp: - Fixed #1375 (false negative: uninitialized member variables not - found in nested class constructors) - -2010-07-14 Kimmo Varis - - * lib/check.h, lib/checkmemoryleak.cpp, - lib/checkunusedfunctions.cpp, lib/errorlogger.cpp, - lib/errorlogger.h, lib/preprocessor.cpp, lib/tokenize.cpp: Refactor - ErrorMessage constructor to take Severity::SeverityType. This removes lots of unneeded casting as everybody now uses the - Severity::SeverityType. - -2010-07-14 Kimmo Varis - - * : Merge remote branch 'remotes/kimmo/severity-refactor' - -2010-07-14 Kimmo Varis - - * gui/threadresult.cpp: GUI: Fix compile after Severity changes. - -2010-07-14 Kimmo Varis - - * lib/errorlogger.h: Add debug-severity to Severity::SeverityType. - -2010-07-14 Kimmo Varis - - * lib/errorlogger.h: Make Severity::none to match and output empty - string. - -2010-07-14 Kimmo Varis - - * lib/errorlogger.cpp, lib/errorlogger.h, lib/preprocessor.cpp: - Refactor ErrorMessage's severity to Severity::SeverityType. - -2010-07-14 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp, - test/testconstructors.cpp: CheckClass: Improvements and refactorings - for constructors and variables checking - -2010-07-14 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1851 (false - positive: Member variable not initialized int ctor) - -2010-07-14 Kimmo Varis - - * cli/cppcheckexecutor.cpp, cli/threadexecutor.cpp, - lib/cppcheck.cpp, lib/errorlogger.cpp, lib/errorlogger.h, - test/testcppcheck.cpp, test/testsuite.cpp: Rename - ErrorMessage::toText() to ErrorMessage::toString(). - -2010-07-14 Kimmo Varis - - * lib/check.h, lib/checkmemoryleak.cpp, - lib/checkunusedfunctions.cpp, lib/errorlogger.h: Rename - Severity::stringify() to Severity::toString(). - -2010-07-14 Kimmo Varis - - * lib/check.h, lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - lib/errorlogger.h: Rename Severity::e to Severity::SeverityType. - -2010-07-14 Kimmo Varis - - * cli/cppcheck.vcproj: Add cppcheckexecutor.h to VS project. - -2010-07-14 Kimmo Varis - - * gui/erroritem.h, gui/main.cpp, gui/resultsview.cpp, - gui/resultsview.h, gui/threadhandler.cpp, gui/threadresult.cpp, - gui/threadresult.h: GUI: Sent ErrorItem with Error -signal. This commit modifies and registers ErrorItem as proper metatype so - it can be used with Qt signals. Then sending Error-signals is - refactored so that ErrorItem instances are sent instead of several - different arguments that already contained couple of lists. - -2010-07-14 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1850 (An access to a nested std::map via a negative integer key is - reported as 'Array index out of bounds') - -2010-07-14 Daniel Marjamäki - - * lib/checkstl.cpp: gcc: fixed compiler warning (suggest - parantheses) - -2010-07-14 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #1844 (False positive: - invalid iterator when erase() is used in if-else (with continue)) - -2010-07-13 Daniel Marjamäki - - * man/manual.docbook: manual: Added a chapter about the GUI - -2010-07-13 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts: GUI: Update translation files. - -2010-07-13 Kimmo Varis - - * : commit b92f7b854a33954da4a1559767207aabc2ab6111 Author: Kimmo - Varis Date: Tue Jul 13 12:46:28 2010 +0300 - -2010-07-13 Kimmo Varis - - * gui/projectfiledialog.cpp: GUI: Remove ; from the end of the - include/define strings in dialog. - -2010-07-13 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Rename project file - related methods in mainwindow. - -2010-07-13 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1846 (False - positive with -s: Variable hides typedef with same name) - -2010-07-13 Daniel Marjamäki - - * : commit ab088bcec9a64155a5ae547680483520bc49de06 Author: Robert - Reif Date: Tue Jul 13 08:01:57 2010 +0200 - -2010-07-13 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1847 (False - positive: Method using std::swap<>() can be declared const) - -2010-07-13 Daniel Marjamäki - - * : commit 51beb6d01a0aca3982aa99ac5bd98fb210f65ede Author: Martin - Ettl Date: Mon Jul 12 20:02:58 2010 +0200 - -2010-07-13 Kimmo Varis - - * gui/project.cpp, gui/project.h: GUI: Add two new files I forgot to - add earlier. - -2010-07-12 Daniel Marjamäki - - * gui/xmlreport.cpp: Fixed #1849 (GUI: failed to build gui) - -2010-07-12 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Variable Id: fixed issue - with function call. Ticket: #1848 - -2010-07-12 Martin Ettl - - * gui/main.cpp: gui/main added spaces between template brackets - -2010-07-12 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts, gui/projectfiledialog.cpp: GUI: Show project - file's name in project file -dialog title. - -2010-07-12 Kimmo Varis - - * gui/projectfile.h: GUI: Don't mention auto-allocated classes even - in comments. - -2010-07-12 Kimmo Varis - - * gui/gui.pro, gui/mainwindow.cpp, gui/projectfiledialog.cpp, - gui/projectfiledialog.h: GUI: Add Project class to handle project - files and projects. This commit separates logic more from the GUI. The dialog class is - only responsible from showing the dialog and handling data in it. - Other related classes do the project file reading/saving/etc. - -2010-07-12 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Variable usage: better - handling of pointer aliasing. Ticket: #1729 - -2010-07-12 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Disable opening XML report file when - checking files. - -2010-07-12 Kimmo Varis - - * gui/erroritem.cpp, gui/erroritem.h, gui/resultstree.cpp, - gui/xmlreport.cpp: GUI: Refactor linenumber in ErrorLine to unsigned - int. - -2010-07-12 Kimmo Varis - - * gui/threadresult.cpp: GUI: Ignore errors with "debug" severity. GUI doesn't know about "debug" severity. And it is not worth the - trouble to add new category everywhere (icons etc) just for internal - debug messages. - -2010-07-12 Kimmo Varis - - * lib/tokenize.cpp: Change the "information" error to "debug" error. There was one debugging error sent with "information" severity. That - confused the GUI that didn't know such severity. Change the severity - to "debug" so the meaning of the error is more clear. - -2010-07-11 Kimmo Varis - - * : commit 8a24435db2f2133f08483b9fb3de9c76100b3d71 Author: Kimmo - Varis Date: Sun Jul 11 16:33:49 2010 +0300 - -2010-07-11 Kimmo Varis - - * : commit c9d63fa454e6954a0ca1215b1e9b9441c2a01817 Author: Kimmo - Varis Date: Sun Jul 11 16:20:19 2010 +0300 - -2010-07-11 Kimmo Varis - - * gui/resultstree.cpp, gui/resultstree.h: GUI: Ask file location - from user if not found. When loading report from XML there is no full paths so the file's - real path is not known and cppcheck cannot open it. So if the file - has no absolute path then we ask where the file is located from the - user. - -2010-07-11 Kimmo Varis - - * gui/report.cpp, gui/resultsview.cpp, gui/xmlreport.cpp, - gui/xmlreport.h: GUI: Add errors read from XML report to GUI. - -2010-07-11 Kimmo Varis - - * gui/resultstree.cpp: GUI: Fix line numbers and filenames in - errors. When converting to use new ErrorItem and ErrorLine I made few - mistakes in how I handled the data. And for some reason there was - not even warnings about converting integers to QStrings. - -2010-07-11 Kimmo Varis - - * gui/erroritem.cpp, gui/erroritem.h, gui/gui.pro, gui/main.cpp: - GUI: Fix transporting errors. Need to register integer list as new metatype so that Qt's type - system knows how to use it. Adding also additional constructors for - the ErrorItem. - -2010-07-10 Kimmo Varis - - * gui/erroritem.h, gui/resultstree.cpp, gui/resultsview.cpp, - gui/resultsview.h, gui/threadhandler.cpp, gui/threadresult.cpp, - gui/threadresult.h, gui/xmlreport.cpp: GUI: Use integer list instead - of variant list for line numbers. - -2010-07-10 Kimmo Varis - - * gui/erroritem.h, gui/gui.pro, gui/report.h, gui/resultstree.cpp, - gui/resultstree.h, gui/resultsview.cpp: GUI: More refactoring to use - ErrorItem and ErrorLine. - -2010-07-10 Kimmo Varis - - * gui/csvreport.cpp, gui/csvreport.h, gui/report.h, - gui/resultstree.cpp, gui/txtreport.cpp, gui/txtreport.h, - gui/xmlreport.cpp, gui/xmlreport.h: GUI: Refactor error data passing - to use own class. - -2010-07-10 Kimmo Varis - - * gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h, - gui/report.cpp, gui/report.h, gui/resultsview.cpp, - gui/resultsview.h, gui/xmlreport.cpp, gui/xmlreport.h: GUI: Read - errors from report XML file. This commits adds new "Open XML" item to File-menu. Selecting this - menuitem allows user to select report file to open. When the file is - read the error data is printed to debug output. Later patches will - implement adding error data back to the GUI. - -2010-07-10 Kimmo Varis - - * gui/xmlreport.cpp, gui/xmlreport.h: GUI: Refactoring xmlreport to - use pointer to stream writing class. - -2010-07-10 Daniel Marjamäki - - * Makefile: Makefile: debug mode - -2010-07-10 Daniel Marjamäki - - * Makefile: 1.44: updated Makefile for release - -2010-07-10 Daniel Marjamäki - - * Changelog: Changelog: updated for release - -2010-07-10 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, lib/cppcheck.cpp, - win_installer/productInfo.wxi: 1.44: updated version information - -2010-07-10 Daniel Marjamäki - - * man/manual.docbook: Manual: Better description of -D. As suggested - by kwin. Ticket #1212 - -2010-07-09 Daniel Marjamäki - - * Makefile, lib/settings.cpp, lib/settings.h, test/testsettings.cpp: - Unit Testing: Test that suppressions work - -2010-07-09 Daniel Marjamäki - - * lib/settings.cpp: Fixed #1836 (--suppresions file.txt fails due to - wrong line edings) - -2010-07-09 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #1834 (False positive: - invalid iterator when erase() is used in if-else) - -2010-07-09 Daniel Marjamäki - - * lib/settings.cpp: Settings: added '#include ' - -2010-07-08 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts: GUI: Update translation files. - -2010-07-08 Kimmo Varis - - * gui/projectfile.ui: GUI: Set buddies in Project file -dialog. - -2010-07-08 Kimmo Varis - - * gui/projectfiledialog.cpp: GUI: Don't write empty elements to - project file. - -2010-07-08 Kimmo Varis - - * gui/projectfile.cpp, gui/projectfile.h, gui/projectfiledialog.cpp: - GUI: Improve error handling for reading/writing project file. - -2010-07-08 Kimmo Varis - - * gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h, - gui/projectfiledialog.cpp, gui/projectfiledialog.h: GUI: Allow - creating new project file. Add new "New project file" item to File-menu and rename existing - "Project File" item to "Open Project File". Selecting new file opens - empty project file dialog. When the dialog is then closed the user - is asked to select a filename for the new project file. - -2010-07-08 Reijo Tomperi - - * man/cppcheck.1.xml: Update man page - -2010-07-08 Kimmo Varis - - * gui/projectfile.cpp: GUI: Fix giving filename to project file - saving function. - -2010-07-08 Kimmo Varis - - * gui/gui.cppcheck: GUI: Revert testing changes from project file. - -2010-07-08 Daniel Marjamäki - - * lib/checkunusedfunctions.cpp, lib/checkunusedfunctions.h, - lib/cppcheck.cpp, lib/errorlogger.h, test/testunusedfunctions.cpp: - Unused functions: Refactoring - -2010-07-08 Daniel Marjamäki - - * lib/settings.cpp: Suppressions: Validate given id - -2010-07-08 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1835 (false - positive: uninitialized variable when using ?) - -2010-07-08 Kimmo Varis - - * gui/gui.pro: GUI: Remove custom lrelease target. Remove the custom lrelease target since it fails to work in Fedora - 13. In Fedora 13 there is no 'lrelease' binary but 'lrelease-qt4'. - -2010-07-08 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Variable usage: fixed - false positive reported in #1729 - -2010-07-08 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Variable usage: Better - aliasing support (Ticket #1729) - -2010-07-08 Kimmo Varis - - * gui/projectfile.txt: GUI: Update project file spec. Remove autoalloc list from example and remove mentioning that there - is no GUI for project files. - -2010-07-08 Kimmo Varis - - * gui/gui.cppcheck, gui/projectfile.cpp, gui/projectfile.h, - gui/projectfiledialog.cpp, gui/projectfiledialog.h: GUI: Implement - writing project file data to disk from dialog. This commit implements writing data in the project file dialog back - to project file. - -2010-07-07 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Realloc: changed - the error message. I think it's better to mention realloc in the - message. - -2010-07-07 Kimmo Varis - - * gui/gui.pro, gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h, - gui/projectfile.ui, gui/projectfiledialog.cpp, - gui/projectfiledialog.h: GUI: Add dialog for editing project file. This commit adds the dialog and code that reads the project file - data to the dialog. The changed data is not yet saved back to the - file. - -2010-07-07 Reijo Tomperi - - * cli/threadexecutor.cpp, cli/threadexecutor.h, - test/testthreadexecutor.cpp: Fixed #1650 (Cppcheck deadlock) - http://sourceforge.net/apps/trac/cppcheck/ticket/1650 - -2010-07-07 Reijo Tomperi - - * test/testthreadexecutor.cpp: Add more unit tests - -2010-07-07 Kimmo Varis - - * gui/mainwindow.cpp, gui/threadhandler.cpp, gui/threadhandler.h: - Fixed #1831 (GUI: no progress bar when rechecking files) Need to initialize the checking also when rechecking. - -2010-07-07 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1825 (*log(0) - error) - -2010-07-07 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Variable usage: only - warn about variables that have variable id > 0 - -2010-07-07 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1803 (False - positive: unused variable: this) - -2010-07-07 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1729 (False - positive: variable is assigned a value that is never used (pointer - aliasing)) - -2010-07-07 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1829 (### - Internal error in Cppcheck. Please report it.) - -2010-07-06 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1789 (false - positive: memory leak (reallocation in subfunction through - parameter)) - -2010-07-06 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1824 (false - positive: unitialised variable) - -2010-07-06 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1827 (### - Internal error in Cppcheck. Please report it.) - -2010-07-05 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1821 - (simplifyTypedef: better typedef support) - -2010-07-05 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1823 (tokenize && - wrong) - -2010-07-05 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Buffer - Overrun: Fixed false positive when variable is reassigned in called - function - -2010-07-05 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1820 (False - positive: memory leak (auto deallocated class)) - -2010-07-05 Daniel Marjamäki - - * gui/cppcheck_se.ts: GUI: updated swedish translation - -2010-07-05 Daniel Marjamäki - - * gui/cppcheck_se.ts: GUI: updated swedish translation - -2010-07-05 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1817 (False - positive: Resource leak (casting)) - -2010-07-05 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1818 (False - positive: Dangerous usage of strncpy (copying a constant string)) - -2010-07-04 Kimmo Varis - - * gui/mainwindow.cpp, gui/resultsview.cpp, gui/resultsview.h, - gui/threadhandler.cpp, gui/threadresult.cpp, gui/threadresult.h: - GUI: Refactoring progress/finished handling. Progress signal had also item count with it and then the handler - determined that check is ready when max count of progress was done. - Also progressbar was practically reset in every progress signal. - This was simply fragile code. After this patch progress signal has only the current progress - count. Total count of items is given when initializing the checking. - And there is separate function for handling check finishing. This also fixes the bug that progressbar was not hidden after - checking or when interrupting the checking. - -2010-07-04 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts: GUI: Fixup TS translation files after they got - messed up earlier. The lupdate got confused of removing "Show security errors" and - there being existing string "Show style errors". lupdate thought the - "Show style errors" was a new version ("similar enough") of "Show - security errors" string instead of new string to translate. Or - actually existing translated string. So many translations got "Show - style errors" translated by earlier translation of "Show security - errors". This commit fixes the mess by manually removing "Show security - errors" references and restoring correct translations of "Show style - errors" from earlier file versions. Good lesson to learn about lupdate behavior. - -2010-07-04 Kimmo Varis - - * gui/gui.cppcheck, gui/mainwindow.cpp, gui/projectfile.cpp, - gui/projectfile.h: GUI: Remove code for automatic deallocated - classes. Project file code still read the list of automatically deallocated - classes from project file. That feature hasn't been supported in few - last releases. - -2010-07-03 Kimmo Varis - - * gui/main.ui: GUI: Change UI file to LF EOLs. In previous commit I accidentally committed the UI file with CRLF - EOLs. - -2010-07-03 Kimmo Varis - - * gui/common.h, gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h: - GUI: Refactoring toolbar member names to be more consistent. - -2010-07-03 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts: GUI: Update translation files. - -2010-07-03 Kimmo Varis - - * gui/common.h, gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h: - GUI: Add View-menu item for showing/hiding Categories-toolbar. - -2010-07-03 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts, gui/main.ui: GUI: Move menuitem to hide/show - main toolbar to own submenu. - -2010-07-03 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts, gui/gui.qrc, gui/main.ui: GUI: Add new toolbar - for error/warning categories. This commit adds new toolbar to the GUI for fast and easy switching - of different warning//error categories. The icons are currently just - placeholders until more descriptive icons are created. - -2010-07-03 Kimmo Varis - - * gui/main.ui, gui/mainwindow.cpp: GUI: Rename main toolbar in code. - -2010-07-03 Kimmo Varis - - * gui/common.h, gui/cppcheck_de.ts, gui/cppcheck_en.ts, - gui/cppcheck_fi.ts, gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/main.ui, - gui/mainwindow.cpp, gui/mainwindow.h, gui/resultstree.cpp: GUI: - Remove remains of "possible error". - -2010-07-03 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts, gui/main.ui: GUI: Remove "Show security errors" - action. There was no code using this, just GUI action for it. - -2010-07-03 Kimmo Varis - - * gui/common.h, gui/cppcheck_de.ts, gui/cppcheck_en.ts, - gui/cppcheck_fi.ts, gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/main.ui, - gui/mainwindow.cpp, gui/mainwindow.h, gui/resultstree.cpp: GUI: - Remove remains of "all style". Earlier "all style" was just removed as menu item but all the code - related was left in place. This commit actually removes the now - unneeded code. - -2010-07-02 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1821 - (simplifyTypedef: better typedef support) - -2010-06-30 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1790 - (mismatching allocation/deallocation false positive) - -2010-06-30 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #157 (Forgetting to put a break in a switch statement) - -2010-06-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1815 (False - positive: uninitialized variable when using ? operator) - -2010-06-30 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #1816 (Tokenizer: remove restrict keyword) - -2010-06-29 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Class checking: Fixed FP - for static arrays (not initialized in constructor) - -2010-06-29 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1808 (false - positive: uninitialized variable with multiple assignment) - -2010-06-28 Kimmo Varis - - * win_installer/cppcheck.wxs: MSI Installer: Fix description text. - -2010-06-28 Kimmo Varis - - * : commit 914891f247dee27826b9ad0ca65c3ece364a8f8f Author: Kimmo - Varis Date: Mon Jun 28 20:47:00 2010 +0300 - -2010-06-28 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: --author=Robert - Reif Fixed #1814 (false positive: Variable hides typedef with same name) - -2010-06-28 Kimmo Varis - - * win_installer/modpath.iss, win_installer/readme_InnoSetup.txt: - Remove remaining Innosetup installer files. Innosetup installer was removed earlier but some files related to it - were not removed. - -2010-06-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1809 (false - positive: uninitialized variable with nested if) - -2010-06-26 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1811 (false - positive: Uninitialized variable) - -2010-06-25 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1808 (false - positive: uninitialized variable with multiple assignment) - -2010-06-25 Robert Reif - - * test/testclass.cpp: Unit Testing: Added TODO test case for - uninitialized member variable in operator=. Ticket: #1813 - -2010-06-25 Robert Reif - - * lib/tokenize.cpp, test/testunusedvar.cpp: Fixed #1813 (false - negative: Member variable not assigned a value in operator=) - -2010-06-24 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1495 (False -s - positive: Member variable not assigned a value in operator=) - -2010-06-24 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1812 (false - negative: functionVariableUsage doesn't support static variables) - -2010-06-24 firewave - - * lib/checkclass.cpp: Avoid Visual Studio warnings about constant - expressions - -2010-06-23 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1732 (False - positive: Variable not assigned a value (pointer to pointer)) - -2010-06-22 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1810 (False - positive: Variable 'separator' is assigned a value that is never - used) - -2010-06-22 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1807 (false - positive: Variable is not assigned a value (casting function - parameters)) - -2010-06-21 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1800 (false - positive: memory leak when ptr used as map key) - -2010-06-21 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1799 (false - positive: Variable is assigned a value that is never used) - -2010-06-20 Daniel Marjamäki - - * lib/tokenize.cpp: Refactoring: Removed redundant checks - -2010-06-20 Daniel Marjamäki - - * lib/checkother.cpp: Refactoring: Reduced copy/pasted code - -2010-06-20 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Reduce copy/pasted code - -2010-06-20 Martin Ettl - - * test/testdangerousfunctions.cpp: added testcases for testing - dangerous functions: mktemp - -2010-06-19 Nicolás Alvarez - - * lib/preprocessor.cpp: Change size-t to std::string::size_type. - -2010-06-19 Nicolás Alvarez - - * lib/preprocessor.cpp: Fix build error on 64-bit systems. - -2010-06-11 Nicolás Alvarez - - * lib/checkother.cpp, test/testother.cpp: Fix typos in sizeofsizeof - error message. - -2010-06-19 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1795 (false - positive: nullpointer dereference (needs to improve - Tokenizer::simplifyKnownVariables)) - -2010-06-19 Daniel Marjamäki - - * lib/checkother.cpp, lib/tokenize.cpp, test/testother.cpp, - test/testtokenize.cpp: Fixed #1633 (tokenizer: - simplifyKnownVariable: improved handling of arithmetic) - -2010-06-19 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1802 - (Preprocessor: macros are expanded wrong) - -2010-06-19 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Refactoring. Broke out code - that parses out the parameters from code. - -2010-06-19 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Borland C++: Fixed compiler errors. - When using 'a?b:c', Borland requires that b and c are the same type - -2010-06-19 Daniel Marjamäki - - * cppcheck.cbproj, testrunner.cbproj: Borland C++: Updated project - files - -2010-06-18 Robert Reif - - * test/testunusedvar.cpp: Refactoring testunusedvariables. This - fixes #1804. - -2010-06-18 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1801 - (simplifyTypedef: duplicate typedefs not handled properly) - -2010-06-18 Reijo Tomperi - - * Makefile, test/testthreadexecutor.cpp, tools/dmake.cpp: Added test - case deadlock_with_many_errors() for ticket #1650 - http://sourceforge.net/apps/trac/cppcheck/ticket/1650 The test case - is currently commented out, because it would cause tests to hang - also. - -2010-06-17 firewave - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cli/cppcheck.vcxproj.filters, lib/lib.vcproj, lib/lib.vcxproj, - lib/lib.vcxproj.filters, test/test.vcproj, test/test.vcxproj, - test/test.vcxproj.filters: Removed obsolete checkheaders from Visual - Studio projects - -2010-06-17 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1801 - (Segmentation fault while scanning Qt's qcups.cpp) - -2010-06-16 Leandro Lisboa Penz - - * test/testmemleak.cpp: Ticket #1789 is not really fixed; added - TODO. - -2010-06-16 Leandro Lisboa Penz - - * test/testmemleak.cpp: Improved test of pointer argument realloc. - -2010-06-16 Leandro Lisboa Penz - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #1789 (false positive: memory leak - (reallocation in subfunction through parameter)) Detecting reallocations in the other function. - -2010-06-16 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #853 (False - positive: memory leak for member variable with unknown function) - -2010-06-16 Robert Reif - - * lib/token.cpp, lib/tokenize.cpp, test/testunusedvar.cpp: variable - usage: fix false positives when __attribute__ is used. Ticket: #1792 - -2010-06-16 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: simplify the alias - handling in the checking of variable usage. Ticket: #1729 - -2010-06-16 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1798 - (structure templates) - -2010-06-15 Zachary Blair - - * lib/checkother.cpp: Applied review suggestions for Ticket #920 - -2010-06-15 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #1545 (new check: usage - of iterator pointing to invalid memory after reserve) - -2010-06-15 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #887 (Tokenizer: - Simplify variable value after loop) - -2010-06-15 Daniel Marjamäki - - * Makefile, lib/checkheaders.cpp, lib/checkheaders.h, lib/lib.pri: - removed the deprecated checkheaders - -2010-06-14 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #920 (new style check: find empty catch blocks) - -2010-06-14 Reijo Tomperi - - * Makefile, cli/threadexecutor.cpp, cli/threadexecutor.h, - cppcheck.cbp, test/testthreadexecutor.cpp: Add - testthreadexecutor.cpp - -2010-06-14 Robert Reif - - * lib/checkother.cpp, lib/token.cpp, lib/token.h, lib/tokenize.cpp, - test/testunusedvar.cpp: Fixed #1792 (false positive: Variable 'test' - is assigned a value that is never used) - -2010-06-14 Daniel Marjamäki - - * lib/checkother.cpp, lib/tokenize.cpp, test/testother.cpp, - test/testtokenize.cpp: Fixed #1776 (False Negative: Unitialized - array) - -2010-06-14 Daniel Marjamäki - - * lib/check.h, lib/checkbufferoverrun.cpp, lib/checkother.h, - lib/executionpath.h, lib/token.h: doxygen: fixed error messages - given by doxygen - -2010-06-13 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: more - specific bailouts to reduce false negatives - -2010-06-13 Daniel Marjamäki - - * test/testmemleak.cpp: Added testcase for #1557 (false positive: - memory leak) - -2010-06-13 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1783 (false - positive: uninitalized variable in constructor/operator=, when - calling overloaded functions) - -2010-06-13 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1718 (Tokenizer - add close braces to for loop at wrong place when if-else presents - inside) - -2010-06-13 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/checkclass.cpp, lib/tokenize.cpp, - test/testbufferoverrun.cpp: Fixed #1787 (false negative: out of - bounds in derived class) - -2010-06-12 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1510 (false - positive '(possible error) Memory leak' when 'a = b = new ...; - delete a' (but not b)) - -2010-06-12 Daniel Marjamäki - - * test/testmemleak.cpp: reverted 'added a todo testcase for ticket - #1788' - -2010-06-12 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1788 - (Tokenizer: template destructor is lost) - -2010-06-11 Martin Ettl - - * test/testmemleak.cpp: added a few testcases for checking memory - leaks in classes - -2010-06-11 Martin Ettl - - * test/testmemleak.cpp: added a todo testcase for ticket #1788 - -2010-06-10 Martin Ettl - - * test/testmemleak.cpp: added todo-testcase for ticket #1401 - -2010-06-10 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1784 (false - positive: Variable is not assigned a value) - -2010-06-10 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1782 - ((error) ### Internal error in Cppcheck. Please report it.) - -2010-06-09 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1781 (false - positive: uninitialized variable when using asm statement in macro) - -2010-06-09 Martin Ettl - - * test/testother.cpp: added a todo testcase for ticket 1778 - -2010-06-08 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Variable usage: read - variable when using syntax '..=*(p);' - -2010-06-07 Martin Ettl - - * AUTHORS: added Martin Ettl to authors list - -2010-06-06 Robert Reif - - * test/testunusedvar.cpp: Variable usage: Added TODO testcases for - handling pointer alias. Ticket: #1729 - -2010-06-06 Martin Ettl - - * test/testbufferoverrun.cpp: added TODO_TESTCASE for ticket 1734: - Array index out of bounds - -2010-06-06 Martin Ettl - - * test/testclass.cpp: added a TODO testcase for ticket 1724 - -2010-06-06 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1726 (False - negative: null pointer dereference in switch block) - -2010-06-06 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - skipping function call inside allocation - -2010-06-06 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: Added - allocation function 'g_strdup_printf' - -2010-06-06 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1722 (Member - variable initialized in call to base class constructor) - -2010-06-05 Martin Ettl - - * lib/checkclass.cpp, test/testclass.cpp: applied patch from - php-coder from ticket 1724; removed TODO_TESTCASES; - -2010-06-05 Daniel Marjamäki - - * man/cppcheck.1.xml: man: updated the cppcheck.1.xml file. - -2010-06-05 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Code coverage: Removed unused code - -2010-06-05 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1725 (segfault - in ExecutionPath::bailOutVar (probably caused by #1721 fix)) - -2010-06-04 Leandro Lisboa Penz - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #73 (memory leaks not found when calling - a function that returns allocated memory through a parameter) - -2010-06-03 Zachary Blair - - * AUTHORS: Added Zachary Blair to the AUTHORS file - -2010-06-03 Zachary Blair - - * lib/checkbufferoverrun.cpp: Applied review suggestions for Ticket - #568 - -2010-06-04 Guillaume Miossec - - * gui/cppcheck_fr.ts: Added french translation - -2010-06-03 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1721 (False - negative: uninitialized variable in switch block) - -2010-06-03 Martin Ettl - - * test/testclass.cpp: run astyle - -2010-06-03 Martin Ettl - - * test/testclass.cpp: removed a wrong const declaration - -2010-06-03 Martin Ettl - - * test/testclass.cpp: added a testcase and todo testcases for ticket - #1724 - -2010-06-03 Robert Reif - - * lib/checkother.cpp, lib/tokenize.cpp, test/testtokenize.cpp, - test/testunusedvar.cpp: Fixed #1723 (Variable assigned value which - is never used but is thrown) - -2010-06-02 Daniel Marjamäki - - * lib/cppcheck.cpp: updated --help output. The --enable is used to - enable additional checks. - -2010-06-02 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1720 - (segmentation fault of cppcheck) - -2010-06-02 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: astyle formatting - -2010-06-02 Daniel Marjamäki - - * lib/checkother.cpp: CheckOther::nullConstantDereference: Fixed - cppcheck warning message - tok may become null - -2010-06-02 Daniel Marjamäki - - * lib/checkother.cpp: Refactoring of - CheckOther::nullConstantDereference - -2010-06-01 Zachary Blair - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Fixed #568 (string functions with - command line arguments may overflow buffer) - -2010-06-01 Nicolás Alvarez - - * generate_coverage_report: coverage report script: Extract only - relevant data from the .info file. Only files in the current directory are kept. This gets rid of - standard C++ library headers from the coverage report. - -2010-06-01 Nicolás Alvarez - - * generate_coverage_report: coverage report script: Quit immediately - on errors, but don't consider missing coverage_report dir when - deleting it as an error - -2010-06-01 Daniel Marjamäki - - * test/testunusedvar.cpp: Added unit test for ticket #1720 - -2010-05-31 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1719 (False - negative: memory leak (fgets in condition)) - -2010-05-30 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: Fixed - bug in CheckMemoryLeak::functionReturnType - -2010-05-30 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1717 (False - positive: Resource leak with while) - -2010-05-30 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Tokenizer: simplify loops that continue while errno is EINTR - -2010-05-30 firewave - - * lib/checkother.h: Fixed Visual Studio 2010 warning - -2010-05-30 firewave - - * .gitignore: Added *.opensdf to ignore list - -2010-05-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Uninitialized variables: - fixed false negative when using uninitialized variable inside malloc - call - -2010-05-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Uninitialized variables: - better handling when uninitialized variables are used in function - calls - -2010-05-30 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: ExecutionPath: Better - handling of 'FOREACH (..) {}' - -2010-05-30 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: ExecutionPath: better - handling of 'FOREACH(..){..}' - -2010-05-30 Daniel Marjamäki - - * lib/checkother.cpp: Refactoring uninitialized variables (checking - variable declarations) - -2010-05-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Uninitialized variables: - better handling of struct variables - -2010-05-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1716 (Wrong - reporting of leak with close() in a while loop condition) - -2010-05-29 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: small - fixes. add checking of 'g_fopen'. don't let 'fclose' calls be - interpreted as 'callfunc' - -2010-05-29 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1716 (Wrong - reporting of leak with close() in a while loop condition) - -2010-05-29 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1715 (switch - with fallthrough and 'return' confuses cppcheck) - -2010-05-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1714 (Wrong - precedence for shift operators when simplifying calculations?) - -2010-05-29 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - enabled the leaks checking when members are not deallocated in the - destructor. This checking was previously an --all check so there - could be false positives. - -2010-05-29 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: astyle - formatting - -2010-05-29 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: the virtual destructor - error message needs to be restricted. marked the checking as - inconclusive for now. - -2010-05-28 Zachary Blair - - * : commit 1a25183e8fb5c47c24c6c507e7fad3a0e63fbc28 Author: Robert - Reif Date: Sat May 29 07:52:06 2010 +0200 - -2010-05-28 Zachary Blair - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #818 - (Detect sprintf buffer overrun with struct members) - -2010-05-29 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1713 (remove - Microsoft variants of inline) - -2010-05-28 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1671 - (simplifyTypedef: support for more typedefs) - -2010-05-27 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1712 (False - negative: dereferencing uninitialized pointer) - -2010-05-27 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: Fixed - #1711 (Wrong typedef name shown when struct declared with - __attribute__) - -2010-05-27 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1671 - (simplifyTypedef: support for more typedefs) - -2010-05-26 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1709 (char - buffer that is only accessed with pointers is marker not assigned) - -2010-05-26 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: astyle - formatting - -2010-05-26 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #1704 (false negative: null pointer dereference) - -2010-05-26 Zachary Blair - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Fixed #168 (buffer overflow: not enough - room for the null terminator) - -2010-05-25 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1671 - (simplifyTypedef: support for more typedefs) - -2010-05-25 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1708 (False - positive for const) - -2010-05-24 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1707 (false - positive: Memory leak) - -2010-05-24 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Removed TODO - -2010-05-23 Daniel Marjamäki - - * test/testclass.cpp: Unit Testing: Added a few more test cases - related to ticket #1700 - -2010-05-23 Daniel Marjamäki - - * test/testclass.cpp: Unit Testing: Added test case for ticket 1700 - -2010-05-23 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Tokenizer: Removed the Tokenizer::simplifyNamespaces. Ticket: #1700 - -2010-05-23 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1671 - (simplifyTypedef: support for more typedefs) - -2010-05-23 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: false positive: - Variable is assigned a value that is never used - -2010-05-21 Daniel Marjamäki - - * lib/cppcheck.cpp, lib/cppcheck.h: 2 pass checking: broke out - Cppcheck::analyseFile. To be used for tests - -2010-05-21 Daniel Marjamäki - - * lib/check.h, lib/checkother.cpp, lib/checkother.h, - lib/cppcheck.cpp, lib/settings.cpp, lib/settings.h, - test/testother.cpp: Added some multipass checking for the - uninitialized variables. It is still experimental. You can activate - it with the '--test-2-pass' switch. Some more refactorings are - needed to make it truly usable, the main thing is to make it thread - safe. - -2010-05-21 Daniel Marjamäki - - * lib/tokenize.cpp: fixed gcc compiler warnings (comparing float - values) - -2010-05-21 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed gcc compiler warning - -2010-05-21 Robert Reif - - * lib/preprocessor.cpp: Fixed #1698 (Add define support to GUI) - -2010-05-21 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: give dead pointer a value - -2010-05-20 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1699 (False - positive: The function '...' can be const) - -2010-05-20 Robert Reif - - * gui/mainwindow.cpp, gui/projectfile.cpp, gui/projectfile.h, - gui/projectfile.txt: Fixed #1698 (Add define support to GUI) - -2010-05-20 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: #1697 (false positive: The - function can be const) - -2010-05-19 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1695 (Ticket #1614 is broken using latest from git) - -2010-05-18 Daniel Marjamäki - - * lib/executionpath.cpp: printchecks: better explanation of its - purpose. I call it from gdb when I debug ExecutionPaths. - -2010-05-18 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: astyle formatting - -2010-05-18 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1646 (False - positive: array access after return cannot have default loop value) - -2010-05-18 firewave - - * lib/checkother.cpp, lib/executionpath.cpp: Avoid some Visual - Studio warnings - -2010-05-18 firewave - - * .gitignore: Added ipch output folder to ignore list - -2010-05-18 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1691 (False - positive: Function parameter 'x' is passed by value. It could be - passed by reference instead.) - -2010-05-17 Zachary Blair - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, lib/tokenize.cpp, - test/testmemleak.cpp: Fixed #1649 (add a warning for potential - memory leaks when using realloc) - -2010-05-18 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1685 - (segmentation fault of cppcheck) - -2010-05-17 Daniel Marjamäki - - * gui/mainwindow.cpp: Fixed #1689 (failed to build gui) - -2010-05-17 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1673 - (Tokenizer::simplifyTypedef causes segfault for boost library) - -2010-05-17 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: astyle - formatting - -2010-05-17 Daniel Marjamäki - - * lib/tokenize.cpp: Tokenizer: it is bad to do: - 'tok->previous()->deleteThis()' - -2010-05-17 Daniel Marjamäki - - * test/test.vcproj: Visual Studio 2008: Updated test project - -2010-05-17 Daniel Marjamäki - - * test/testcppcheck.cpp: asd - -2010-05-16 Monika Lukow - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1418 (false negative: buffer access out of bounds) - -2010-05-16 Erik Lax - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1683 (false - positive: The function can be const) - -2010-05-16 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1684 (false - positive: buffer access out of bounds when using extern variable - declaration) - -2010-05-16 Daniel Marjamäki - - * lib/check.h, lib/errorlogger.h: Refactoring: Removed - 'possibleError' - -2010-05-16 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Refactoring: Removed possibleError messages - from CheckMemoryLeaks - -2010-05-16 Erik Lax - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1688 - (Tokenizer::simplifyKnownVariables and pointer assignments) - -2010-05-16 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Refactoring: Removed 'possible error' - message about cin - -2010-05-16 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Refactoring: Removed some inconclusive - checking in CheckBufferOverrun - -2010-05-16 Daniel Marjamäki - - * lib/check.h, lib/checkclass.cpp, lib/checkclass.h, - lib/checkother.cpp, lib/checkother.h, lib/checkstl.cpp, - lib/errorlogger.h, test/testclass.cpp, test/testdivision.cpp, - test/testother.cpp, test/teststl.cpp: Refactoring: Removed - Severity::possibleStyle - -2010-05-16 Daniel Marjamki - - * lib/cppcheck.cpp, man/manual.docbook: doc: updated docs about -D - command line flag - -2010-05-16 Daniel Marjamki - - * lib/cppcheck.cpp, lib/settings.h, test/testcppcheck.cpp: Fixed - #1212 (Allow giving used defines in command line) - -2010-05-16 Daniel Marjamki - - * lib/checkexceptionsafety.cpp, lib/checkmemoryleak.cpp, - lib/cppcheck.cpp, lib/settings.cpp, lib/settings.h, - test/testexceptionsafety.cpp, test/testmemleak.cpp: Code cleanup: - Removed autodealloc handling - -2010-05-15 Daniel Marjamki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1678 (false - positive: Member variable not initialized in the constructor, for - arrays of undefined type) - -2010-05-15 Erik Lax - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #1679 (Bad iterators - checks fails to detect bugs with indent levels) - -2010-05-15 Erik Lax - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: Fixed #1680 - (Bad iterators checks fail to detect invalidation of iterator for - deletion by value) - -2010-05-15 Daniel Marjamki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #1681 (false negative: memory leak in - operator =) - -2010-05-15 Daniel Marjamki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Added - test CheckOther::sizeofsizeof. Inspired by #1682 - -2010-05-14 Daniel Marjamki - - * lib/mathlib.cpp, test/testsuite.cpp: astyle formatting - -2010-05-14 Daniel Marjamki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1682 - (Internal error) - -2010-05-13 Konrad Windszus - - * Makefile, lib/checkstl.cpp, lib/cppcheck.cpp, - test/testcppcheck.cpp, test/testsuite.cpp, test/testsuite.h, - test/tinyxml/changes.txt, test/tinyxml/tinystr.cpp, - test/tinyxml/tinystr.h, test/tinyxml/tinyxml.cpp, - test/tinyxml/tinyxml.h, test/tinyxml/tinyxmlerror.cpp, - test/tinyxml/tinyxmlparser.cpp: Ticket #1318: Make sure error ids - are unique - -2010-05-13 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #1677 (False positive: (style) Variable 'xxx' is assigned a - value that is never used) - -2010-05-12 Martin Ettl - - * lib/mathlib.cpp, test/testmathlib.cpp: mathlib:isInt() now handles - calles of 'u' and 'l' correctly; testcases added - -2010-05-11 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1671 - (simplifyTypedef: support for more typedefs) - -2010-05-10 Reijo Tomperi - - * man/cppcheck.1.xml: Update man page - -2010-05-10 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp, test/testconstructors.cpp: - Fixed #1669 (Still seeing 'possible style' warnings in 1.43) - -2010-05-10 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1665 ('If - you see this, there is a bug': Token::Match('%var% ( %varid% [,)]', - 0)) - -2010-05-10 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Better handling of - function pointer typedef - -2010-05-10 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1666 - (simplifyTypedef: add support for typedefs of functions) - -2010-05-09 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1648 - (mismatch allocate and deallocate calls.) - -2010-05-09 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1662 (false - positive: Data is allocated but not initialized, when using sprintf) - -2010-05-09 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1660 (false - positive: Variable is assigned a value that is never used, when - using cast) - -2010-05-09 Robert Reif - - * test/testunusedvar.cpp: Added unit test for #5 - -2010-05-08 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #1656 (dangerous usage - of erase not detected: for (; it != it2; ++it) ints.erase(it);) - -2010-05-08 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1658 (false - negative: uninitialized pointer usage) - -2010-05-08 Daniel Marjamäki - - * createrelease: createrelease: more details about dmake - -2010-05-08 Daniel Marjamäki - - * Makefile: Makefile: Set debug mode - -2010-05-08 Daniel Marjamäki - - * Makefile: Makefile: Set release mode - -2010-05-08 Daniel Marjamäki - - * Changelog, createrelease: Changelog: Updated for release - -2010-05-08 Daniel Marjamäki - - * tools/dmake.cpp: dmake: updated compiler flags in release mode. - only -Wall. - -2010-05-08 Daniel Marjamäki - - * createrelease: createrelease: mention that the Makefile should be - updated - -2010-05-08 Daniel Marjamäki - - * lib/cppcheck.cpp: cli help: show the flags in alphabetical order - -2010-05-08 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, lib/cppcheck.cpp, - man/manual.docbook, win_installer/productInfo.wxi: Updated version - to 1.43 - -2010-05-08 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: refactoring: spell checking comments - -2010-05-08 Daniel Marjamäki - - * man/manual.docbook: manual: updated error message to match latest - versions - -2010-05-08 Daniel Marjamäki - - * readme.txt: readme.txt: mention the online manual - -2010-05-08 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Refactoring: Changed - 'possible style' to 'style' - -2010-05-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1654 (False - positive: Memory leak with: ( delete ( p ) , ( p ) = 0 );) - -2010-05-06 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #959: (new check: wrong usage of fflush()) Simplified and set - severity to error - -2010-05-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1651 - (Tokenizer::setVarId wrong handling of return statement) - -2010-05-05 Daniel Marjamäki - - * test/testunusedvar.cpp: Robert Reif refactoring chained assignments - -2010-05-05 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1646 (False - positive: array access after return cannot have default loop value) - -2010-05-05 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1647 (False - positive: buffer is not assigned value (assigned through alias)) - -2010-05-04 Daniel Marjamäki - - * lib/checkother.cpp, lib/tokenize.cpp, test/testtokenize.cpp: Fixed - #1646 (False positive: array access after return cannot have default - loop value) - -2010-05-04 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1643 (Variable - usage (pointer is assigned but never used)) - -2010-05-04 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1639 (False - positive: unused variable value (pointer aliasing)) - -2010-05-03 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #959 (new check: wrong usage of fflush()) - -2010-05-02 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1642 - (Tokenizer::simplifyKnownVariables: simplify after loop) - -2010-05-02 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: - refactoring: changed the severity for strncatUsage from - possibleError to style - -2010-05-02 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: - refactoring: Use style severity instead of possible error for the - 'The size argument is given as a char constant' - -2010-05-01 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: STL: added testcase for 'if - (str.find(%any%)) ..' - -2010-05-01 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: refactoring: enable the - 'suspicious pointer subtraction' checking - -2010-05-01 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1640 (False - negative: Unused value (variable is assigned but never read)) - -2010-05-01 Daniel Marjamäki - - * Makefile: Makefile: Updated with dmake - -2010-05-01 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Fixed Cppcheck warning about possible - null pointer dereference - -2010-05-01 Daniel Marjamäki - - * test/testunusedvar.cpp: astyle formatting - -2010-05-01 Slava Semushin - - * lib/tokenize.cpp, lib/tokenize.h, test/testunusedvar.cpp: Fixed - #1574 (chain assignments could be simplified) http://sourceforge.net/apps/trac/cppcheck/ticket/1574 - -2010-05-01 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1638 - (Tokenizer::simplifyKnownVariables: removing variable declaration) - -2010-05-01 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Unit testing: Improved - test coverage for variable usage checking - -2010-04-30 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1636 (Fix false - positive with strncpy termination check) - -2010-04-30 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1622 (False - positive: buf is not assigned a value (pointer aliasing)) - -2010-04-30 Eric Sesterhenn - - * lib/checkbufferoverrun.cpp: Fixed #1636 (Fix false positive with - strncpy termination check) - -2010-04-29 Eric Sesterhenn - - * lib/tokenize.cpp: Fixed #1634 (Null character not correctly - tokenized) - -2010-04-29 Robert Reif - - * lib/tokenize.cpp: Fixed #1631 (Tokenizer: remove register keyword) - -2010-04-29 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1622 (False - positive: buf is not assigned a value (pointer aliasing)) - -2010-04-28 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1629 (False - negative: null pointer derefence not detected 'c[0] = 0') - -2010-04-28 Daniel Marjamäki - - * lib/executionpath.cpp, lib/executionpath.h, test/testother.cpp: - Fixed #1632 (false positive: unintialized variable) - -2010-04-27 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1628 (false - negative: memory leak when using redundant braces) - -2010-04-27 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Variable usage: Use - variable id instead of variable name to identify variable - -2010-04-26 Daniel Marjamäki - - * lib/checkother.h: Fixed #1626 ('Unusual pointer arithmetic' false - positive) - -2010-04-26 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1627 (###### If you see this, there is a bug ###### - - Token::Match('%varid% [ %num% ]', 0)) - -2010-04-25 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #943 - (Tokenizer: improve handling of pointer aliasing) - -2010-04-25 Daniel Marjamäki - - * lib/checkother.cpp: astyle formatting - -2010-04-25 Martin Ettl - - * : commit ec935178fc22d0f35e384c28346122c3614e6575 Author: Martin - Ettl Date: Sun Apr 25 13:14:58 2010 +0200 - -2010-04-25 firewave - - * lib/executionpath.h: Fixed GCC warning about initialization order - -2010-04-25 firewave - - * lib/checkother.cpp: Fixed Access Violation with --enable=style - when no tokens exist - -2010-04-25 firewave - - * lib/executionpath.cpp: Added missing include - -2010-04-25 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkmemoryleak.cpp, - lib/checkother.cpp, lib/executionpath.cpp, lib/executionpath.h, - test/testother.cpp: ExecutionPath: Better handling of if - -2010-04-25 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #948 - (array index out of bound not detected 'a[i-1] = 0') - -2010-04-24 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #1440 (false negative: memory leak - (function parameters)) - -2010-04-24 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - lib/tokenize.cpp, test/testbufferoverrun.cpp, - test/testsimplifytokens.cpp: Fixed #836 (buffer overrun: memmove) - -2010-04-24 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1146 - (improve check: memory leak not detected (allocation in - subfunction)) - -2010-04-24 Daniel Marjamäki - - * lib/check.h: --errorlist : don't show inconclusive messages in the - output because those are disabled - -2010-04-24 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1571 ('C-style - pointer casting' should not be reported for C files) - -2010-04-24 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, test/testexceptionsafety.cpp: Fixed - #1616 (false positive - Upon exception there is a memory leak) - -2010-04-24 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Removed - the check for unreachable code. The g++ warning -Wunreachable-code - is recommended instead. This closes #1603 (break after a return or - goto should not be an error in a switch statement). - -2010-04-24 Daniel Marjamäki - - * test/testunusedvar.cpp: Redundant assignment: Added TODO testcase - for detecting redundant assignment in inner scope - -2010-04-24 Daniel Marjamäki - - * test/testunusedvar.cpp: unit testing: Added TODO test case for - unused variables when using pointer aliasing. Related with ticket - #1622 - -2010-04-24 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: variable usage: - refactoring the checking - -2010-04-24 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp, - test/testtokenize.cpp: tokenizer improvements: remove calling - convention (#1619) - -2010-04-23 Zachary Blair - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1169 (improve - check: divsion by zero not detected when using the shift (>>) - operator) - -2010-04-23 Reijo Tomperi - - * Cppcheck.xcodeproj/project.pbxproj, - cppcheck.xcodeproj/project.pbxproj: cppcheck.xcodeproj -> - Cppcheck.xcodeproj to avoid collision with tab completion in Linux - -2010-04-23 Martin Ettl - - * test/testbufferoverrun.cpp: added further testcases to - multidimensional out of bounds unit test - -2010-04-23 Martin Ettl - - * test/testbufferoverrun.cpp: update in todo testcase (line number - was wrong) - -2010-04-23 Martin Ettl - - * : commit 572ae0c1b4389ade7ee6296119dc1499e4708a97 Author: Martin - Ettl Date: Fri Apr 23 21:56:35 2010 +0200 - -2010-04-23 Reijo Tomperi - - * cppcheck.xcodeproj/project.pbxproj, project.pbxproj: renamed: - project.pbxproj -> cppcheck.xcodeproj/project.pbxproj - -2010-04-23 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Fixed #819 (array index out of bounds - not detected for multidimension arrays) - -2010-04-22 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1615 (False - positive - C-style pointer casting) - -2010-04-22 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: astyle formatting - -2010-04-22 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Cleanup CheckBufferOverrun - -2010-04-22 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Refactoring: Improved the - checkFunctionCalls, warning when size argument is given through char - constant - -2010-04-22 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Refactoring: Moved function call check - to checkFunctionCalls - -2010-04-22 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/token.cpp, - test/testbufferoverrun.cpp: CheckBufferOverrun: Fixed false - positives caused by refactorings - -2010-04-22 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #1564 (CppCheck does not recognise redundant IF) - -2010-04-21 Robert Reif - - * lib/checkbufferoverrun.cpp, lib/tokenize.cpp, lib/tokenize.h, - test/testsimplifytokens.cpp: Fixed #1619 (tokenizer: remove calling - convention) - -2010-04-21 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: CheckBufferOverrun: simplify checking - of read|write problems - -2010-04-21 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: CheckBufferOverrun: Don't give false - positives when reading from array with strncpy/strncat - -2010-04-21 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: CheckBufferOverrun: Refactoring the - checking of function calls - -2010-04-21 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Refactoring: CheckBufferOverrun - refactorings. split up the checkScope into two separate functions. - The ArrayInfo usage was improved. Also broke out for-loop handling - into separate functions. - -2010-04-20 Zachary Blair - - * lib/checkclass.cpp, lib/checkclass.h, - lib/checkdangerousfunctions.cpp, lib/checkdangerousfunctions.h, - lib/checkother.cpp, lib/checkother.h, lib/checkstl.cpp, - lib/checkstl.h, test/testcharvar.cpp, test/testclass.cpp, - test/testdangerousfunctions.cpp, test/testincompletestatement.cpp, - test/testother.cpp, test/testunusedvar.cpp: Fixed #855 (Refactoring: - move conditions into checks) - -2010-04-20 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Change - "Array index -1 corresponds with 4294967295..." error message into - "Array index -1 is out of bounds" - -2010-04-20 Reijo Tomperi - - * test/testfilelister.cpp: fileLister_win32.h -> filelister_win32.h - -2010-04-20 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1614 (negative array index issues in latest from git) - -2010-04-19 Robert Reif - - * test/testclass.cpp: Unit Testing: Added TODO testcases for ticket - #1593 (false negative: the function can be declared as const) - -2010-04-18 Daniel Marjamäki - - * runastyle.bat: runastyle.bat: updated astyle script - -2010-04-18 Reijo Tomperi - - * test/testmemleak.cpp: Fix one compiler warning - -2010-04-18 Reijo Tomperi - - * : commit 8eff4fcbba669191d151255d5e10eda2f14e9106 Author: Daniel - Marjamäki Date: Sun Apr 18 - 21:07:21 2010 +0200 - -2010-04-18 Reijo Tomperi - - * lib/checkbufferoverrun.cpp: astyle fix - -2010-04-18 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: astyle formatting - -2010-04-18 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Buffer Overrun: Broke out the checking - for negative array index - -2010-04-18 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h: Refactoring: - Renamed ArrayInfo::type_size to ArrayInfo::element_size - -2010-04-18 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Refactoring: Reusing the ArrayInfo in - CheckBufferOverrun - -2010-04-18 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h: - BufferOverflow: Refactoring ArrayInfo - -2010-04-18 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1602 (functions - defined in header outside of class cannot be const) - -2010-04-18 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Buffer overruns: First change to detect - overruns in multidimensional arrays (#819) - -2010-04-18 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1613 (False - -s positive: Template instantiation hides typedef with same name) - -2010-04-18 Robert Reif - - * lib/tokenize.cpp, test/testclass.cpp: Fixed #1612 (false positive: - The function can be const) - -2010-04-17 Daniel Marjamäki - - * test/testbufferoverrun.cpp: Unit Testing: added assertions for - todo testcases to detect changes - -2010-04-17 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1607 (false - positive: variable is assigned a value that is never used) - -2010-04-17 Daniel Marjamäki - - * project.pbxproj: Xcode: Added Xcode project file - -2010-04-17 Daniel Marjamäki - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: STL: fixed - false negative when erasing invalidated iterator - -2010-04-17 Daniel Marjamäki - - * test/testunusedvar.cpp: Unit Testing: Added assert for todo - testcase to catch changes. - -2010-04-17 Daniel Marjamäki - - * test/teststl.cpp: Unit Testing: Added assert for todo testcase to - catch changes. - -2010-04-17 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Unused struct member: - Fixed false positives - -2010-04-17 Daniel Marjamäki - - * lib/settings.cpp, lib/settings.h, test/testbufferoverrun.cpp, - test/testclass.cpp, test/testconstructors.cpp, - test/testdangerousfunctions.cpp, test/testdivision.cpp, - test/testincompletestatement.cpp, test/testmemleak.cpp, - test/testpreprocessor.cpp, test/testsimplifytokens.cpp, - test/teststl.cpp, test/testtokenize.cpp: Refactoring: Refactoring - the Settings class - -2010-04-17 Daniel Marjamäki - - * lib/cppcheck.cpp: Borland C++: Fixed compiler errors - -2010-04-16 Reijo Tomperi - - * test/testcppcheck.cpp: Add test cases for --template parsing - -2010-04-16 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #1600 (false positive: - After insert, the iterator 'aI' may be invalid) - -2010-04-16 Reijo Tomperi - - * lib/settings.cpp: Fix --template to work again - -2010-04-16 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1605 (false - positive: uninitialized variable) - -2010-04-16 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1607 (false - positive: variable is assigned a value that is never used) - -2010-04-15 firewave - - * lib/cppcheck.cpp, lib/preprocessor.cpp, lib/preprocessor.h: Fix - #1585 (--append doesn't work with TAB formating) - -2010-04-15 Reijo Tomperi - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fix #1595 (case - marks improperly tokenized with macro) - http://sourceforge.net/apps/trac/cppcheck/ticket/1595 - -2010-04-15 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp, cli/threadexecutor.cpp, - gui/aboutdialog.cpp, gui/applicationdialog.cpp, - gui/applicationlist.cpp, gui/checkthread.cpp, gui/csvreport.cpp, - gui/fileviewdialog.cpp, gui/mainwindow.cpp, gui/projectfile.cpp, - gui/report.cpp, gui/resultstree.cpp, gui/resultsview.cpp, - gui/settingsdialog.cpp, gui/threadhandler.cpp, - gui/translationhandler.cpp, gui/txtreport.cpp, gui/xmlreport.cpp, - lib/check.h, lib/checkautovariables.h, lib/checkbufferoverrun.cpp, - lib/checkbufferoverrun.h, lib/checkclass.h, - lib/checkdangerousfunctions.h, lib/checkexceptionsafety.h, - lib/checkmemoryleak.h, lib/checkother.cpp, lib/checkother.h, - lib/checkstl.h, lib/cppcheck.cpp, lib/preprocessor.cpp, - lib/settings.cpp, lib/token.cpp, lib/tokenize.cpp, runastyle, - test/testsimplifytokens.cpp, test/teststl.cpp, test/testsuite.cpp, - tools/extracttests.cpp: astyle: Update to astyle 1.24 - -2010-04-15 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Fixed #1596 ('Index out of bounds' false - positive) - -2010-04-15 Robert Reif - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1253 (improve - check: uninitialized variable not found when using reference) - -2010-04-15 Robert Reif - - * lib/tokenize.cpp, test/testtokenize.cpp: Another fix for #1601 - (change simplifyInitVar to split declaration from initialization) - -2010-04-15 Zachary Blair - - * lib/preprocessor.cpp, test/testpreprocessor.cpp, - test/testsuite.cpp, test/testsuite.h: Fixed #1526 (Cppcheck checks - redundant configurations) - -2010-04-14 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1588 - (typedef struct incorrectly simplified) - -2010-04-14 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: Fixed - #1601 (change simplifyInitVar to split declaration from - initialization) - -2010-04-14 firewave - - * .gitignore: Added *.sdf files (created by Vsiaul Studio 2010) to - ignore list - -2010-04-14 firewave - - * cli/cppcheck.vcproj, cli/cppcheck.vcxproj, - cli/cppcheck.vcxproj.filters, cppcheck.sln, test/test.vcproj, - test/test.vcxproj, test/test.vcxproj.filters: Moved shared files - back into executable projects - it caused the instances of the - checks to be optimized away - -2010-04-14 firewave - - * cli/cppcheck.vcxproj, cli/cppcheck.vcxproj.filters, - cppcheck_vs2010.sln, lib/lib.vcxproj, lib/lib.vcxproj.filters, - test/test.vcxproj, test/test.vcxproj.filters: Added Visual Studio - 2010 soultion and project files - -2010-04-14 firewave - - * : commit e3e2ee35aa7a0d22bfddc2dedeb4e5e630a769c4 Author: firewave - Date: Wed Apr 14 12:01:45 2010 +0200 - -2010-04-13 Reijo Tomperi - - * test/testcppcheck.cpp: Add simple --showtime test case - -2010-04-13 Reijo Tomperi - - * test/testpreprocessor.cpp: Fix compiler warning: cast truncates - constant value - -2010-04-13 firewave - - * : commit efd18e3d429a9ef9a22bd438dc18f1b8d66b0ed8 Author: firewave - Date: Tue Apr 13 22:22:44 2010 +0200 - -2010-04-13 Reijo Tomperi - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fix: sizeof(char*) - was not simplified correctly - -2010-04-13 Reijo Tomperi - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fix #1599 (false - positive on if( (f = fopen("foo", "r")) == ((FILE*)NULL) )) - http://sourceforge.net/apps/trac/cppcheck/ticket/1599 - -2010-04-13 Daniel Marjamäki - - * readme.txt: readme: minor cleanup. we don't need to mention the - '--all' flag anymore. - -2010-04-13 firewave - - * cli/cppcheck.vcproj, cppcheck.sln, lib/lib.vcproj, - test/test.vcproj: Moved shared files to seperate lib project - -2010-04-13 firewave - - * cli/cppcheck.vcproj, test/test.vcproj: - cleaned up .vcproj files a bit - raised the warning level in test.vcproj to 4 to match - cppcheck.vcproj. - -2010-04-13 Reijo Tomperi - - * cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h, cli/main.cpp, - cli/threadexecutor.cpp, cli/threadexecutor.h, gui/aboutdialog.cpp, - gui/aboutdialog.h, gui/applicationdialog.cpp, - gui/applicationdialog.h, gui/applicationlist.cpp, - gui/applicationlist.h, gui/checkthread.cpp, gui/checkthread.h, - gui/common.h, gui/csvreport.cpp, gui/csvreport.h, - gui/fileviewdialog.cpp, gui/fileviewdialog.h, gui/main.cpp, - gui/mainwindow.cpp, gui/mainwindow.h, gui/projectfile.cpp, - gui/projectfile.h, gui/report.cpp, gui/report.h, - gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.cpp, - gui/resultsview.h, gui/settingsdialog.cpp, gui/settingsdialog.h, - gui/threadhandler.cpp, gui/threadhandler.h, gui/threadresult.cpp, - gui/threadresult.h, gui/translationhandler.cpp, - gui/translationhandler.h, gui/txtreport.cpp, gui/txtreport.h, - gui/xmlreport.cpp, gui/xmlreport.h, lib/check.h, - lib/checkautovariables.cpp, lib/checkautovariables.h, - lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - lib/checkclass.cpp, lib/checkclass.h, - lib/checkdangerousfunctions.cpp, lib/checkdangerousfunctions.h, - lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h, - lib/checkheaders.cpp, lib/checkheaders.h, lib/checkmemoryleak.cpp, - lib/checkmemoryleak.h, lib/checkother.cpp, lib/checkother.h, - lib/checkstl.cpp, lib/checkstl.h, lib/checkunusedfunctions.cpp, - lib/checkunusedfunctions.h, lib/classinfo.h, lib/cppcheck.cpp, - lib/cppcheck.h, lib/errorlogger.cpp, lib/errorlogger.h, - lib/executionpath.cpp, lib/executionpath.h, lib/filelister.cpp, - lib/filelister.h, lib/filelister_unix.cpp, lib/filelister_unix.h, - lib/filelister_win32.cpp, lib/filelister_win32.h, lib/mathlib.cpp, - lib/mathlib.h, lib/preprocessor.cpp, lib/preprocessor.h, - lib/settings.cpp, lib/settings.h, lib/token.cpp, lib/token.h, - lib/tokenize.cpp, lib/tokenize.h, test/testautovariables.cpp, - test/testbufferoverrun.cpp, test/testcharvar.cpp, - test/testclass.cpp, test/testconstructors.cpp, - test/testcppcheck.cpp, test/testdangerousfunctions.cpp, - test/testdivision.cpp, test/testexceptionsafety.cpp, - test/testfilelister.cpp, test/testincompletestatement.cpp, - test/testmathlib.cpp, test/testmemleak.cpp, test/testother.cpp, - test/testpreprocessor.cpp, test/testredundantif.cpp, - test/testrunner.cpp, test/testsimplifytokens.cpp, test/teststl.cpp, - test/testsuite.cpp, test/testsuite.h, test/testtoken.cpp, - test/testtokenize.cpp, test/testunusedfunctions.cpp, - test/testunusedprivfunc.cpp, test/testunusedvar.cpp, - tools/dmake.cpp: Update copyright year in all source files - -2010-04-13 Reijo Tomperi - - * lib/filelister_unix.cpp, lib/filelister_unix.h, - lib/filelister_win32.cpp, lib/filelister_win32.h: Change some files - to UTF-8 - -2010-04-13 Reijo Tomperi - - * lib/cppcheck.cpp: Disable "Overall time" output when --showtime is - not used - -2010-04-13 Daniel Marjamäki - - * lib/checkother.cpp: astyle formatting - -2010-04-13 Zachary Blair - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #1530 (possible new check: strlen return value versus zero.) - -2010-04-13 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkclass.h, lib/cppcheck.cpp, - lib/settings.h, lib/tokenize.cpp, test/testcppcheck.cpp: dos2unix - -2010-04-13 firewave - - * lib/checkbufferoverrun.cpp, lib/checkclass.h, lib/tokenize.cpp: - Fixed some VS2008 warnings - -2010-04-13 firewave - - * cli/cppcheck.vcproj: Removed some duplicated .cpp files from - "Header Files" in Visual Studio project file - -2010-04-13 firewave - - * test/testcppcheck.cpp: Added test cases for more command-line - options - -2010-04-13 firewave - - * lib/cppcheck.cpp, lib/settings.h: More --showtime updates: - removed "average" - added number of results, average processing time and overall time - to non-"file" output - -2010-04-12 Oliver Stoeneberg - - * lib/cppcheck.cpp, lib/settings.cpp, lib/settings.h: showtime: - refactoring and improving. Added summary/file/top5/average options. - -2010-04-12 Daniel Marjamäki - - * lib/tokenize.cpp: Revert "Optimization: Made Tokenizer::setVarId a - bit faster by temporarily assigning 'string id'. This means less - string comparisons are needed." This reverts commit 4b8080e425846513c2edae0b34b92d9804f524f4. - -2010-04-12 Daniel Marjamäki - - * test/testtokenize.cpp: Unit Testing: Better unit testing of - Tokenizer::setVarId. Related to ticket #1592 - -2010-04-12 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #1590 - (False negative: Array index out of bounds: "0 <= i") - http://sourceforge.net/apps/trac/cppcheck/ticket/1590 - -2010-04-12 Oliver Stoeneberg - - * lib/cppcheck.cpp: Fixed #1591 (Patch to increase --showtime - resolution) - -2010-04-12 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #1588 (typedef struct incorrectly simplified) - -2010-04-11 Reijo Tomperi - - * test/testbufferoverrun.cpp: More tests added to - test/testbufferoverrun.cpp - -2010-04-11 Reijo Tomperi - - * : commit 9a4cbe0540118476d6497e5a9cf53ab5c7f8a94f Author: Reijo - Tomperi Date: Sun Apr 11 22:53:21 - 2010 +0300 - -2010-04-11 Daniel Marjamäki - - * lib/tokenize.cpp: Optimization: Made Tokenizer::setVarId a bit - faster by temporarily assigning 'string id'. This means less string - comparisons are needed. - -2010-04-11 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1587 (Crash while processing file) - -2010-04-11 Reijo Tomperi - - * test/testcppcheck.cpp: Add some unit tests for command line - argument parsing - -2010-04-11 Reijo Tomperi - - * Makefile, tools/dmake.cpp: Enable -Wshadow in Makefile - -2010-04-11 Reijo Tomperi - - * lib/checkstl.cpp, lib/tokenize.cpp: Fix last of the -Wshadow - warnings. - -2010-04-10 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Fixed SIGABRT in new checking - -2010-04-10 Daniel Marjamäki - - * Makefile, lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Fixed #1190 (array index out of bounds - when index variable is assigned in a condition) - -2010-04-10 Daniel Marjamäki - - * test/testbufferoverrun.cpp: Unit Testing: Added an ASSERT - -2010-04-10 Daniel Marjamäki - - * test/testbufferoverrun.cpp: Refactoring: simplified test case - -2010-04-10 Daniel Marjamäki - - * gui/main.ui, gui/mainwindow.cpp: gui: removed options for possible - error/style - -2010-04-10 Daniel Marjamäki - - * lib/cppcheck.cpp: Cppcheck Help: Removed information about - --auto-dealloc because it is not relevant at the moment. - -2010-04-10 Daniel Marjamäki - - * man/manual.docbook: manual: removed information about possible - errors. The inconclusive checks have been disabled. Removed section - about --auto-dealloc.. this section is not relevant at the moment. - -2010-04-10 Daniel Marjamäki - - * lib/cppcheck.cpp: Cppcheck: Deprecated the command line options - -a, --all and --enable=possibleError - -2010-04-10 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkclass.cpp, lib/checkclass.h, - lib/checkmemoryleak.cpp, lib/checkother.cpp, lib/checkother.h, - lib/checkstl.h, lib/errorlogger.h, lib/settings.cpp, - lib/settings.h, test/testbufferoverrun.cpp, test/testclass.cpp, - test/testconstructors.cpp, test/testdangerousfunctions.cpp, - test/testdivision.cpp, test/testincompletestatement.cpp, - test/testmemleak.cpp, test/testsimplifytokens.cpp, test/teststl.cpp: - Refactoring: Disable inconclusive checks. They can still be - activated for debugging/testing purposes - -2010-04-10 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #1357 (problem in stl - insert method of set template) - -2010-04-10 Zachary Blair - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #779 - (Tokenizer: delete register keyword everywhere) - -2010-04-10 Daniel Marjamäki - - * lib/checkclass.cpp: Refactoring: use more specific conditions - instead of std::isupper. Only the A-Z are interesting. This also - fixes compiler errors. - -2010-04-10 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1134 (improve check: pointer access out of bounds not detected - (allocated with malloc)) - -2010-04-09 Martin Ettl - - * test/testunusedvar.cpp: ticket 1253 added testcases and one todo - -2010-04-09 Reijo Tomperi - - * cli/threadexecutor.cpp, lib/preprocessor.cpp, lib/preprocessor.h, - lib/token.cpp, lib/token.h, test/testcppcheck.cpp, - test/testmemleak.cpp, test/testsimplifytokens.cpp: Fix more -Wshadow - compile warnings - -2010-04-09 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed some false - positives for unused struct members - -2010-04-09 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1579 (False - positive: function can be const when return type is unknown) - -2010-04-09 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1584 (False - positive: (static) Member variable not assigned a value in - operator=) - -2010-04-09 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1581 (False - positives 'The scope of the variable x can be reduced') - -2010-04-08 Martin Ettl - - * lib/checkmemoryleak.h, lib/cppcheck.cpp: reduced -Wshadow warnings - from gcc-4.4 - -2010-04-08 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1576 ('Index out of bounds' false positive) - -2010-04-08 Daniel Marjamäki - - * lib/checkclass.cpp, test/testunusedprivfunc.cpp: Fixed #1537 - ('Unused private function' when using pointer to member function) - -2010-04-08 Daniel Marjamäki - - * lib/filelister.h: astyle formatting - -2010-04-08 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1580 - (unnamed anonymous struct can segfault) - -2010-04-07 Martin Ettl - - * lib/filelister.h: fixed ticket 1578, class Filelister had no - virtual dtor - -2010-04-07 Robert Reif - - * test/testclass.cpp: Unit testing: Testing handling of Borland C++ - properties - -2010-04-06 Reijo Tomperi - - * lib/checkmemoryleak.cpp: Fix some -Wshadow compile warnings - -2010-04-06 Daniel Marjamäki - - * : commit 7caaee3739e85d3a577e1dba4deb07d9383b87d4 Author: Reijo - Tomperi Date: Tue Apr 6 22:53:05 - 2010 +0300 - -2010-04-06 Reijo Tomperi - - * test/testcppcheck.cpp, test/testpreprocessor.cpp, - test/testsuite.cpp: Add a few test cases for CppCheck::parseFromArgs - -2010-04-06 Martin Ettl - - * test/testbufferoverrun.cpp: added TODO testcase for checking - fwrite() and fread() check for buffer overrun - -2010-04-06 Reijo Tomperi - - * lib/checkclass.cpp, lib/checkmemoryleak.cpp, lib/checkother.cpp: - Fix vs warnings. Apply patch from kidkat. - -2010-04-06 Reijo Tomperi - - * lib/checkunusedfunctions.h: Fix: warning C4138: '*/' found outside - of comment - -2010-04-06 Robert Reif - - * test/testclass.cpp: Unit Testing: Better code coverage of the - operator= checking - -2010-04-06 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: astyle fix - -2010-04-06 Jens Bäckman - - * lib/checkmemoryleak.cpp: Fix a rare crash with oddly formatted - source files - -2010-04-06 Martin Ettl - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: fixed - ticket 997, now fread and fwrite checked for bufferoverrun - -2010-04-05 Reijo Tomperi - - * test/testbufferoverrun.cpp: Fix line number in previously - committed unit test - -2010-04-05 Daniel Marjamäki - - * test/testbufferoverrun.cpp: Unit Testing: Added unit test for - untested code in CheckBufferOverrun. Using memset on struct. - -2010-04-05 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Refactor - and fix "After a strncpy() the buffer should be zero-terminated" - checking, - -2010-04-05 Martin Ettl - - * lib/checkother.cpp, test/testother.cpp: #ticket 1513: added sqrt() - support - -2010-04-05 Reijo Tomperi - - * lib/checkother.cpp: astyle fix - -2010-04-05 Martin Ettl - - * : commit fe7c6aed9f441bc06bf16898be07df7f3ec11d71 Author: Martin - Ettl Date: Mon Apr 5 20:07:53 2010 +0200 - -2010-04-05 Daniel Marjamäki - - * test/testbufferoverrun.cpp: Unit Testing: Buffer overruns when - using memchr/memset/memcpy/etc - -2010-04-05 Reijo Tomperi - - * lib/checkother.cpp, lib/checkother.h, lib/mathlib.cpp: astyle fix - -2010-04-05 Martin Ettl - - * lib/checkother.cpp, test/testother.cpp: #ticket 1513 added fmod() - support - -2010-04-05 Martin Ettl - - * lib/checkother.cpp, lib/checkother.h, lib/mathlib.cpp, - test/testother.cpp: added atan2() check to ticket #1513 - -2010-04-05 Daniel Marjamäki - - * Makefile: Makefile: updated the Makefile with dmake - -2010-04-05 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Cleanup: Removed unused code from - CheckMemoryLeak - -2010-04-05 Daniel Marjamäki - - * test/testtoken.cpp: Refactoring: Renamed TestTOKEN to TestToken - -2010-04-05 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Uninitialized variables: - better handling of 'a[b[..]]' when b is not initialized - -2010-03-16 Kimmo Varis - - * lib/filelister_win32.cpp: Improve ifdeffing. - -2010-04-05 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Uninitialized variables: - Detect reading uninitialized data through array/pointer variable - -2010-04-04 Reijo Tomperi - - * lib/checkunusedfunctions.cpp, lib/checkunusedfunctions.h, - lib/cppcheck.cpp, lib/tokenize.cpp: Fix #1322 (Add cppcheckError and - unusedFunction to --errorlist, give out internal errors in xml) - http://sourceforge.net/apps/trac/cppcheck/ticket/1322 - -2010-04-04 Daniel Marjamäki - - * test/testsimplifytokens.cpp: Refactoring unit testing - -2010-04-04 Daniel Marjamäki - - * test/testtokenize.cpp: Added TODO testcase for ticket #1169 - (improve check: divsion by zero not detected when using the shift - (>>) operator) - -2010-04-04 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkother.cpp, - lib/executionpath.cpp, lib/executionpath.h, test/testother.cpp: - Refactoring: some refactoring of ExecutionPath. The foundError was - removed. No automatic bailout of all checks are made when errors are - found. - -2010-04-04 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #1566 (false negative: uninitialized variable) - -2010-04-04 Daniel Marjamäki - - * lib/tokenize.cpp, test/testother.cpp, test/testtokenize.cpp: - Tokenizer: tokenize 1E-2 into a single token - -2010-04-03 Reijo Tomperi - - * lib/checkother.cpp, lib/cppcheck.cpp, lib/cppcheck.h, - test/testcppcheck.cpp: Fix segmentation fault when calling with - --errorlist and add a testcase for it. - -2010-04-03 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Cleanup: Removed redundant simplification - in checkmemoryleak.cpp - -2010-04-03 Daniel Marjamäki - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: Cleanup: - Removed unfinnished checking of std::find - -2010-04-03 Daniel Marjamäki - - * lib/tokenize.h: astyle formatting - -2010-04-03 Daniel Marjamäki - - * webreport.sh: webreport: detect duplicate code - -2010-04-03 Kimmo Varis - - * cli/cli.pro: Update CLI Qmake project file compiler flags. - -2010-04-03 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h: Refactoring: Moved copy/paste - code in Tokenizer - -2010-04-03 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h: Refactoring: broke out - copy/pasted code - -2010-04-03 Daniel Marjamäki - - * lib/checkother.cpp: Borland C++: Fixed compiler error - -2010-04-02 Reijo Tomperi - - * lib/mathlib.cpp: astyle fix - -2010-04-02 Martin Ettl - - * lib/mathlib.cpp, lib/mathlib.h, test/testmathlib.cpp: added a - helper function to mathlib::isNullValue(), it checks wheter a string - has a null representation or not and returns a boolian result; - extended nullchecks in testmathlib.cpp - -2010-04-02 Martin Ettl - - * test/testmathlib.cpp: coverage report fix: more testcases for - mathlib::isInt() added in order to get a better coverage - -2010-04-02 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1527 (Function - can't be const if it has non-const operator overload call) - -2010-04-02 Reijo Tomperi - - * lib/checkother.cpp: astyle fix - -2010-04-02 Martin Ettl - - * : #ticket #1513 added asin() support - -2010-04-02 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h: Cleanup: The Tokenizer doesn't - need to handle UTF in code nor multiline string. That is handled in - the Preprocessor. - -2010-04-02 Reijo Tomperi - - * lib/checkother.cpp, lib/mathlib.cpp, test/testmathlib.cpp, - test/testother.cpp, test/testsuite.h: astyle fix - -2010-04-02 Martin Ettl - - * : commit 1d1d79a1e51f9d990c9c69823c78870ec1c870f0 Author: Daniel - Marjamäki Date: Fri Apr 2 20:25:13 2010 - +0200 - -2010-04-02 Martin Ettl - - * lib/checkother.cpp, lib/mathlib.cpp, test/testmathlib.cpp, - test/testother.cpp, test/testsuite.cpp, test/testsuite.h: added - acos() check to ticket #1513; added testcases for - MathLib::toDoubleNumber(), now double conversion of zeros is handled - correctly; changed assertEquals() function of testsuite parameters - from unsigned int to double. This is needed to avoid overflow of - unsigned int by comparing negative floating point values. - -2010-04-02 Daniel Marjamäki - - * lib/tokenize.cpp, test/testclass.cpp: Fixed #1565 (False positive: - Uninitialized variable 'B::j'. There are 2 classes with the name - 'B') - -2010-04-02 Martin Ettl - - * lib/checkother.cpp: added log10() check, for checking about - parameters passed to mathfunctions that do not make sense - -2010-04-02 Daniel Marjamäki - - * test/testclass.cpp: Added TODO test case to reduce false negatives - for uninitialized class members - -2010-04-02 Robert Reif - - * lib/checkclass.cpp: Cleanup: Removed unneeded code - -2010-04-02 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1479 (false - positive: unintialized variable when using goto) - -2010-04-02 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Fixed - #1563 (false positive: function can be const (assignment to static)) - -2010-04-02 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1553 (false - positive : uninitialized variable for struct timeval from - ) - -2010-04-02 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, lib/mathlib.cpp, - lib/mathlib.h, test/testmathlib.cpp, test/testother.cpp: astyle - formatting - -2010-04-02 Daniel Marjamäki - - * cli/cppcheckexecutor.cpp, cli/threadexecutor.cpp, - gui/aboutdialog.cpp, gui/applicationdialog.cpp, - gui/applicationlist.cpp, gui/checkthread.cpp, gui/csvreport.cpp, - gui/fileviewdialog.cpp, gui/mainwindow.cpp, gui/projectfile.cpp, - gui/report.cpp, gui/resultstree.cpp, gui/resultsview.cpp, - gui/settingsdialog.cpp, gui/threadhandler.cpp, - gui/threadresult.cpp, gui/translationhandler.cpp, - gui/txtreport.cpp, gui/xmlreport.cpp, lib/check.h, - lib/checkautovariables.cpp, lib/checkautovariables.h, - lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - lib/checkclass.cpp, lib/checkclass.h, - lib/checkdangerousfunctions.cpp, lib/checkdangerousfunctions.h, - lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h, - lib/checkheaders.cpp, lib/checkmemoryleak.cpp, - lib/checkmemoryleak.h, lib/checkother.cpp, lib/checkother.h, - lib/checkstl.cpp, lib/checkstl.h, lib/checkunusedfunctions.cpp, - lib/cppcheck.cpp, lib/errorlogger.cpp, lib/errorlogger.h, - lib/executionpath.cpp, lib/executionpath.h, lib/filelister.cpp, - lib/filelister_unix.cpp, lib/filelister_win32.cpp, lib/mathlib.cpp, - lib/mathlib.h, lib/preprocessor.cpp, lib/settings.cpp, - lib/token.cpp, lib/tokenize.cpp, test/testbufferoverrun.cpp, - test/testmathlib.cpp, test/testmemleak.cpp, test/testother.cpp, - test/testsimplifytokens.cpp, test/teststl.cpp, test/testsuite.cpp, - test/testtoken.cpp, test/testtokenize.cpp, test/testunusedvar.cpp, - tools/dmake.cpp, tools/extracttests.cpp: Reverted 'astyle fix'. - Those changes are not in sync with my astyle configuration/setup. - -2010-04-02 Martin Ettl - - * cli/cppcheckexecutor.cpp, cli/threadexecutor.cpp, - gui/aboutdialog.cpp, gui/applicationdialog.cpp, - gui/applicationlist.cpp, gui/checkthread.cpp, gui/csvreport.cpp, - gui/fileviewdialog.cpp, gui/mainwindow.cpp, gui/projectfile.cpp, - gui/report.cpp, gui/resultstree.cpp, gui/resultsview.cpp, - gui/settingsdialog.cpp, gui/threadhandler.cpp, - gui/threadresult.cpp, gui/translationhandler.cpp, - gui/txtreport.cpp, gui/xmlreport.cpp, lib/check.h, - lib/checkautovariables.cpp, lib/checkautovariables.h, - lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - lib/checkclass.cpp, lib/checkclass.h, - lib/checkdangerousfunctions.cpp, lib/checkdangerousfunctions.h, - lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h, - lib/checkheaders.cpp, lib/checkmemoryleak.cpp, - lib/checkmemoryleak.h, lib/checkother.cpp, lib/checkother.h, - lib/checkstl.cpp, lib/checkstl.h, lib/checkunusedfunctions.cpp, - lib/cppcheck.cpp, lib/errorlogger.cpp, lib/errorlogger.h, - lib/executionpath.cpp, lib/executionpath.h, lib/filelister.cpp, - lib/filelister_unix.cpp, lib/filelister_win32.cpp, lib/mathlib.cpp, - lib/mathlib.h, lib/preprocessor.cpp, lib/settings.cpp, - lib/token.cpp, lib/tokenize.cpp, test/testbufferoverrun.cpp, - test/testmathlib.cpp, test/testmemleak.cpp, test/testother.cpp, - test/testsimplifytokens.cpp, test/teststl.cpp, test/testsuite.cpp, - test/testtoken.cpp, test/testtokenize.cpp, test/testunusedvar.cpp, - tools/dmake.cpp, tools/extracttests.cpp: astyle fix - -2010-04-02 Martin Ettl - - * lib/checkother.cpp, lib/checkother.h, lib/mathlib.cpp, - lib/mathlib.h, test/testmathlib.cpp, test/testother.cpp: ticket - #1513 new check: Detecting obviously wrong math call arguments - passed to math functions) - -2010-04-01 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #1548 - (False positive: array index out of bounds in for-loop) - http://sourceforge.net/apps/trac/cppcheck/ticket/1548 - -2010-04-01 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1552 (false - positive: function can be const (array of struct)) - -2010-04-01 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Fixed - #1551 (false positive: The function 'A::vSet' can be const) - -2010-04-01 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1550 (Improve - check: Assignment to self) - -2010-03-31 Reijo Tomperi - - * cppcheck.cbp: Update codeblocks project file - -2010-03-31 Reijo Tomperi - - * lib/filelister.cpp: Fix cross compiling in Linux Change: #include - "fileLister_win32.h" -> #include "filelister_win32.h" - -2010-03-31 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: Makefile: Added flag -Wno-long-long - compiler flag to suppress warnings about long long - -2010-03-31 Daniel Marjamäki - - * lib/checkother.cpp, lib/tokenize.cpp, test/testtokenize.cpp, - test/testunusedvar.cpp: Fixed #1549 (false positive: uninitialized - variable) - -2010-03-31 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Unit testing: Added test - case for memset. Ticket: #1538 - -2010-03-31 Robert Reif - - * lib/token.cpp, lib/token.h, lib/tokenize.cpp, lib/tokenize.h, - test/testdivision.cpp, test/testtokenize.cpp: Fixed #1492 (false - negatives: array index out of bounds) - -2010-03-31 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Better checking for - assignment to self. Ticket: #1550 - -2010-03-30 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1539 (False positive: possible error Array index out of bounds) - -2010-03-29 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1535 (False - positive: member variable not initialized, struct with constructor) - -2010-03-29 Robert Reif - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1536 (###### If you see this, there is a bug ###### Token::Match() - - varid was 0) - -2010-03-28 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1148 (improve - check: usage of uninitialized variables) - -2010-03-28 Daniel Marjamäki - - * : commit 62d2845014da62f3ae18c468a5a4e6076d288adb Author: Robert - Reif Date: Sun Mar 28 15:56:13 2010 +0200 - -2010-03-28 Reijo Tomperi - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fix #1534 (False - positive with #elif (defined NAME)) - http://sourceforge.net/apps/trac/cppcheck/ticket/1534 - -2010-03-28 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: - Refactoring: Added CheckClass::isMemberFunc - -2010-03-28 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1516 (C++Builder - properties mistaken for uninitialized variables) - -2010-03-28 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1533 (False - positive: Uninitialized variable) - -2010-03-27 Reijo Tomperi - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fix #1532 (hang due - to commit 772aa95c8a) - http://sourceforge.net/apps/trac/cppcheck/ticket/1532 - -2010-03-27 Reijo Tomperi - - * test/testclass.cpp: astyle fix - -2010-03-27 Martin Ettl - - * lib/checkclass.cpp, test/testclass.cpp: extended The function can - be const test - -2010-03-27 Robert Reif - - * lib/tokenize.cpp, test/testbufferoverrun.cpp: Fixed #1523 (false - negative:: buffer access out of bounds when using shift operator) - -2010-03-26 Reijo Tomperi - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Partial fix for - #1475 (False positive: Not enough parameters for macro: #define A(a, - b...)) http://sourceforge.net/apps/trac/cppcheck/ticket/1475 - -2010-03-26 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1519 (false - negative: the function can be declared as const) - -2010-03-26 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, lib/tokenize.cpp, - test/testclass.cpp: Fixed #1525 (false negative: the function can be - declared as const (member declared as mutable)) - -2010-03-26 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1529 (false - positive: function can be const (struct member variable)) - -2010-03-26 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1496 (false - positive: Member variable not initialized in the constructor - 'X::m_d') - -2010-03-26 Raphael Geissert - - * lib/checkother.cpp, test/testother.cpp: Fixed #1511 (false - negative null pointer deref when dereferencing pointers to - constants) - -2010-03-26 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1522 (false - positive: function can be const (assignment in return)) - -2010-03-24 Daniel Marjamäki - - * lib/tokenize.cpp, test/testpreprocessor.cpp, - test/testtokenize.cpp: Tokenizer: Simplify 'false ==' to '!' - -2010-03-24 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1522 (false - positive: function can be const (assignment in return)) - -2010-03-24 Daniel Marjamäki - - * test/testpreprocessor.cpp: Preprocessor: Added TODO testcase when - using variadic macros - -2010-03-23 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1515 (false - positive: The function 'wxThreadInternal::SetExitCode' can be const) - -2010-03-23 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1517 (false - negative: the function can be declared as const) - -2010-03-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1504 (False - positive: Cppcheck incorrectly reports that extern variable is not - initialized) - -2010-03-20 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Fixed #1386 and #1387 (False positives - given by CheckMemoryLeakInFunction when temporary and member - variable don't have the same allocation and deallocation) - -2010-03-19 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1498 (false - positive: The function 'V::vSet' can be const) - -2010-03-19 Robert Reif - - * lib/tokenize.cpp, test/testclass.cpp: Tokenizer: remove unnamed - anonymous structures and unions (#1493) - -2010-03-19 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1491 (False - positive when putting an access specifier at the end of a class - declaration) - -2010-03-19 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1428 (False - positive: (possible error) Memory leak when memory deleted in - destructor) - -2010-03-19 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Here is a patch that adds support for derived - structs and fixes a bug that missed some nested structs. (#1493) - -2010-03-19 Raphael Geissert - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1512 - (incorrect handling of ndefs in the preprocessor) - -2010-03-19 Daniel Marjamäki - - * lib/checkother.h, lib/tokenize.cpp: astyle formatting - -2010-03-18 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed #1508 (false positive : uninitialized - variable) - -2010-03-18 Daniel Marjamäki - - * lib/checkother.h: doxygen: some updates to the lib/checkother - -2010-03-18 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Partial fix for #1493 (false positives: - function can be const and struct or union member is never used) - -2010-03-17 Daniel Marjamäki - - * lib/check.h, lib/checkautovariables.h, lib/checkbufferoverrun.h, - lib/checkclass.h, lib/checkdangerousfunctions.h, - lib/checkexceptionsafety.h, lib/checkother.cpp, lib/checkother.h, - lib/checkstl.h, lib/tokenize.cpp, lib/tokenize.h: doxygen updates - -2010-03-17 Daniel Marjamäki - - * lib/tokenize.h, test/testsimplifytokens.cpp, - test/testtokenize.cpp: unit testing: made Tokenizer functions public - so they can be unit tested - -2010-03-17 Daniel Marjamäki - - * test/testmemleak.cpp: unit testing: use const_cast instead of - defines - -2010-03-17 Daniel Marjamäki - - * doxyfile: doxygen: enabled the JAVADOC_AUTOBRIEF so the @brief - isn't required - -2010-03-17 Daniel Marjamäki - - * lib/checkmemoryleak.h: refactoring: no need to hide functions - because the definition isn't seen by the core program anyway. - -2010-03-17 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1506 - (typedef name hiding check combined with forward declaration leeds - to false positive) - -2010-03-16 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #1476 (false positive: Uninitialized variable) - -2010-03-16 Daniel Marjamäki - - * lib/checkother.cpp, test/testunusedvar.cpp: Fixed #1501 (false - positive: Variable 'n' is assigned a value that is never used) - -2010-03-16 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1503 (False - positive for uninitialized variable) - -2010-03-16 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: small const fix - -2010-03-15 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: Use product name as start - menu shortcut item name. - -2010-03-15 Kimmo Varis - - * win_installer/cppcheck.wxs, win_installer/productInfo.wxi: - Installer: Move couple of strings to productInfo.wxi. - -2010-03-14 Daniel Marjamäki - - * lib/checkother.h, lib/token.h: doxygen: Some comments for - CheckOther, added @todo to Token::Match - -2010-03-14 Daniel Marjamäki - - * lib/cppcheck.h, lib/filelister.h, lib/settings.h: doxygen: updated - comments for Cppcheck and FileLister - -2010-03-14 Daniel Marjamäki - - * gui/checkthread.h, gui/resultstree.h, gui/resultsview.h, - gui/threadresult.h: doxygen: fixed warning messages - -2010-03-14 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1494 (Improve - Tokenizer::simplifyKnownVariables to handle for loops better) - -2010-03-14 Daniel Marjamäki - - * doxyfile: doxygen: removed DETAILS_AT_TOP to get rid of warnings - that it is deprecated - -2010-03-14 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h, lib/settings.h: doxygen: - fixed error messages - -2010-03-13 Daniel Marjamäki - - * lib/checkexceptionsafety.h, lib/checkmemoryleak.h, - lib/preprocessor.cpp, lib/preprocessor.h, lib/settings.h, - lib/token.h: doxygen: fixed warning messages - -2010-03-13 Daniel Marjamäki - - * lib/errorlogger.h, lib/mathlib.h: doxygen: updated comments for - ErrorLogger and Severity - -2010-03-13 Daniel Marjamäki - - * lib/checkbufferoverrun.h, lib/checkclass.h, - lib/checkdangerousfunctions.h, lib/checkmemoryleak.cpp, - lib/checkother.cpp: doxygen: added more comments for - CheckNullPointer and CheckUninitVar - -2010-03-13 Daniel Marjamäki - - * lib/checkexceptionsafety.h, lib/checkmemoryleak.h: doxygen: added - comments - -2010-03-13 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1465 (false - positive: unintialized class member) - -2010-03-13 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1460 (false - positive: memory leak when using throw no_memory) - -2010-03-13 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #1477 (false positive: Uninitialized variable when pointer - given to struct) - -2010-03-13 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1491 (False - positive when putting an access specifier at the end of a class - declaration) - -2010-03-13 Daniel Marjamäki - - * tools/dmake.cpp: astyle formatting - -2010-03-13 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: gcc: removed -Wlogical-op that is not - supported by old GCC - -2010-03-13 Daniel Marjamäki - - * cppcheck.cbproj, testrunner.cbproj: Borland C++: Updated project - files - -2010-03-12 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Fixed - #1482 (Improve check const-function: function can be made const when - assignment not to member variable (false negative)) - -2010-03-12 Kimmo Varis - - * lib/filelister_unix.cpp: Fix ignoring filelister_unix.cpp code in - Windows. - -2010-03-12 Kimmo Varis - - * test/test.vcproj, test/testfilelister.cpp: Fix compiling tests. - -2010-03-12 Daniel Marjamäki - - * lib/filelister_win32.cpp: astyle formatting - -2010-03-11 Kimmo Varis - - * tools/Makefile, tools/dmake.cpp: Restore and fix tools Makefile. - Fix include lines. - -2010-03-11 Kimmo Varis - - * tools/dmake.cpp, tools/dmake.vcproj: Fix dmake for Windows. - -2010-03-01 Kimmo Varis - - * Makefile, lib/filelister_unix.cpp, lib/filelister_win32.cpp, - lib/lib.pri, tools/Makefile, tools/dmake.cpp: Fix compiling in - Linux. Fix compiling dmake. - -2010-02-28 Kimmo Varis - - * lib/filelister.cpp, lib/filelister.h, lib/filelister_unix.cpp, - lib/filelister_unix.h, lib/filelister_win32.cpp, - lib/filelister_win32.h: Add Unix/Linux version of FileLister and do - some cleanups. - -2010-02-28 Kimmo Varis - - * lib/filelister.cpp, lib/filelister.h, lib/filelister_win32.cpp: - Remove Win32 implementation from common file. - -2010-03-11 Kimmo Varis - - * cli/cppcheck.vcproj, gui/mainwindow.cpp, lib/checkheaders.cpp, - lib/cppcheck.cpp, lib/filelister.cpp, lib/filelister.h, - lib/filelister_win32.cpp, lib/filelister_win32.h, lib/lib.pri, - lib/preprocessor.cpp, lib/tokenize.cpp: Implement Win32 FileLister - as separate class. Improve the system used to have separate - versions of code of FileLister for Win32 and Linux. New idea is to - have Base FileLister class implementing common code and then derived - classes for Win32 and Linux specific code. FileLister is not anymore a static class. Instead we use singleton - of derived class. - -2010-03-10 Daniel Marjamäki - - * createrelease: Fixed #1489 (Makefile creates debug version) - -2010-03-10 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1488 - (Invalid warning about shadowed variable) - -2010-03-10 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Fixed - #1486 (--errorlist shows two identical id values) - -2010-03-09 Daniel Marjamäki - - * : commit 93f387cfffc20bd346bca77aad06ef4fe3ff69dd Author: Kimmo - Varis Date: Tue Mar 9 20:26:16 2010 +0200 - -2010-03-09 Daniel Marjamäki - - * : commit ba7655ef0760375ecdca844dcd7691e834130980 Author: Kimmo - Varis Date: Tue Mar 9 20:25:29 2010 +0200 - -2010-03-09 Kimmo Varis - - * : commit 4dd117db49143a2ded15c6588580fcdc26c05931 Author: Kimmo - Varis Date: Tue Mar 9 17:37:39 2010 +0200 - -2010-03-09 Daniel Marjamäki - - * Changelog, createrelease: Changelog: Updated - -2010-03-09 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, lib/cppcheck.cpp, - man/manual.docbook, win_installer/productInfo.wxi: updated version - to 1.42 - -2010-03-09 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: Add custom banner with - Cppcheck icon. - -2010-03-09 Kimmo Varis - - * : commit 04ff061bbb1c4d4d894196f9ebf52481d443a4ba Author: Daniel - Marjamäki Date: Tue Mar 9 12:41:40 2010 - +0100 - -2010-03-09 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: checkbufferoverrun: Refactorings - -2010-03-09 Daniel Marjamäki - - * Makefile, cli/cli.pro, tools/dmake.cpp: dmake,qmake: temporarily - removed -Wsign-conversion - -2010-03-09 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Revert "checkbufferoverrun: Fixed - signedness compiler warnings" This reverts commit 3123de346cd959244315a687c7c8adc89ae46488. This commit caused failed tests - -2010-03-09 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: checkbufferoverrun: Fixed signedness - compiler warnings - -2010-03-09 Daniel Marjamäki - - * createrelease: createrelease: set release mode for Makefile - -2010-03-09 Daniel Marjamäki - - * Makefile: Makefile: updated by latest dmake - -2010-03-09 Daniel Marjamäki - - * cli/cli.pro, tools/dmake.cpp: dmake, qmake: more sensitive - compiler and runtime - -2010-03-09 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: dmake: debug/release mode, more gcc - warnings - -2010-03-09 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Function - constness: I don't think it's necessary to show both definition and - implementation location. I changed so only the location of the - definition is shown. This fixes #1486. - -2010-03-08 Reijo Tomperi - - * lib/check.h: Fix #1485 (cppcheck.exe 1.41 crashes when calling - with option --errorlist) - http://sourceforge.net/apps/trac/cppcheck/ticket/1485 - -2010-03-08 Kimmo Varis - - * win_installer/cppcheck.wixproj, win_installer/readme.txt: - Installer: Put installer to Build folder and temp files to BuildTmp. - -2010-03-08 Kimmo Varis - - * win_installer/cli.wxs: Installer: remove unused file. - -2010-03-07 Reijo Tomperi - - * AUTHORS: Robert Reif added to AUTHORS file - -2010-03-07 Kimmo Varis - - * createrelease: Fix filepaths in release script. - -2010-03-07 Daniel Marjamäki - - * createrelease: 1.41: Updated version in 'createrelease' script - -2010-03-07 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, lib/cppcheck.cpp, - win_installer/productInfo.wxi: 1.41: Set version in files - -2010-03-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Simplify enum: - Fixed segmentation fault if code ends with enum type id - -2010-03-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1474 - (segmentation fault of cppcheck) - -2010-03-07 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1472 (false - positive: Data is allocated but not initialized: service) - -2010-03-06 Reijo Tomperi - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: Fix - #1469 (False positive: Resource leak when fclose() is inside while) - http://sourceforge.net/apps/trac/cppcheck/ticket/1469 - -2010-03-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1432 (false - positive: uninitialized variable) - -2010-03-06 Reijo Tomperi - - * lib/tokenize.cpp, test/testtokenize.cpp: Fix #1454 (False - positive: arrayindexoutofbounds, static member sharing local name) - http://sourceforge.net/apps/trac/cppcheck/ticket/1454 - -2010-03-05 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Fixed - #1321 (Improve check const-function: function that is not - implemented inline can be made const) - -2010-03-04 Kimmo Varis - - * tools/dmake.vcproj: Add VS project file for building dmake. - -2010-03-04 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1466 - (false positive: Invalid number of character ({) when these macros - are defined: '') - -2010-03-04 Daniel Marjamäki - - * lib/tokenize.cpp: simplify templates: show debug message when - bailout out - -2010-03-04 Daniel Marjamäki - - * lib/tokenize.cpp: SimplifyTemplates: some simple refactoring so - template name is properly seen. If it's not properly handled then - bailout. Related with #1464 - -2010-03-03 Reijo Tomperi - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Partial fix #1464 - (takes too long (days) to process some files) Fix template functions - that return "&T". - http://sourceforge.net/apps/trac/cppcheck/ticket/1464 - -2010-03-03 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: STL: don't warn about the - suspicious string::find condition because it's not always a bug - -2010-03-02 Reijo Tomperi - - * lib/tokenize.cpp: Add simple debug print to make it possible to - detect cases where template simplification goes wrong. - http://sourceforge.net/apps/trac/cppcheck/ticket/1464 - -2010-02-28 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Removed unused function - renameMacroVariables - -2010-02-28 Kimmo Varis - - * gui/translationhandler.cpp: Apply patch #1408 (gui build fails - with Qt-4.4.3: QLocale) Add missing QLocale include. Patch by barsnick. - -2010-02-28 Daniel Marjamäki - - * lib/checkstl.cpp: STL: refactorings - -2010-02-28 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/tokenize.cpp: cleanup: removed unused - variables - -2010-02-28 Daniel Marjamäki - - * lib/checkother.cpp, lib/tokenize.cpp, test/testother.cpp: null - pointer: Fixed better error message for 'possible null pointer' + - removed redundant check in our Tokenizer. - -2010-02-28 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: STL: suspicious condition when - using std::find - -2010-02-28 Daniel Marjamäki - - * lib/checkstl.cpp: STL if find: check given severity - -2010-02-27 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #1453 - (possible infinite loop processing GNU Go's engine/montecarlo.c) - http://sourceforge.net/apps/trac/cppcheck/ticket/1453 - -2010-02-27 Daniel Marjamäki - - * test/teststl.cpp: STL: suspicious conditions when using find. - Added ok testcases and assert that no error message is written - -2010-02-27 Daniel Marjamäki - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: STL: - suspicious condition when using find on strings and containers - -2010-02-27 Kimmo Varis - - * win_installer/config.wxi: Installer: Fix path to gui executable. - -2010-02-27 Kimmo Varis - - * gui/gui.pro: GUI: Remove tabs from project file. - -2010-02-27 Kimmo Varis - - * gui/gui.pro: GUI: Build to similar folders than cli in Windows. This makes it easier to handle build files and manage installer. - -2010-02-27 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1439 (false - positive: memory leak when using realloc) - -2010-02-27 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/tokenize.cpp: Refactoring error messages - -2010-02-27 Kimmo Varis - - * cli/cppcheck.vcproj: Resource compiler still got unnecessary - precompiler defines. - -2010-02-27 Kimmo Varis - - * win_installer/config.wxi: Installer: Fix cli executable path. - -2010-02-27 Kimmo Varis - - * cli/cppcheck.vcproj, test/test.vcproj: Move build products to - Build and BuildTmp folders. This avoids polluting source folders with created/temp files. Also - makes it easier for installer to pick files from consistently named - folders. - -2010-02-27 Kimmo Varis - - * cli/cppcheck.vcproj, test/test.vcproj: Projfiles: Fix preprocessor - definitions. - -2010-02-27 Kimmo Varis - - * test/test.vcproj: Projfiles: fix test project include paths. - -2010-02-27 Kimmo Varis - - * cli/cppcheck.vcproj: Projfiles: Fix include paths - remove - unneeded paths. - -2010-02-27 Kimmo Varis - - * cli/cppcheck.vcproj, test/test.vcproj: Projfiles: Use $IntDir and - $OutDir as paths where applicable. Try to also keep outdir clean of unnecessary files and direct most - of build- time files to intdir. - -2010-02-27 Daniel Marjamäki - - * lib/preprocessor.cpp: Fixed #1448 (Trying to check Unicode file - prints confusing error) - -2010-02-27 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1456 (PATCH: - Variable hides typedef with same name false positive) - -2010-02-26 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1397 (false - positive: Memory leak in while loop) - -2010-02-26 Reijo Tomperi - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fix #1455 - (Preprocessor: Wrong line number in "No pair for character" error) - http://sourceforge.net/apps/trac/cppcheck/ticket/1455 - -2010-02-26 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1456 (PATCH: - Variable hides typedef with same name false positive) - -2010-02-26 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1457 (PATCH: - Variable hides enumerator with same name false negative) - -2010-02-26 Kimmo Varis - - * lib/cppcheck.cpp: Fix comment. - -2010-02-25 Reijo Tomperi - - * test/testother.cpp: Add TODO test case for #1444 (inline - suppression suppress all errors of the same type in a function) - http://sourceforge.net/apps/trac/cppcheck/ticket/1444 - -2010-02-25 Reijo Tomperi - - * test/testtokenize.cpp: Add TODO test cases for #1454 (False - positive: arrayindexoutofbounds, static member sharing local name) - http://sourceforge.net/apps/trac/cppcheck/ticket/1454 - -2010-02-25 Reijo Tomperi - - * test/testtokenize.cpp: Cleanup test/testtokenize.cpp a bit by - putting duplicate code into a function. - -2010-02-25 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1452 - (Simplify goto better) - -2010-02-25 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1451 (false - positive: operator = should return reference to self) - -2010-02-25 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1445 - (segfault in Tokenizer::simplifyRedundantParanthesis()) - -2010-02-24 Reijo Tomperi - - * test/testsimplifytokens.cpp, tools/dmake.cpp: Add TODO test case - for #1452 (Simplify goto better) - http://sourceforge.net/apps/trac/cppcheck/ticket/1452 - -2010-02-24 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1449 - (segmentation fault of cppcheck) - -2010-02-23 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1434 (### - Internal error in Cppcheck. Please report it.) - -2010-02-23 Daniel Marjamäki - - * : commit 5254822bedb2d18341542fc1947dd2768fbbf068 Author: Daniel - Marjamäki Date: Tue Feb 23 21:27:01 2010 - +0100 - -2010-02-23 Reijo Tomperi - - * lib/preprocessor.cpp: Attempt to fix: #1425: -I doesn't work - properly in Windows - http://sourceforge.net/apps/trac/cppcheck/ticket/1425 - -2010-02-23 Daniel Marjamäki - - * cli/CMakeLists.txt, test/CMakeLists.txt: removed some more cmake - files - -2010-02-23 Daniel Marjamäki - - * tools/Makefile: tools/Makefile: fixed so the dmake can be built - -2010-02-23 Daniel Marjamäki - - * Makefile: Makefile: Readded old Makefile again - -2010-02-23 Daniel Marjamäki - - * tools/dmake.cpp: Readded man/install to the Makefile - -2010-02-23 Daniel Marjamäki - - * readme.txt: readme: removed cmake/scons - -2010-02-23 Daniel Marjamäki - - * : commit 8e58cfcd3229b4dca94795f9215bea3a76be5c7d Author: Daniel - Marjamäki Date: Tue Feb 23 18:14:33 2010 - +0100 - -2010-02-23 Kimmo Varis - - * gui/mainwindow.cpp: Fix GUI compile error on Linux. - -2010-02-23 Kimmo Varis - - * gui/CMakeLists.txt: Add htmlhelp lib to GUI's CMake file. - -2010-02-23 Kimmo Varis - - * win_installer/cppcheck.wxs: Update MSI installer to install - HtmlHelp manual. - -2010-02-23 Kimmo Varis - - * gui/mainwindow.h: Remove some excessive empty lines. - -2010-02-23 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_nl.ts, gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, - gui/cppcheck_se.ts: Update translation files. - -2010-02-23 Kimmo Varis - - * gui/gui.pro, gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h: - Open HTML help from Help-menu in Windows. - -2010-02-23 Kimmo Varis - - * gui/mainwindow.cpp: Remove some excessive empty lines. - -2010-02-22 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1442 (false - positive: getting offset instead of dereferencing a null pointer) - -2010-02-21 Kimmo Varis - - * readme.txt: Fix mixed EOL styles in readme.txt. Use LF for now. - -2010-02-21 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - lib/checkclass.cpp, test/testbufferoverrun.cpp, test/testclass.cpp: - Fixed #1409 (False positive: Buffer access out-of-bounds with - strncpy and an array in typedef'ed struct) - -2010-02-21 Daniel Marjamäki - - * readme.txt: readme: removed 'dmake' information - -2010-02-21 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1426 (false - positive: returning LPVOID can be const) - -2010-02-21 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: Fixed - #1396 (false positive: Resource leak) - -2010-02-21 Daniel Marjamäki - - * lib/checkother.cpp: Fixed #1430 (void foo(int nb)) - -2010-02-21 Daniel Marjamäki - - * lib/checkother.cpp: Refactored the - CheckOther::functionVariableUsage - -2010-02-20 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: - Tokenizer: simple simplification of array sizes - -2010-02-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1395 (false - positive: Possible null pointer dereference) - -2010-02-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1424 (false - positive: unintialized variable) - -2010-02-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1422 (false - positive: uninitialized variable) - -2010-02-20 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1407 (false - positive memory leak when returning pointer to the allocated memory) - -2010-02-20 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1403 (false - positive: The function can be const) - -2010-02-20 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1402 (false - positive: uninitialized variable) - -2010-02-20 Daniel Marjamäki - - * tools/dmake.cpp: astyle formatting - -2010-02-20 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #1427 (new check: check for typedef name hiding) - -2010-02-20 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/tokenize.cpp: Borland C++: Fixed - compiler errors (operands must be same type) - -2010-02-19 Reijo Tomperi - - * SConstruct: SConstruct, fix compiling on systems where qt4 is not - installed - -2010-02-19 Reijo Tomperi - - * SConstruct: Add: 'scons ccwin32' - Cross compile win32 (cli) - in Linux - -2010-02-19 Daniel Marjamäki - - * tools/dmake.cpp: dmake: simplified a little - -2010-02-19 Daniel Marjamäki - - * readme.txt: updated readme.txt - -2010-02-19 Reijo Tomperi - - * SConstruct: SConstruct updated, help target added. Use 'scons -h' - to see help - -2010-02-19 Reijo Tomperi - - * SConstruct: SConstruct update: Add coverage-target and add more - gcc compiler flags - -2010-02-19 Daniel Marjamäki - - * lib/mathlib.cpp: Refactoring: Using string::compare instead of - strncmp - -2010-02-19 Daniel Marjamäki - - * gui/test.cpp, test/test.cxx: renamed gui/test.cpp to test/test.cxx - -2010-02-18 Reijo Tomperi - - * SConstruct, qt4.py: Add SConstruct and qt4.py for alternative - build system - -2010-02-18 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp: Refactoring CheckBufferOverrun. Use - std::string instead of const char * - -2010-02-18 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testunusedvar.cpp: - astyle formatting - -2010-02-18 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp, - test/testunusedvar.cpp: readded checks for unused variables and - unreachable code that were removed in - 42c608b6f085693f9bc80bf9be9a3570f0a5bf87 - -2010-02-18 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1411 (### - Internal error in Cppcheck. Please report it.) - -2010-02-17 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1405 (false - positive: operator = should return reference t - -2010-02-17 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1405 (false - positive: operator = should return reference to itself) - -2010-02-17 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1389 (false - positive: uninitialized variable) - -2010-02-16 Moritz Barsnick - - * gui/main.ui: Fixed #1334 (gui build fails) - -2010-02-16 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #1388 (enum token/template parameter confusion - False - positive) - -2010-02-15 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #1392 - (Segfault in CheckBufferOverrun::checkScope) - http://sourceforge.net/apps/trac/cppcheck/ticket/1392 - -2010-02-14 Monika Lukow - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1333 (Detect access out of bounds 'for (i = 100; i > 0; --i) a[i] = - 0;') - -2010-02-14 Reijo Tomperi - - * lib/preprocessor.cpp: Remove unnecessary file open. - -2010-02-14 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, lib/checkclass.h: astyle fix - -2010-02-14 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - lib/checkclass.cpp, lib/checkclass.h, lib/checkheaders.cpp, - lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, lib/checkother.cpp, - lib/checkother.h, lib/checkunusedfunctions.cpp, lib/filelister.cpp, - lib/filelister.h, lib/settings.cpp, lib/settings.h, lib/token.cpp, - lib/token.h, lib/tokenize.cpp, lib/tokenize.h: Refactoring: Use - std::string instead of const char * - -2010-02-14 Daniel Marjamäki - - * cli/CMakeLists.txt: Output the cppcheck program in the base folder - -2010-02-14 Daniel Marjamäki - - * Makefile: Removed old Makefile - we'll use CMake from now on - -2010-02-12 Reijo Tomperi - - * lib/token.cpp, lib/token.h: Added %name% pattern to Token. - Currenly same as %var%, but in the future %var% is supposed to match - only tokens that have varid != 0. - -2010-02-12 Reijo Tomperi - - * lib/tokenize.h: Fix operator= warning from our own code. - -2010-02-12 Reijo Tomperi - - * lib/checkother.cpp, lib/tokenize.cpp, test/testdivision.cpp: Fix - #1385 (False positive: unsigned division) - http://sourceforge.net/apps/trac/cppcheck/ticket/1385 This also - fixes a bug in setVarId(). "unsigned int a" didn't get varid, untill - later when unsigned was simplified away. - -2010-02-12 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1382 - (False positive: uninitialized variable when using assembly to - initialize variable) - -2010-02-10 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #1340 - (False positive: Array out of bounds for re-initialised array - pointer) http://sourceforge.net/apps/trac/cppcheck/ticket/1340 - -2010-02-10 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1376 (Member - variable not initialized in the constructor false positive) - -2010-02-09 Reijo Tomperi - - * lib/filelister.cpp, lib/preprocessor.cpp, test/testfilelister.cpp: - Possibly fix #1369 (Internal error - double-declared enum followed - by another enum) - http://sourceforge.net/apps/trac/cppcheck/ticket/1369 Don't include - same file twice if one is a/a.h and other is a/../a/a.h - -2010-02-09 Daniel Marjamäki - - * test/teststl.cpp: Fixed #1373 (###### If you see this, there is a - bug ######) - -2010-02-09 Reijo Tomperi - - * lib/tokenize.cpp, test/testtokenize.cpp: Fix #1366 (void - Tokenizer::simplifyTemplates() --> Abort) - http://sourceforge.net/apps/trac/cppcheck/ticket/1366 - -2010-02-08 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Fixed #1364 (False positive: (error) Possible - null pointer dereference) - -2010-02-08 Daniel Marjamäki - - * lib/executionpath.cpp: Fixed #1360 (false positive:: uninitialized - class member of nested class inside a function) - -2010-02-08 Reijo Tomperi - - * test/testother.cpp: astyle fix - -2010-02-08 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1344 (false - negative: missing const not found) - -2010-02-07 Monika Lukow - - * lib/checkother.cpp, test/testother.cpp: Fixed #1094 (Improve - check: unusual pointer arithmetic: 'ch+str') - -2010-02-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1361 (### Internal - error in Cppcheck. Please report it) - -2010-02-07 Daniel Marjamäki - - * lib/checkclass.cpp, lib/token.cpp, lib/tokenize.cpp, - test/testtokenize.cpp: Fixed #1356 (Double-False positive: - uninitialized variable) - -2010-02-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Fixed bug in - setVarId. functions should never have a variable id - -2010-02-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1362 - (Internal error when using ?-operator and nested {}) - -2010-02-06 Daniel Marjamäki - - * lib/tokenize.cpp: astyle formatting - -2010-02-06 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1346 (False - positive: Memory leak when allocated memory is stored elsewhere - inside a condition) - -2010-02-06 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1363 (false - positive: memory leak) - -2010-02-06 Daniel Marjamäki - - * lib/cppcheck.cpp: Fixed #824 (Exit code of cppcheck) - -2010-02-06 Daniel Marjamäki - - * lib/checkstl.cpp: fixed null pointer dereference when using - --errorlist - -2010-02-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1352 (false - positive: uninitialized variable) - -2010-02-06 Daniel Marjamäki - - * lib/checkstl.cpp: Borland C++: Fixed compiler error. When using - 'a?b:c', Borland C++ requires that 'b' and 'c' has the same types - -2010-02-06 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1355 (Fixed - enum bug when expression contain comma) - -2010-02-06 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Partial fix for - #322 (get configurations from headers that don't start at the - beginning of the file) - -2010-02-06 Reijo Tomperi - - * test/testtokenize.cpp: Minor fix to previous commit - -2010-02-06 Reijo Tomperi - - * test/testtokenize.cpp: Test case for #1356 (Double-False positive: - uninitialized variable) - -2010-02-05 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #1358 - (False negative: out-of-bounds not found near return) - http://sourceforge.net/apps/trac/cppcheck/ticket/1358 - -2010-02-05 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #984 (improve output if strncpy is followed by strncat) - -2010-02-05 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1351 (add - expression support to simplifyEnum) - -2010-02-04 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: CheckClass::noMemset: - Refactoring so it handles more complex std template types - -2010-02-04 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Class checking: Minor - refactoring when analysing memset on class - -2010-02-04 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1287 (Use of memset - on struct - std template types not handled) - -2010-02-03 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1337 - (Division by zero with __alignof__()) - -2010-02-03 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1345 (Not - initialised variables warning missing in classes with dllexport) - -2010-02-03 Daniel Marjamäki - - * lib/checkunusedfunctions.cpp, test/testunusedfunctions.cpp: Fixed - #1342 (Superclass constructors in initializer lists are considered - unused functions when superclass has a namespace.) - -2010-02-03 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1343 - (simplifyTypedef doesn't support deeply nested classes) - -2010-02-02 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1341 (false - positive 'uninitialized variable' when using Exception - specifications) - -2010-02-01 Kimmo Varis - - * man/CMakeLists.txt: CMake - build htmlhelp manual in Cygwin. I want to build htmlhelp manual for Windows with Cygwin. This is the - easiest way to create "native" manual for Windows users. - -2010-02-01 Kimmo Varis - - * man/CMakeLists.txt: CMake - build HTML manual in Cygwin. Latest update to Cygwin made possible to build HTML manual also in - the Cygwin. Requires latest version 4.5 of DocBook XML. - -2010-02-01 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1339 (add - nested struct support to simplifyEnum and simplifyTypedef) - -2010-02-01 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Reverted - 4f30468c80e954c8f91e95052d777caf31a01e58. There was false positives - such as #1335 so please fix them and then re-commit. - -2010-02-01 Kimmo Varis - - * gui/checkthread.cpp: GUI part of ticket #1068 (GUI: stop or quit - when processing a large file). - -2010-02-01 Kimmo Varis - - * test/CMakeLists.txt: CMake - fix building tests for Visual Studio. Need to include lib sources directly to test project also. - -2010-01-31 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1338 - (simplify typedefs with global and nested namespace) - -2010-01-31 Reijo Tomperi - - * test/testbufferoverrun.cpp: Added test case for #1333 (Detect - access out of bounds 'for (i = 100; i > 0; --i) a[i] = 0;') - http://sourceforge.net/apps/trac/cppcheck/ticket/1333 - -2010-01-31 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #1004 (improve check: Unintialized variable not detected when - using a reference (&)) - -2010-01-31 Monika Lukow - - * : commit 25822dff2462d00e7293fbc0793b8e3994acb1a4 Author: Monika - Lukow Date: Sun Jan 31 11:44:30 2010 +0100 - -2010-01-31 Monika Lukow - - * lib/checkbufferoverrun.cpp: Fixed #1274 (false positive: Dangerous - usage of strncat) - -2010-01-31 Monika Lukow - - * lib/checkother.cpp, test/testother.cpp: Fixed #1094 (Improve - check: unusual pointer arithmetic: 'ch+str') - -2010-01-31 Kimmo Varis - - * CMakeLists.txt, cli/CMakeLists.txt, gui/CMakeLists.txt: Make - workaround fix for ticket #1299. Since lib does not work when built as an static library, compile lib - code as part of cli/gui code. - -2010-01-31 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Tokenizer: remove redundant assignments and - variables - -2010-01-31 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Tokenizer: Remove redundant assignments and - variables - -2010-01-31 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: remove - the keyword 'inline' - -2010-01-31 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: fix for - multiple array definitions for a single typedef - -2010-01-31 Robert Reif - - * lib/tokenize.cpp: Fixed #1326 (remove simplified enum definitions) - -2010-01-30 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1331 - (simplify typedef of complex arrays) - -2010-01-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Null pointer dereference: - sending to output stream - -2010-01-30 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: improved - the simplifyInitVar - -2010-01-30 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Fixed #1005 (improve check: nullpointer - dereference not found when it is initialized with NULL-cast) - -2010-01-30 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed 1329 - (simplify typedef of function pointer returning template) - -2010-01-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1327 (False - positive: Redundant code: Found a statement that begins with numeric - constant) - -2010-01-29 Reijo Tomperi - - * lib/checkclass.cpp: Remove debug print - -2010-01-29 Reijo Tomperi - - * cppcheck.cbp, lib/checkclass.cpp, lib/checkmemoryleak.cpp, - lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: Improved - updateClassList(), but not yet took it into use. findClassFunction - is now non-static. updateClassList usage is currently commented out - as it doesn't handle class inside a function - -2010-01-29 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1319 (false - negative: missing const not found) - -2010-01-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Fixed const - simplification - -2010-01-29 Robert Reif - - * test/testsuite.cpp, test/testsuite.h: Fixed #1324 (show number of - tests that don't produce the desired results) - -2010-01-29 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1323 (segfault with - style in CheckClass::operatorEqRetRefThis()) - -2010-01-29 Robert Reif - - * lib/preprocessor.cpp, lib/tokenize.cpp: Fixed #1325 (Segmentation - fault in simplifyTypedef due to bad preprocessing) - -2010-01-29 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1326 (remove - simplified enum definitions) - -2010-01-27 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1286 (Memory - leak not detected) - -2010-01-27 Daniel Marjamäki - - * lib/cppcheck.cpp: killerbot: Fixed #1314 (specify the files to - check in 1 input file) - -2010-01-27 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #1315 (mismatched allocation and - deallocaton not detected) - -2010-01-27 Daniel Marjamäki - - * lib/checkclass.h, lib/checkstl.h: updated --doc output about new - checks in 1.40 - -2010-01-27 Daniel Marjamäki - - * lib/checkautovariables.cpp, lib/checkautovariables.h, - test/testautovariables.cpp: Auto variables: Improved handling of - temporaries - -2010-01-27 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1316 (### - Internal error in Cppcheck. Please report it.) - -2010-01-26 Daniel Marjamäki - - * lib/checkautovariables.cpp, lib/checkautovariables.h, - test/testautovariables.cpp: Auto variables: returning pointer to - temporary .c_str() data - -2010-01-26 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1302 (False - positive: Confusion between POSIX open() and class member) - -2010-01-26 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #1278 (Confusing style - message formatting) - -2010-01-26 Kimmo Varis - - * CMakeLists.txt, gui/CMakeLists.txt: CMake - Build GUI also in - Cygwin if QT4 is found. - -2010-01-25 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1312 (false - positive: missing const message on functions returning references) - -2010-01-25 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1313 - (unnamed enums not simplified properly) - -2010-01-24 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1307 - (Internal error with typedef in parameter list) - -2010-01-24 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: some - refactorings and minor improvements - -2010-01-24 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1238 (False - Negative : memory leak with template class) - -2010-01-24 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Fixed - Tokenizer::simplifyKnownVariable bug when the variable is - re-assigned in a loop - -2010-01-24 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1308 (False - positive: The function 'x' can be const for a static member - function) - -2010-01-24 Daniel Marjamäki - - * test/testother.cpp: TestOther::uninitvar1: refactoring. splitting - up this function into multiple functions - -2010-01-24 Daniel Marjamäki - - * lib/checkclass.cpp: const class functions: refactorings - -2010-01-24 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: const: fixed false - positive when using increment/decrement - -2010-01-23 Reijo Tomperi - - * lib/preprocessor.cpp, lib/tokenize.cpp, lib/tokenize.h: Fix some - style errors found from our own code. - -2010-01-23 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: CheckClass: The operator< - etc member functions can often be const - -2010-01-23 Reijo Tomperi - - * lib/cppcheck.cpp, lib/tokenize.cpp, lib/tokenize.h, - test/teststl.cpp, test/testtokenize.cpp: Fix #1279 (Change error - message: Invalid number of character ({). Can't process file.) - http://sourceforge.net/apps/trac/cppcheck/ticket/1279 - -2010-01-23 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: STL: fixed false positive when - using erase - -2010-01-23 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1301 (False - positive: Data is allocated but not initialized) - -2010-01-23 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1305 (False - positive: The function 'x' can be const when indirectly calling a - non-const member) - -2010-01-23 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1304 (False - positive: The function 'x' can be const when modifing a member) - -2010-01-23 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1303 (False - positive: The function 'x' can be const for a constructor) - -2010-01-23 Daniel Marjamäki - - * lib/checkautovariables.cpp, lib/checkautovariables.h, - test/testautovariables.cpp: New Check: Detect return of invalid - reference - -2010-01-23 Duraffort - - * gui/CMakeLists.txt: Do not build the gui if Qt4 headers are not - present. - -2010-01-23 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: Revert "removed tools/dmake and - Makefile. Please use cmake from now on." This reverts commit cfacd5fe1014d3fac2cf617f9f9a32ad5c92f561. - -2010-01-23 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: only run - CheckClass::checkConst if style checking is on - -2010-01-23 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Partial - fix for #13 - detect simple cases of member functions that can be - const - -2010-01-23 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: detect when function - pointer that is null is used - -2010-01-23 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Report when using - uninitialized function pointer - -2010-01-23 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Function pointers: - re-enabled the simplifyFunctionPointers - -2010-01-22 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: removed tools/dmake and Makefile. - Please use cmake from now on. - -2010-01-22 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1298 - ((error) ### Internal error in Cppcheck. Please report it. (typedef - in fun proto)) - -2010-01-22 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #1276 (False Uninitialized variable when using goto) - -2010-01-22 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h, lib/checkstl.h: doxygen and - minor refactorings - -2010-01-22 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #643 (Member - variable not initialized not detected if any unknown function - called) - -2010-01-22 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1297 - (typedef causes internal error in vlc/modules/access/imem.c) - -2010-01-21 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1290 (1.40: - Internal error) - -2010-01-21 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1273 (scope of - variable limited not detected in latest versions) - -2010-01-21 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: This patch - simplifies the function pointer return type code and allows more - complex return types. - -2010-01-21 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Improved typedef - simplification of function pointers - -2010-01-20 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1293 (Things - to add to call_func_white_list) - -2010-01-20 Daniel Marjamäki - - * : commit 96359b14ffb8580939a91e57bdc4e4e74b71ee51 Author: Daniel - Marjamäki Date: Wed Jan 20 21:19:06 2010 - +0100 - -2010-01-20 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Handle/simplify - function pointer typedefs - -2010-01-20 Reijo Tomperi - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fix #1296 (false - positive: index out of bounds) - http://sourceforge.net/apps/trac/cppcheck/ticket/1296 - -2010-01-19 Reijo Tomperi - - * cppcheck.cbp: Updated cppcheck.cbp project file. Fixes #1292 - (cppcheck.cbp needs an update (V1.40)) - http://sourceforge.net/apps/trac/cppcheck/ticket/1292 - -2010-01-19 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1282 (False - positive for a memory leak in a simple loop) - -2010-01-18 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: CheckMemoryLeak: - Added 'scanf' and 'sscanf' to the whitelist - -2010-01-18 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #1266 ('qsort' missing in - call_func_white_list) - -2010-01-18 Daniel Marjamäki - - * lib/cppcheck.cpp, lib/cppcheck.h, lib/settings.cpp, - lib/settings.h: Added Cppcheck::terminate function that will - terminate the checking ASAP - -2010-01-18 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1251 - (tokenize typedef of reference) - -2010-01-17 Kimmo Varis - - * win_installer/config.wxi, win_installer/cppcheck.wxs: Installer: - Add config variable for pdf manual path. - -2010-01-17 Kimmo Varis - - * : commit 2581c9fa9fc8974ccd150f3a4b05e89d592b6bff Author: Kimmo - Varis Date: Sun Jan 17 20:41:26 2010 +0200 - -2010-01-17 Kimmo Varis - - * win_installer/readme.txt, win_installer/readme_InnoSetup.txt: - Installer: Create short documentation for WiX installer. - -2010-01-17 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: Path variable for gui.exe - was missing in one place. - -2010-01-17 Kimmo Varis - - * win_installer/config.wxi, win_installer/cppcheck.wxs, - win_installer/productInfo.wxi: Installer: Move installer - configuration to new file. - -2010-01-17 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1262 (cppcheck - false positives: 'Possible null pointer dereference', 'Uninitialized - variable') - -2010-01-17 Daniel Marjamäki - - * lib/tokenize.h: Fixed doxygen error messages - -2010-01-17 Daniel Marjamäki - - * lib/checkautovariables.h, lib/checkclass.h, - lib/checkdangerousfunctions.h, lib/checkexceptionsafety.h, - lib/checkother.h, lib/checkstl.h: Reformatting the --doc output to - work better in the wiki - -2010-01-17 Daniel Marjamäki - - * man/manual.docbook: manual: updated version to 1.40 - -2010-01-17 Daniel Marjamäki - - * Changelog: updated Changelog - -2010-01-17 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, createrelease, lib/cppcheck.cpp, - win_installer/productInfo.wxi: Updated version to 1.40 - -2010-01-17 Daniel Marjamäki - - * test/testsimplifytokens.cpp: Added TODO test for better pointer - aliasing with memset - -2010-01-17 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1275 - (Cppcheck hangs when analysing the code 'typedef struct { } A, *B, - **C;') - -2010-01-17 Kimmo Varis - - * : commit 97eb380bba8deeb480d035e606157d610db98379 Author: Kimmo - Varis Date: Sun Jan 17 01:21:45 2010 +0200 - -2010-01-17 Kimmo Varis - - * win_installer/cppcheck.wxs: Installer: Update package version to - 300 to use latest installer version. - -2010-01-17 Kimmo Varis - - * win_installer/cppcheck.wxs, win_installer/productInfo.wxi: - Installer: Add variable for Qt dll location. - -2010-01-17 Kimmo Varis - - * win_installer/cppcheck.wixproj, win_installer/cppcheck.wxs, - win_installer/productInfo.wxi: Install MS CRT runtimes. Add VS2008 CRT merge module to the installer. This is the correct - way to install MS runtimes. - -2010-01-17 Kimmo Varis - - * win_installer/cli.wxs, win_installer/cppcheck.wixproj, - win_installer/cppcheck.wxs, win_installer/productInfo.wxi: - Installer: Add project file. Project file allows building installer with msbuild. Add config - variables for binaries directories to avoid copying binaries to - installer directory. - -2010-01-16 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1272 (links - in typedef not handled correctly) - -2010-01-16 Daniel Marjamäki - - * : commit 0a8ca1f160bf635f63e4e7d936a65fac995af779 Author: Daniel - Marjamäki Date: Sat Jan 16 13:56:57 2010 - +0100 - -2010-01-16 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Refactoring the handling of typedefs - -2010-01-16 Daniel Marjamäki - - * cppcheck.cbproj, lib/checkclass.cpp, lib/checkclass.h: Revert - "minor tweak in Borland C++ project file" This reverts commit ad06ee4f71698fcd67d2d42d27c8117ff1ecc234. - -2010-01-16 Daniel Marjamäki - - * cppcheck.cbproj, lib/checkclass.cpp, lib/checkclass.h: minor tweak - in Borland C++ project file - -2010-01-15 Reijo Tomperi - - * lib/tokenize.cpp, test/testtokenize.cpp: Fix part of #1262 - (cppcheck false positives: 'Possible null pointer dereference' - http://sourceforge.net/apps/trac/cppcheck/ticket/1262 - -2010-01-14 Daniel Marjamäki - - * lib/preprocessor.cpp: refactoring - -2010-01-14 Daniel Marjamäki - - * lib/filelister.cpp, lib/preprocessor.cpp: astyle formatting - -2010-01-14 Daniel Marjamäki - - * cli/threadexecutor.cpp, cli/threadexecutor.h: lanurmi: Fixed - threads handling when using Sun compiler - -2010-01-14 Daniel Marjamäki - - * lib/filelister.cpp, lib/filelister.h, lib/preprocessor.cpp: - lanurmi: Fixed #1269 (Changes required for compiling with Sun's - compiler) - -2010-01-14 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1264 (False - positive: Resource leak with if-else in while) - -2010-01-14 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1268 (Null pointer - dereference false positive) - -2010-01-14 Henrik Nilsson - - * htmlreport/cppcheck-htmlreport: cppcheck-htmlreport now takes a - parameter for source code encoding to support non ascii characters. Also present a nicer error message if highlighting fail for a file. - -2010-01-13 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h: wrote comments about the - preprocessor - -2010-01-13 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1265 ((error) - Uninitialized variable on macro expansion) - -2010-01-13 Henrik Nilsson - - * htmlreport/cppcheck-htmlreport: cppcheck-htmlreport now takes a - --title parameter that will be displayed on top of every page. - -2010-01-13 Henrik Nilsson - - * htmlreport/cppcheck-htmlreport: Added !DOCTYPE declaration for - html generated by the cppcheck-htmlreport tool. - -2010-01-13 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: fixed - typedef issues - -2010-01-12 Daniel Marjamäki - - * lib/checkother.cpp: Uninitialized variables: disable subfunction - analysis if multiple threads are used - -2010-01-12 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: CheckMemoryLeaks: Added 'strlen' to white - list - -2010-01-12 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Fixed #1258 ('fscanf' missing in - call_func_white_list) - -2010-01-12 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1259 (false - postive: Member variable 'A::b' is not assigned a value in - 'A::operator=') - -2010-01-12 Henrik Nilsson - - * htmlreport/cppcheck-htmlreport: cppcheck-htmlreport now annotates - the highlighted source code with the cppcheck error message. - -2010-01-12 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Tokenizer: some cleanup of std:: - -2010-01-12 Henrik Nilsson - - * htmlreport/cppcheck-htmlreport: Fixed some markup errors in - generated html from the cppcheck-htmlreport script. - -2010-01-12 Reijo Tomperi - - * test/testtoken.cpp: Get rid of casting in test file. - http://sourceforge.net/apps/trac/cppcheck/ticket/1242 - -2010-01-12 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1070 (Improve scope - error message) - -2010-01-12 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1257 - (potential leaks not reported becauseof 'continue' in loop) - -2010-01-12 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1252 - (Internal error in Cppcheck while parsing struct) - -2010-01-11 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1250 - (tokenize typedef of union) - -2010-01-11 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #1174 (improve check: Unintialized variable not detected in - subfunction) - -2010-01-11 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/tokenize.cpp, - test/testbufferoverrun.cpp: BufferOverrun: negative index is out of - bounds - -2010-01-11 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Uninitialized variables: - fixed false positives when using pointer aliasing - -2010-01-11 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1248 - (tokenize typedef of array) - -2010-01-10 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: ExecutionPath: better - handling of for/while/do/switch, it doesn't bail out everything - -2010-01-10 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1225 (false - negative :: uninitialized variable not detected when using enums) - -2010-01-10 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: fixed unlogged - errors from the tokenizer and also some errors reported by valgrind - -2010-01-10 Daniel Marjamäki - - * test/testtoken.cpp: ivoire: 64-bit portability fix - -2010-01-10 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: - better handling of loops and switch - -2010-01-10 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1220 (False - memory leak when using while) - -2010-01-10 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - Better handling of switch - -2010-01-10 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1218 (Improve - check: incrementing uninitialized variable i++) - -2010-01-10 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1244 - (tokenize typedef of unnamed struct) - -2010-01-09 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1189 (false - negative: using uninitialized variable i 'a[i] = 0;') - -2010-01-09 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1231 - (Preprocessor: Fail to evaluate '#if ! defined _ABCD_') - -2010-01-09 Kimmo Varis - - * build.bat: Add "all" target for build.bat. - -2010-01-09 Kimmo Varis - - * build.bat: Make release the default target in build.bat. - -2010-01-09 Kimmo Varis - - * build.bat: Allow building both debug and release targets using - build.bat. - -2010-01-09 Kimmo Varis - - * build.bat: Improve build.bat to support building from QT prompt. - -2010-01-09 Kimmo Varis - - * build.bat: Fix build.bat after directory renames. - -2010-01-09 Kimmo Varis - - * win_installer/build2.bat: Update build2.bat to point to latest Qt - SDK. - -2010-01-09 Daniel Marjamäki - - * lib/tokenize.cpp: Borland C++: Fixed compiler error - -2010-01-08 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: fixed segmentation - fault - -2010-01-08 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1237 - (Uninitialized variable false positive for return-value pattern in - pan source code.) - -2010-01-08 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1233 (false - positive: operator = should check for assignment to self) - -2010-01-07 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1235 - (CheckMemoryLeakInFunction: Wrong handling of 'fcloseall') - -2010-01-07 Kimmo Varis - - * win_installer/build1.bat: Update batch file for latest Qt SDK - location. - -2010-01-07 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1232 - (segmentation fault of cppcheck when scanning templates) - -2010-01-06 Daniel Marjamäki - - * lib/tokenize.cpp: After suggestion from Jim Vollner, remove dead - pointers from the used list - -2010-01-06 Daniel Marjamäki - - * lib/token.cpp, lib/tokenize.cpp: uncomment validation of - Tokenizer::_tokensBack - -2010-01-06 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkmemoryleak.cpp, - lib/token.cpp, lib/token.h, lib/tokenize.cpp, - test/testbufferoverrun.cpp, test/testsimplifytokens.cpp, - test/testtoken.cpp: Ticket #1228 : Handle tokensBack in the Token - class. When adding&removing tokens the Token class can make sure - that this pointer is updated accordingly. It is very important that - the tokensBack has the same scope as the token list, otherwise there - will be a dead pointer problem. - -2010-01-06 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1221 ([False - positive] Member variable not initialized with operator[] gives - wrong result) - -2010-01-06 Kimmo Varis - - * CMake/xmlto.cmake, CMakeLists.txt, man/CMakeLists.txt: CMake - - build Docbook manual in Linux. Add XMLTO macro to build Docbook manual using xmlto program. xmlto - is not available in Windows so limit building to Linux. Adds new target "html" to build which is not run automatically. - -2010-01-06 Kimmo Varis - - * gui/mainwindow.cpp: Fixed #1229 (GUI: project file not read when - checking a file) - -2010-01-06 Kimmo Varis - - * gui/mainwindow.cpp: Fixed #1226 (GUI: project include file - relative path search problem) Thanks for Robert Reif for finding and reporting problem in previous - commit. - -2010-01-06 Kimmo Varis - - * : commit 5bb3c5898bf87a5aed5e3f775daf7c70fe9fe20c Author: Kimmo - Varis Date: Wed Jan 6 01:40:26 2010 +0200 - -2010-01-06 Reijo Tomperi - - * lib/tokenize.cpp: Added more validating code to tokenizer. - Currently commented out. - -2010-01-06 Kimmo Varis - - * gui/gui.cppcheck: Add lib directory to gui "project file" include. - -2010-01-05 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1224 (segmentation - fault of cppcheck) - -2010-01-05 Kimmo Varis - - * test/CMakeLists.txt: CMake - Include test project's header file to - VS IDE project. - -2010-01-05 Kimmo Varis - - * CMakeLists.txt: CMake - Include test project when creating VS IDE - project. - -2010-01-04 Robert Reif - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #1215 (are enums processed properly?) - -2010-01-03 Kimmo Varis - - * cli/CMakeLists.txt: CMake - add header files to CLI project and VS - project. - -2010-01-03 Kimmo Varis - - * lib/CMakeLists.txt: CMake - add header files to lib project (and - to VS project). - -2010-01-03 Kimmo Varis - - * gui/CMakeLists.txt: CMake - Create folders for GUI files in Visual - Studio IDE. - -2010-01-03 Kimmo Varis - - * : commit b483221f4534938ef1849d6eefa5b28c4924c952 Author: Kimmo - Varis Date: Sun Jan 3 19:50:04 2010 +0200 - -2010-01-03 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1023 (improve - check: Unintialized variable not detected when using +=) - -2010-01-03 Daniel Marjamäki - - * test/testbufferoverrun.cpp: refactoring - -2010-01-03 Daniel Marjamäki - - * test/testbufferoverrun.cpp: added test case for #1193 (false - negative: array out of bounds in loop when there is calculation) - -2010-01-03 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1216 (false - positive: uninitialized variable when using exit|abort) - -2010-01-03 Daniel Marjamäki - - * lib/checkother.cpp, lib/executionpath.cpp, test/testother.cpp: - Fixed #440 (NULL referencing not detected) - -2010-01-03 Daniel Marjamäki - - * gui/mainwindow.cpp: Fixed #1187 (GUI: fix project file loading) - -2010-01-03 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1184 (improve test: - operator =) - -2010-01-03 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1214 (false - positive: uninitialized variable 'bool fixed = - std::ios_base::fixed;') - -2010-01-02 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1203 - (Preprocessor: Doesn't handle macros usage that contain ';') - -2010-01-02 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1209 (False - positive: uninitialized variable c when it is initialized with - 'ab(sizeof(xyz), &c)') - -2010-01-02 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, lib/tokenize.cpp, - lib/tokenize.h, test/testconstructors.cpp, test/testtokenize.cpp: - Fixed #1211 (add struct support for constructor checks) - -2010-01-02 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1202 (false - positive: uninitialized variable when using 'do') - -2010-01-02 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1204 - (Tokenizer::findClassFunction broken) - -2010-01-02 Slava Semushin - - * lib/checkautovariables.cpp, test/testautovariables.cpp: Fixed - #1013 (autovariables: detect when assigning parameter **par) http://sourceforge.net/apps/trac/cppcheck/ticket/1013 - -2010-01-02 Slava Semushin - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1197 - (Segmentation fault when we define function which was already - defined by preprocessor) http://sourceforge.net/apps/trac/cppcheck/ticket/1197 - -2010-01-01 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1178 (1.39: - Internal error) - -2010-01-01 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1200 (false - positive 'uninitialized variable' when using throw) - -2010-01-01 Daniel Marjamäki - - * lib/checkother.cpp: refactoring the fix for #1191 - -2010-01-01 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1191 (false - positive: uninitialized variable) - -2010-01-01 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1196 (Hang: - Cppcheck hang for the file linux-2.6/drivers/crypto/hifn_795x.c) - -2009-12-31 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1188 (false - negative: dereferencing p, which is a null pointer 'int y = 5 + *p') - -2009-12-31 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: fixed a hang in - Tokenizer::simplifyFunctionParameters - -2009-12-31 Daniel Marjamäki - - * test/testclass.cpp: Self assignment in class: added TODO test - cases to reduce false positives - -2009-12-31 Robert Reif - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: Fixed - #1184 (improve test: operator =) - -2009-12-31 Daniel Marjamäki - - * lib/cppcheck.cpp: fixed cppcheck warning - -2009-12-31 Daniel Marjamäki - - * lib/preprocessor.cpp: Fixed #1181 (Preprocessor fails while - expanding macros) - -2009-12-31 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1183 (False - positive: uninitialized variable p 'd = bar(sizeof(*p));') - -2009-12-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1182 (False - positive: uninitialized variable 'int *pa = &a;') - -2009-12-30 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #1173 (Improve check: memory leak not - detected in constructor) - -2009-12-30 Robert Reif - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1167 (### - Internal error in Cppcheck. Please report it.) - -2009-12-30 Daniel Marjamäki - - * lib/checkother.cpp: cleanup - -2009-12-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1087 (uninitialized - data not detected 'char z = *str') - -2009-12-30 Daniel Marjamäki - - * lib/checkother.cpp, lib/tokenize.cpp, test/testother.cpp, - test/testtokenize.cpp: Fixed #1105 (improve check: uninitialized - variable not detected for 'a = a') - -2009-12-30 Robert Reif - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1176 (void operator - = check doesn't support struct) - -2009-12-30 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: Fixed - #1041 (passing a nullpointer to a reference) - -2009-12-30 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1067 (Tokenizer: - K&R style function that returns function pointer) - -2009-12-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1177 (False - positive: pointer is not dereferenced 'sizeof(*p)') - -2009-12-30 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1168 (false - positive: Uninitialized variable) - -2009-12-29 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1166 (improve - check: using uninitialized pointer to create reference 'int - &r(*p);') - -2009-12-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testother.cpp: Robert Reif: Fixed #1163 - (post increment test broken for complex template types) - -2009-12-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1165 - (Tokenizer: wrong simplification of 'do { .. } while (0)' if the - body contains continue or break) - -2009-12-29 Daniel Marjamäki - - * lib/checkother.cpp, lib/executionpath.cpp, lib/executionpath.h: - ExecutionPath: Refactoring. Removed the bailOut variable - -2009-12-29 Daniel Marjamäki - - * lib/executionpath.cpp, lib/executionpath.h, test/testother.cpp: - Fixed #1160 (Null pointer dereference vs. goto) - -2009-12-29 Daniel Marjamäki - - * lib/checkclass.cpp: astyle formatting - -2009-12-29 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Robert Reif: Fixed #1164 - (only first void operator = found) - -2009-12-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Robert Reif: Fixed - #1162 (add support to tokenize typedefs with templates) - -2009-12-28 Daniel Marjamäki - - * lib/executionpath.cpp, lib/preprocessor.cpp: Valgrind: Fixed - memory leaks when running testrunner that was found by Valgrind - -2009-12-28 Daniel Marjamäki - - * lib/checkstl.h, test/teststl.cpp: Robert Reif: Fixed #1158 - ((possible style) message with regular check) - -2009-12-28 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Robert Reif: Fixed - #1161 (add tokenize support for typedefs with enum definitions) - -2009-12-28 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed #1159 (Valgrind gives error in - Tokenizer::simplifyWhile0) - -2009-12-28 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1156 ([False - positive] Uninitialized variable - class member in constructor) - -2009-12-28 Daniel Marjamäki - - * lib/cppcheck.cpp, lib/cppcheck.h, lib/preprocessor.cpp, - lib/settings.cpp, lib/settings.h: exitcode suppressions. Partly - fixes #1113 - -2009-12-28 Daniel Marjamäki - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Tokenizer: Simplify 'while (0)' better - -2009-12-27 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed another issue with - #1154 (false positive: Data is allocated but not initialized) - -2009-12-27 Daniel Marjamäki - - * lib/mathlib.cpp, test/testmathlib.cpp: astyle formatting - -2009-12-27 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1154 (false - positive: Data is allocated but not initialized) - -2009-12-27 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1138 (improve - check: dereferencing uninitialized pointer) - -2009-12-27 Martin Ettl - - * lib/mathlib.cpp, test/testmathlib.cpp: added further testcases to - testmathlib::convert(); now the conversion of - +-[hexnumber|octalnumber] works correctly - -2009-12-27 Martin Ettl - - * test/testmathlib.cpp: added further testcases to - testmathlib::isint() - -2009-12-27 Martin Ettl - - * lib/mathlib.cpp, test/testmathlib.cpp: extended testcases of - mathlib; fixed zero conversion: +0 and -0 is converted to 0 - -2009-12-27 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #972 (New - check: return pointer of stack memory) - -2009-12-27 Daniel Marjamäki - - * lib/checkother.cpp: Uninitialized variables: Refactoring and - commenting a little - -2009-12-27 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1153 (False - positive: uninitialized data for reinterpret_cast) - -2009-12-26 Daniel Marjamäki - - * test/testmemleak.cpp: Fixed #1120 (Test compile warnings with - Cygwin) - -2009-12-26 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Uninitialized variables: - Fixed false positive for 'if (ptr)' - -2009-12-26 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1151 (false - positive: Data is allocated but not initialized) - -2009-12-26 Daniel Marjamäki - - * lib/executionpath.cpp: Fixed #1152 (Hang/Slow: ExecutionPath - handling hangs) - -2009-12-25 Daniel Marjamäki - - * lib/checkother.cpp, lib/executionpath.cpp, lib/executionpath.h, - test/testother.cpp: ExecutionPath: Refactoring if-handling - -2009-12-25 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkother.cpp, - lib/executionpath.cpp, lib/executionpath.h: ExecutionPath: - Refactoring the interface - -2009-12-25 Daniel Marjamäki - - * lib/checkother.cpp, lib/executionpath.cpp, lib/executionpath.h, - test/testother.cpp: Fixed #683 (wrong usage of strcmp) - -2009-12-25 Daniel Marjamäki - - * man/manual.docbook: htmlreport: added brief information in the - manual - -2009-12-25 Daniel Marjamäki - - * : Merge commit 'hn/master' - -2009-12-25 Daniel Marjamäki - - * lib/cppcheck.cpp: Robert Reif: fix cppcheck post increment warning - -2009-12-25 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1141 - (Tokenizer: Wrong simplification of calculations) - -2009-12-23 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: fixed unit testing - -2009-12-23 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Refactoring the - uninitialized variable / null pointer checks so they use a common - function to inspect function calls - -2009-12-23 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1147 (Improve - check: return uninitialized variable) - -2009-12-23 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed false positives - about uninitialized variables - -2009-12-23 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1137 (false - positive: uninitialized variable when using a class object) - -2009-12-23 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Robert Reif: Fixed #1139 - (false negative: CheckOther::postIncrement() only finds at most one - problem) - -2009-12-23 Daniel Marjamäki - - * test/testtokenize.cpp: Robert Reif: code cleanup - -2009-12-23 Daniel Marjamäki - - * lib/cppcheck.cpp: Robert Reif: fix a style warning - -2009-12-22 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Borland C++: Fixed compiler error - -2009-12-22 Daniel Marjamäki - - * lib/executionpath.h, lib/preprocessor.cpp: Visual Studio: Added - casts to silence compiler warnings - -2009-12-22 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h: Visual Studio: - Fixed unittests - -2009-12-22 Daniel Marjamäki - - * testrunner.cbproj: C++ Builder: updated the testrunner project - file - added the lib/executionpath.cpp - -2009-12-22 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1133 (Uninitialized - array: strchr, strrchr, etc) - -2009-12-22 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1128 (false - positive: Data is allocated but not initialized) - -2009-12-22 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1112 - (cppcheck fails because of accented characters in comments) - -2009-12-22 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1127 - (Segfault with template) - -2009-12-22 Daniel Marjamäki - - * test/testmemleak.cpp, test/testother.cpp: astyle formatting - -2009-12-22 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Eric Sesterhenn: Fixed - #1130 (False positive uninitialized variable) - -2009-12-22 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Eric Sesterhenn: - Fixed #1131 (descriptor leak false positive) - -2009-12-22 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Robert Reif: Fixed - #1108 (Only trivial typedefs are tokenized properly) - -2009-12-21 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1096 (Non-obvious - error message: Overlapping data buffer) - -2009-12-21 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #1095 (Non-obvious error - message: Dangerous usage of erase) - -2009-12-21 Daniel Marjamäki - - * lib/preprocessor.cpp: preprocessor: removed unnecessary casts - -2009-12-21 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, test/testexceptionsafety.cpp: Fixed - #1126 (False positive: upon exception there is memory leak (calling - unknown function)) - -2009-12-21 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: ericsesterhenn: Fixed - #1091 (improve check: nullpointer dereference not detected) - -2009-12-21 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkother.cpp, - lib/executionpath.cpp, lib/executionpath.h: Execution Path: - Refactoring - -2009-12-20 Reijo Tomperi - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fix #1124 - (Invalid number of character ((). Can't process file.) - http://sourceforge.net/apps/trac/cppcheck/ticket/1124 - -2009-12-20 Daniel Marjamäki - - * lib/checkother.cpp, lib/executionpath.h, test/testmemleak.cpp: - Execution Path: some refactorings of the checking - -2009-12-20 Daniel Marjamäki - - * lib/executionpath.cpp, test/testother.cpp: Fixed #1119 (false - positve: uninitialized variable y when y is assigned in inner - expression 'x = (y = 10)') - -2009-12-20 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed #1117 (segmentation fault of cppcheck) - -2009-12-20 Kimmo Varis - - * CMakeLists.txt, test/CMakeLists.txt: CMake - add 'make check' - -target. Tests are now excluded from normal targets to make compiling faster. - 'make check' -target will compile and run tests. - -2009-12-20 Kimmo Varis - - * cli/CMakeLists.txt, gui/CMakeLists.txt, lib/CMakeLists.txt, - test/CMakeLists.txt: CMake - use more strict compiler flags. - -2009-12-20 Daniel Marjamäki - - * lib/preprocessor.cpp: Preprocessor: Use 'unsigned char' instead of - 'char' - -2009-12-20 Daniel Marjamäki - - * lib/checkclass.cpp: code cleanup - -2009-12-19 Daniel Marjamäki - - * lib/checkstl.cpp: stl size: minor fix to prevent segmentation - fault when token is null - -2009-12-19 Daniel Marjamäki - - * lib/checkstl.h: stl size: added documentation - -2009-12-19 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp, - test/testconstructors.cpp: Fixed #1093 (False positive: missing - constructor) - -2009-12-19 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkstl.cpp, - test/testbufferoverrun.cpp: astyle - -2009-12-19 Kimmo Varis - - * gui/CMakeLists.txt: CMake- fix building GUI from different - directory. - -2009-12-19 Kimmo Varis - - * CMakeLists.txt: CMake - disable building GUI for Cygwin. - -2009-12-19 Kimmo Varis - - * : commit d51520d656459780d4addc67cd2e1e3dd830bb2b Author: Kimmo - Varis Date: Sat Dec 19 16:54:38 2009 +0200 - -2009-12-19 Kimmo Varis - - * gui/cppcheck-gui.rc: Fix Windows GUI resource file. - -2009-12-19 Daniel Marjamäki - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: robert reif: - Fixed #1118 (new check: use empty() instead of checking size() - against zero) - -2009-12-19 Kimmo Varis - - * cli/CMakeLists.txt, gui/CMakeLists.txt, test/CMakeLists.txt: CMake - - cleaner way to set additional library for Windows. - -2009-12-18 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #1107 (False positive: - Dangerous usage of erase, when using std::list) - -2009-12-18 Daniel Marjamäki - - * lib/filelister.cpp: lanurmi: Fixed #1016 (Patch: Refactor #ifdefs - in filelister.cpp) - -2009-12-18 Daniel Marjamäki - - * cli/cppcheck.vcproj, test/test.vcproj: Fixed #1101 (link error - with latest git in Visual Studio) - -2009-12-18 Daniel Marjamäki - - * cppcheck.cbproj: C++ Builder: updated project file - -2009-12-18 Daniel Marjamäki - - * lib/checkbufferoverrun.h: added error info about the strncpy check - -2009-12-18 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - test/testbufferoverrun.cpp: ericsesterhenn: Fixed #1106 (check if - buffer is zero terminated after a strncpy) - -2009-12-17 Kimmo Varis - - * cli/CMakeLists.txt, gui/CMakeLists.txt, test/CMakeLists.txt: CMake - - Fix Windows build. - -2009-12-17 Kimmo Varis - - * lib/CMakeLists.txt: CMake - add missing file in lib. - -2009-12-17 Kimmo Varis - - * lib/CMakeLists.txt: CMake - reorder files in lib's makefile. - -2009-12-14 Kimmo Varis - - * gui/CMakeLists.txt: CMake - build GUI translation files. - -2009-12-14 Kimmo Varis - - * CMakeLists.txt, gui/CMakeLists.txt: CMake GUI build - fix adding - resources to GUI. - -2009-12-14 Kimmo Varis - - * CMakeLists.txt, gui/CMakeLists.txt: Build GUI using CMake. This is a start for building GUI with CMake. It works but it is a - bit ugly. - -2009-12-14 Kimmo Varis - - * CMakeLists.txt, test/CMakeLists.txt: Add testsuite to CMake build - files. - -2009-12-12 Kimmo Varis - - * CMakeLists.txt, cli/CMakeLists.txt, lib/CMakeLists.txt: Add simple - CMake build files to build lib and cli. Apparently not everybody wants to use QMake to build cppcheck. Which - is understandable if you only want to hack on/build lib and cli. Qt - and QMake are pretty lot to install for just that. So lets start using CMake. It is widely used and is "just" build - system and not programming framework. CMake is also easy to use for - building Qt software too so it can replace QMake. This first commit only builds lib and cli for Linux. - -2009-12-15 Daniel Marjamäki - - * lib/tokenize.cpp, test/testpreprocessor.cpp: Fixed #1086 - (segmentation fault of cppcheck '#if - define(A)+define(B)+define(C)!=1') - -2009-12-15 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1103 (false - positive: uninitialized variable when using references) - -2009-12-15 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: TestLocalLeaks: - going out of scope - -2009-12-15 Henrik Nilsson - - * htmlreport/cppcheck-htmlreport: cppcheck doesn't always report a - filename for an error. Added some error checking so this tool doesn't crash. - -2009-12-15 Henrik Nilsson - - * htmlreport/setup.py: Added a installation script for the - cppcheck-htmlreport utility. The script uses distutils to install the script into /usr/bin/. The - following will install the script: sudo ./setup.py install - -2009-12-15 Reijo Tomperi - - * lib/checkmemoryleak.cpp: Fix compiler error: cast from - 'CheckLocalLeaks*' to 'int' loses precision - -2009-12-14 Daniel Marjamäki - - * lib/lib.pri: fixed #1099 (GUI: unable to build gui from current - git-head) - -2009-12-15 Reijo Tomperi - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fix #1076 - (Invalid number of character ({). Can't process file.) - http://sourceforge.net/apps/trac/cppcheck/ticket/1076 - -2009-12-14 Daniel Marjamäki - - * Makefile, lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - lib/checkother.cpp, lib/executionpath.cpp, lib/executionpath.h, - test/testmemleak.cpp: Added TestLocalLeaks - -2009-12-13 Reijo Tomperi - - * test/testpreprocessor.cpp: Test case for #1076 (Invalid number of - character ({). Can't process file.) - -2009-12-13 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #1082 (False - positive: Resource leak in loop which exits only after releasing - resource) - -2009-12-13 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h, test/testcppcheck.cpp, - test/testpreprocessor.cpp, test/testsuite.cpp: Fixed #1084 (define - configuration lost) - -2009-12-13 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1058 - (Preprocessor: extracting configuration for '#if DEF == 1') - -2009-12-13 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1072 (False - positive: class member initialization with '*p=0;') - -2009-12-12 Daniel Marjamäki - - * using_gcov.txt: removed deprecated file using_gcov.txt - -2009-12-12 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1097 (Internal - error: When macro is not expanded 'ABC(for (i=0;i<10;i++) ..);') - -2009-12-12 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, test/testexceptionsafety.cpp: Fixed - #1074 (Exception safety: auto deallocated classes don't leak) - -2009-12-11 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - Fixed TODO_ASSERT_EQUALS - -2009-12-11 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #1080 (false - positive: member variable not initialized) - -2009-12-11 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1075 (False - positive: uninitialized variable 'return bar(s);') - -2009-12-11 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/tokenize.cpp, test/testpreprocessor.cpp: - Fixed #1060 (Preprocessor: wrong define handling) - -2009-12-11 Henrik Nilsson - - * htmlreport/cppcheck-htmlreport: index.html page is now complete - with a list of files and all errors found. Other changes: * added a stylesheet and made the html design much better. * contains links directly to the line in the source file. - -2009-12-09 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #1061 (false - positve: uninitialized variable) - -2009-12-09 Daniel Marjamäki - - * lib/tokenize.cpp, test/testpreprocessor.cpp: Fixed #1024 - (Preprocessor: doesn't expand macro in macro) - -2009-12-09 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h, - test/testpreprocessor.cpp: Preprocessor: Refactoring the - Preprocessor::expandMacros - -2009-12-08 Reijo Tomperi - - * lib/checkunusedfunctions.cpp, test/testunusedfunctions.cpp: Fix - #1071 ((style) The function 'throw' is never used) - http://sourceforge.net/apps/trac/cppcheck/ticket/1071 - -2009-12-08 Reijo Tomperi - - * lib/tokenize.cpp: Apply patch from #1066 (Speed up cppcheck) - http://sourceforge.net/apps/trac/cppcheck/ticket/1066 - -2009-12-08 Henrik Nilsson - - * htmlreport/README.txt, htmlreport/cppcheck-htmlreport: Added a - python script that takes the cppcheck output xml file and generates - a html report of it. The html report is complete with syntax - highlighted source code using the pygments module. This initial commit contains generation of html files but the actual - errors is missing from the html content and the index.html file. - -2009-12-08 Reijo Tomperi - - * lib/checkautovariables.cpp, test/testautovariables.cpp: Fix #1069 - (Minor spelling mistake across cppcheck) - http://sourceforge.net/apps/trac/cppcheck/ticket/1069 - -2009-12-08 Reijo Tomperi - - * test/testsimplifytokens.cpp: Added test case for else if - simplification - -2009-12-07 Reijo Tomperi - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fix #1065 (Internal - error - incrementing single char in char array) - http://sourceforge.net/apps/trac/cppcheck/ticket/1065 - -2009-12-07 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, test/testexceptionsafety.cpp: Fixed - #1063 (False positive: deallocated memory doesn't leak upon - exception) - -2009-12-07 Reijo Tomperi - - * lib/tokenize.cpp, test/testtokenize.cpp: Fix #1057 (Tokenizer: - negative numbers are not tokenized correctly in switch-case) - http://sourceforge.net/apps/trac/cppcheck/ticket/1057 - -2009-12-06 Reijo Tomperi - - * lib/checkother.cpp: small fix to previous commit - -2009-12-06 Reijo Tomperi - - * lib/checkother.cpp: Minor refactoring for checkother.cpp - -2009-12-06 Daniel Marjamäki - - * lib/checkother.cpp: STL: fix iterator bug - -2009-12-06 Daniel Marjamäki - - * lib/checkother.cpp: Visual C++: Suppress compiler warnings - -2009-12-06 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h, - test/testpreprocessor.cpp: Preprocessor: Reverted refactoring - -2009-12-06 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h, - test/testpreprocessor.cpp: Preprocessor: Fix so the unit tests work - again - -2009-12-06 Daniel Marjamäki - - * lib/checkother.cpp, lib/cppcheck.cpp, lib/preprocessor.cpp, - lib/preprocessor.h, lib/settings.cpp, lib/settings.h: twistedwave: - Fixed #1055 (Support for inline suppressions) - -2009-12-06 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h, - test/testpreprocessor.cpp: Preprocessor: Refactoring to make it - simpler - -2009-12-06 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: - newcheck: added the 'newcheck' functionality. It's still in early - state so it needs refactoring - -2009-12-06 Daniel Marjamäki - - * lib/checkclass.cpp, lib/checkclass.h, test/testclass.cpp: class - checking: It's a 'possible style' error if a private constructor is - not initializing a member variable - -2009-12-06 Daniel Marjamäki - - * Makefile: Makefile: restored to debugging mode - -2009-12-06 Martin Ettl - - * gui/resultstree.cpp, gui/resultstree.h: gui:added an right-click - option "copy message" - -2009-12-06 Daniel Marjamäki - - * Changelog: Updated Changelog - -2009-12-06 Daniel Marjamäki - - * Makefile: update the Makefile for the release - -2009-12-06 Daniel Marjamäki - - * cli/cppcheck.rc, cli/main.cpp, createrelease, lib/cppcheck.cpp, - win_installer/cli.wxs: version 1.39 - -2009-12-06 Daniel Marjamäki - - * lib/tokenize.cpp: suppress 'internal error' message about failed - template instantiation in release mode - -2009-12-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1052 - (Internal error for 'int vals[] = { 0x13, 1?0x01:0x00 };') - -2009-12-06 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed #1051 (segmentation fault when there is - syntax error) - -2009-12-06 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1050 - (Internal error: In tokenizer for: 'do { sizeof 1; } while (0);') - -2009-12-05 Daniel Marjamäki - - * lib/tokenize.cpp: Fixed #1049 (Tokenizer: internal error for - 'std::list w1, w2;') - -2009-12-05 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, test/testexceptionsafety.cpp: Fixed - #1048 (False positive: exceptNew error with nothrow) - -2009-12-05 Reijo Tomperi - - * man/cppcheck.1.xml: Minor fixes to the man page. - -2009-12-05 Reijo Tomperi - - * test/testsimplifytokens.cpp: CRLF -> LF fix - -2009-12-05 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #1046 (tokenizer: - internal error for 'discard_block< (1 << 24), 10, 24 > u, v;') - -2009-12-05 Daniel Marjamäki - - * lib/cppcheck.cpp, man/cppcheck.1.xml: updated help about --enable - -2009-12-05 Daniel Marjamäki - - * cppcheck.cbproj, lib/settings.cpp: Borland C++: fixed compiler - error and updated the project file to include iterator debugging - -2009-12-05 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp: Fixed #1044 (Access violation with - --enable=all) - -2009-12-05 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1026 (false positive: buffer access out of bounds) - -2009-12-05 Daniel Marjamäki - - * lib/cppcheck.cpp, lib/settings.cpp: Fixed #1043 (use cppcheck:.. - syntax in error messages) - -2009-12-04 Daniel Marjamäki - - * lib/settings.cpp: --enable: readded code so that parameters can be - comma separated - -2009-12-04 Daniel Marjamäki - - * lib/settings.cpp: fix a bug in commit - 84a6fe6b54c26acb5d1dc3fd57b1de9634a801b1 - -2009-12-04 Daniel Marjamäki - - * man/manual.docbook: updated the manual - -2009-12-04 Daniel Marjamäki - - * lib/cppcheck.cpp, lib/settings.cpp, test/testexceptionsafety.cpp: - Fixed #1034 (change --enable to --enable=all) - -2009-12-04 Reijo Tomperi - - * lib/token.cpp, lib/tokenize.cpp, lib/tokenize.h, - test/testtokenize.cpp: Fix #1037 (tokenizing a nested do while, - while loop fails) - http://sourceforge.net/apps/trac/cppcheck/ticket/1037 - -2009-12-03 Reijo Tomperi - - * lib/checkmemoryleak.cpp: astyle fix - -2009-12-03 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Eric Sesterhenn: - Fixed #1032 (False positive resource leak with exit at end of - function) - -2009-12-02 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1030 (wrong - line number with goto) - -2009-11-30 Reijo Tomperi - - * lib/checkexceptionsafety.cpp, lib/cppcheck.cpp, lib/settings.cpp, - lib/settings.h, test/testexceptionsafety.cpp: Refactoring: Parse - --enable values in Settings class - -2009-11-30 Reijo Tomperi - - * lib/cppcheck.cpp: Add --unused-functions back to help, but mention - that it is deprecated. - -2009-11-30 Reijo Tomperi - - * man/cppcheck.1.xml: Update man page - -2009-11-30 Daniel Marjamäki - - * lib/tokenize.cpp, test/testmemleak.cpp, - test/testsimplifytokens.cpp: ericsesterhenn: Fix #1028 (False - positive resource leak) - -2009-11-29 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fix #1022 (False positive: - uninitialized variable when using local struct) - -2009-11-29 Reijo Tomperi - - * lib/cppcheck.cpp: Fix #986 (Move --all and --style to --enable) - http://sourceforge.net/apps/trac/cppcheck/ticket/986 - -2009-11-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1027 - (Internal error: sizeof a++) - -2009-11-29 Daniel Marjamäki - - * lib/tokenize.cpp: changed error message when there an internal - error in Cppcheck is found - -2009-11-29 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1020 - (lib/tokenize.cpp:4615: bool Tokenizer::validate() const: Assertion - 0 failed) - -2009-11-28 Reijo Tomperi - - * lib/cppcheck.cpp, lib/tokenize.cpp, lib/tokenize.h: validator bugs - are now printed using the errorlogger - -2009-11-28 Daniel Marjamäki - - * lib/check.h: DJGPP: fix runtime errors because list is destroyed - before objects - -2009-11-28 Daniel Marjamäki - - * cli/cli.pro, test/test.pro: use checked STL in debugmode - -2009-11-28 Daniel Marjamäki - - * cli/cli.pro: cli: in release use the NDEBUG to avoid assertions - -2009-11-28 Daniel Marjamäki - - * gui/gui.pro: gui: with the define NDEBUG the assertions are - disabled - -2009-11-28 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, lib/preprocessor.cpp: Use sizeOfType() - instead of sizeof(void*) - -2009-11-28 Martin Ettl - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: partial - fix of ticket #997; added check for write() two testcases - -2009-11-28 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/token.cpp, lib/token.h, - lib/tokenize.cpp: mode change from 755 to 644 - -2009-11-28 Daniel Marjamäki - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - #1021 (Out-of-bounds access false positive) - -2009-11-28 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/token.cpp: minor fixes - -2009-11-28 Daniel Marjamäki - - * lib/token.cpp, lib/token.h: fixed buffer overrun and removed - redundant function Token::str - -2009-11-28 Daniel Marjamäki - - * testrunner.cbproj: Borland C++: updated the testrunner project - -2009-11-28 Daniel Marjamäki - - * lib/tokenize.cpp: Borland C++: Fixed compiler error - -2009-11-28 Reijo Tomperi - - * lib/token.cpp, lib/token.h, lib/tokenize.cpp: Token debug function - printOut() can now print out filename instead of index - -2009-11-27 Reijo Tomperi - - * lib/token.cpp, lib/token.h, lib/tokenize.cpp, - test/testsimplifytokens.cpp: Fix #1018 (strcat(strcat()) causes - assertion in Tokenizer::validate) Test case provided by povaddict - http://sourceforge.net/apps/trac/cppcheck/ticket/1018 - -2009-11-27 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #1015 - (SIGABRT: Tokenizer::validate for openttd/src/ai/ai_config.cpp) - -2009-11-26 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #1014 - (Preprocessor: Invalid preprocessing of '#define some_delete(x) - delete x;') - -2009-11-25 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #1007 - (False positive array index out of bounds concerning a switch - statement in a for loop) Bailout if switch is found in for loop. - http://sourceforge.net/apps/trac/cppcheck/ticket/1007 - -2009-11-24 Daniel Marjamäki - - * gui/resultstree.cpp: Robert Reif: initialize array (#366) - -2009-11-23 Daniel Marjamäki - - * win_installer/cppcheck.wxs: windows installer: non-advertised - shortcut for manual. Seems to work better - -2009-11-23 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #989 - (CppCheck crashes on Win XP when scanning large - directories/subdirectories) - -2009-11-22 Reijo Tomperi - - * Makefile, tools/dmake.cpp: Added 'make man' to Makefile - -2009-11-22 Reijo Tomperi - - * lib/tokenize.h: Fix #1003 (Compiler warning: is there a reason for - Tokenizer::getErrorMessages to be virtual?) Destructor is now - virtual. http://sourceforge.net/apps/trac/cppcheck/ticket/1003 - -2009-11-22 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Temporary fix for - #994 (cppcheck cannot check my sources with segfaulting) - -2009-11-22 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #993 (Latest Git - drop aborts at 63% of wine tree) - -2009-11-21 Daniel Marjamäki - - * win_installer/build3.bat: Installer: minor fix in build script - -2009-11-22 Slava Semushin - - * lib/preprocessor.cpp: lib/preprocessor.cpp: clean up code. Improvements for: 092f64b77a554848db35b263bfd252f266db80f3 No functional change. - -2009-11-21 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h, lib/tokenize.h, - test/testpreprocessor.cpp: Fixed #982 (Preprocessor: detects and - remove conditions which always true) - -2009-11-21 Slava Semushin - - * lib/tokenize.cpp: Fixed #988 - (Tokenizer::simplifyDoWhileAddBraces(): don't add braces after "do" - when it not a loop) FIXME: test cases needed. http://sourceforge.net/apps/trac/cppcheck/ticket/988 - -2009-11-21 Daniel Marjamäki - - * win_installer/cli.wxs, win_installer/cppcheck.wxs, - win_installer/gui.wxs, win_installer/productInfo.wxi: Windows - Installer: added manual.pdf, renamed cppcheck.msi => cli.msi, - renamed gui.msi => cppcheck.msi, fixes for upgrading - -2009-11-21 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #995 - (false positive: buffer access out of bounds when using fgets) - http://sourceforge.net/apps/trac/cppcheck/ticket/995 - -2009-11-20 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #985 - (Detect buffer overrun with read()) - http://sourceforge.net/apps/trac/cppcheck/ticket/985 - -2009-11-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #965 - (Division by zero false positive with nested macros) - -2009-11-21 Slava Semushin - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #990 - (Tokenizer::simplifyIfAddBraces() handle case where statement after - if doesn't end by semicolon) http://sourceforge.net/apps/trac/cppcheck/ticket/990 - -2009-11-20 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #960 - (Tokenizer::validate() assertion failure with mismatched brackets) - -2009-11-20 Daniel Marjamäki - - * lib/preprocessor.cpp, lib/preprocessor.h, - test/testpreprocessor.cpp: Fixed #912 (### Unlogged error at - Tokenizer::syntaxError: Invalid number of character (()) - -2009-11-20 Reijo Tomperi - - * gui/resultstree.cpp: Fix #864 (GUI fails to open second position - for multi-line errors) Apply patch from robertreif - http://sourceforge.net/apps/trac/cppcheck/ticket/864 - -2009-11-20 Reijo Tomperi - - * gui/mainwindow.cpp: Fix #981 (GUI saves report with wrong - extension) Apply patch from robertreif - http://sourceforge.net/apps/trac/cppcheck/ticket/981 - -2009-11-20 Slava Semushin - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #983 - (Tokenizer::simplifyTypedef() incorrectly substitute type inside - namespace) http://sourceforge.net/apps/trac/cppcheck/ticket/983 - -2009-11-19 Reijo Tomperi - - * cppcheck.cbp: Add execution parameters to codeblocks project file: - p.cpp --debug - -2009-11-19 Reijo Tomperi - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Fix #971 - (Preprocessor: Handle partial macro in macro) - http://sourceforge.net/apps/trac/cppcheck/ticket/971 - -2009-11-18 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #968 (False - positive when TEMP_FAILURE_RETRY used) - -2009-11-18 Reijo Tomperi - - * test/testpreprocessor.cpp: Added a few TODO test cases for #971 - (Invalid number of characters (()) - http://sourceforge.net/apps/trac/cppcheck/ticket/971 - -2009-11-17 Reijo Tomperi - - * test/testtokenize.cpp: astyle fix - -2009-11-17 Daniel Marjamäki - - * test/testother.cpp: fixed testcase so it's valid syntax - -2009-11-18 Slava Semushin - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #970 (Tokenizer: - Incorrect comparison order simplification) Revert changes from 11cb7b4710cf78be6d6efc8ad3165e0e98cadd3a commit - for lib/tokenize.cpp (fixed it by another way). Teach unsignedint() to expand "unsigned" in casts. http://sourceforge.net/apps/trac/cppcheck/ticket/970 - -2009-11-16 Daniel Marjamäki - - * man/manual.docbook: manual: refactorings - -2009-11-16 Daniel Marjamäki - - * gui/resultstree.cpp: robertreif: Fixed #442 (Filter duplicate - errors in GUI) - -2009-11-16 Daniel Marjamäki - - * gui/resultstree.cpp: robertreif: Fixed #726 (GUI: Fix quoting of - paths with spaces in Windows) - -2009-11-15 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed - -2009-11-15 Daniel Marjamäki - - * man/buildman.sh, man/manual.docbook: Manual: Minor refactorings. - Added a simple build script - -2009-11-15 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #925 (uninitialized - deletion not detected) - -2009-11-15 Daniel Marjamäki - - * lib/mathlib.cpp: Fixed #891 (false positive: division by zero) - -2009-11-15 Daniel Marjamäki - - * gui/mainwindow.cpp: gui: fixed compiler error - -2009-11-15 Daniel Marjamäki - - * man/manual.docbook: manual: better description of --enable (#883) - -2009-11-15 Reijo Tomperi - - * lib/checkbufferoverrun.cpp: Minor fix to previous commit - -2009-11-15 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp, - test/testother.cpp: Fix #964 (Integer division by zero exception) - http://sourceforge.net/apps/trac/cppcheck/ticket/964 - -2009-11-15 Daniel Marjamäki - - * man/cppcheck.1.xml: manual: updated the manpage regarding --enable - (#883) - -2009-11-15 Daniel Marjamäki - - * lib/cppcheck.cpp: help screen updates for the --enable command - (#883) - -2009-11-15 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, lib/cppcheck.cpp, lib/settings.cpp, - lib/settings.h, test/testexceptionsafety.cpp: Fixed #883 (Add new - command line argument --enable) - -2009-11-15 Slava Semushin - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #842 - (out of bounds: when buffer is allocated with malloc) http://sourceforge.net/apps/trac/cppcheck/ticket/842 - -2009-11-15 Slava Semushin - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #900 - (Improve out-of-bounds check to detect error with "new char(x)") http://sourceforge.net/apps/trac/cppcheck/ticket/900 - -2009-11-15 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #953 (false - positive: 'uninitialized variable' with function pointer) - -2009-11-15 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #483 (False - positive: found leak when foreach for lists used) - -2009-11-15 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: - simple code cleanup - -2009-11-15 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #915 (false - positive: memory leak for struct member (allocated in condition) - -2009-11-14 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #936 (false - positive: uninitialized variable '.. else return; .. ') - -2009-11-14 Daniel Marjamäki - - * man/manual.docbook: manual: some minor refactorings - -2009-11-14 Daniel Marjamäki - - * lib/cppcheck.cpp: removed command line flag --exception-safety - from the help page - -2009-11-14 Slava Semushin - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #961 (Tokenizer: - call simplifyCasts() before removing "unsigned" keyword) http://sourceforge.net/apps/trac/cppcheck/ticket/961 - -2009-11-14 Daniel Marjamäki - - * man/manual.docbook: Manual: Minor refactorings - -2009-11-14 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, lib/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #944 (new false positives against Wine - Git Tree) - -2009-11-14 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #913 (false - positive: uninitialized variable) - -2009-11-13 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - When #error is encountered the result is an empty string => don't - check configuration - -2009-11-13 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #919 - (possible memory leak not detected) - -2009-11-14 Slava Semushin - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #954 - (Tokenizer: correctly simplify sizeof of class members) http://sourceforge.net/apps/trac/cppcheck/ticket/954 - -2009-11-13 Daniel Marjamäki - - * man/manual.docbook: manual: added the section 'introduction' - -2009-11-12 Reijo Tomperi - - * lib/tokenize.cpp, lib/tokenize.h, test/testtokenize.cpp: Fix #945 - (Array index out of bounds not detected, because of "int const") - http://sourceforge.net/apps/trac/cppcheck/ticket/945 - -2009-11-12 Reijo Tomperi - - * lib/token.cpp, lib/tokenize.cpp, test/testbufferoverrun.cpp: Fix - #947 (Errors not detected when size_t is used instead of int) - http://sourceforge.net/apps/trac/cppcheck/ticket/947 - -2009-11-12 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #946 - (False positive: Buffer access out-of-bounds) - http://sourceforge.net/apps/trac/cppcheck/ticket/946 - -2009-11-12 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #951 - (Preincremented struct member confused with numeric constant) - -2009-11-12 Reijo Tomperi - - * test/testsimplifytokens.cpp, test/testtokenize.cpp: Test case for - #903 (segmentation fault of cppcheck) - http://sourceforge.net/apps/trac/cppcheck/ticket/903 - -2009-11-13 Slava Semushin - - * lib/tokenize.cpp: Fixed #903 (segmentation fault of cppcheck) http://sourceforge.net/apps/trac/cppcheck/ticket/903 - -2009-11-12 Daniel Marjamäki - - * lib/tokenize.cpp, test/testtokenize.cpp: Fixed #950 (Bug in - cppcheck tokenize.cpp) - -2009-11-11 Daniel Marjamäki - - * man/manual.docbook: Manual: Working draft for a Cppcheck manual - -2009-11-12 Slava Semushin - - * lib/tokenize.cpp: Fixed #935 (Tokenizer: link() problem) http://sourceforge.net/apps/trac/cppcheck/ticket/935 - -2009-11-10 Reijo Tomperi - - * lib/cppcheck.cpp, lib/tokenize.cpp, lib/tokenize.h: Use validate - after tokenize and simplifyTokenlist calls. Disabled until known - problems fixed. - -2009-11-10 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Uninitialized variables: - detect uninitialized pointer array - -2009-11-10 Daniel Marjamäki - - * lib/checkclass.cpp, test/testclass.cpp: Fixed #928 (false - positive: member variable not initialized in constructor) - -2009-11-10 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #931 (Invalid interator - false positive with identical variable names) - -2009-11-10 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #929 (Uninitialized - variable false positive) - -2009-11-10 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #932 (false positive: - Dereferenced iterator 'i' has been erased) - -2009-11-09 Daniel Marjamäki - - * tools/extracttests.cpp: extracttests: astyle formatting - -2009-11-09 Daniel Marjamäki - - * test/testother.cpp: unit testing: minor syntax updates - -2009-11-09 Daniel Marjamäki - - * tools/extracttests.cpp: extracttests: minor updates - -2009-11-09 Daniel Marjamäki - - * test/testbufferoverrun.cpp: unit testing: minor syntax fixes - -2009-11-09 Reijo Tomperi - - * lib/preprocessor.cpp: Made some syntax errors slightly easier to - detect. - -2009-11-08 Daniel Marjamäki - - * htdocs/main.html, htdocs/top.html: webpage: removed main.html and - top.html - -2009-11-08 Daniel Marjamäki - - * htdocs/help.html, htdocs/index.html: webpage: removed the - index.html and help.html - -2009-11-08 Daniel Marjamäki - - * htdocs/help.html, htdocs/index.html, htdocs/main.html, - htdocs/top.html: webpage: created a simple website for us - -2009-11-08 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h, - lib/checkother.cpp, test/testexceptionsafety.cpp: Fixed #832 - (Exception Safety: deallocating member pointer and then throwing - exception) - -2009-11-08 Daniel Marjamäki - - * tools/extracttests.cpp: extracttests: extract more tests - -2009-11-08 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #910 (false - positive: uninitialized variable for array) - -2009-11-07 Daniel Marjamäki - - * test/testbufferoverrun.cpp: testbufferoverrun.cpp: fixed unit test - error - -2009-11-07 Daniel Marjamäki - - * tools/extracttests.cpp: extracttests: extract to cpp instead and - don't generate the Makefile - it's easier to use a simple standard - Makefile instead. - -2009-11-07 Daniel Marjamäki - - * test/testbufferoverrun.cpp: testbufferoverrun.cpp: minor updates - to make it work better as extracted code - -2009-11-07 Daniel Marjamäki - - * tools/extracttests.cpp: extracttests: Added a simple program for - extracting testcode from our unit testing - -2009-11-07 Daniel Marjamäki - - * test/testbufferoverrun.cpp: testbufferoverrun: minor updates to - make the code more easily compilable - -2009-11-07 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: uninitialized data: minor - fix to handle 'new char [' better - -2009-11-07 Reijo Tomperi - - * lib/checkother.cpp: astyle fix - -2009-11-07 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: - uninitialized data: added more checking for allocated data - -2009-11-07 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #907 - (Tokenizer: known result of strlen) - -2009-11-07 Daniel Marjamäki - - * lib/checkmemoryleak.cpp: Fixed #905 (memory leak not detected when - using puts) - -2009-11-07 Daniel Marjamäki - - * cppcheck.sln: Visual C++: removed 'gui' target from the cppcheck - solution - -2009-11-07 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #903 - (false positive: buffer access out of bounds) - http://sourceforge.net/apps/trac/cppcheck/ticket/903 - -2009-11-06 Daniel Marjamäki - - * test/testbufferoverrun.cpp: cleanup in testbufferoverrun.cpp - -2009-11-06 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: uninitialized variables: - better checking of strncpy - -2009-11-06 Daniel Marjamäki - - * lib/cppcheck.cpp: removed --exception-safety and added --enable - -2009-11-06 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #904 (false - positive: uninitialized variable) - -2009-11-06 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #902 (false - positive: uninitialized variable when variable is initialized in - macro) - -2009-11-05 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #898 - (Tokenizer: remove unneeded const after *) - -2009-11-05 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #897 (false - positive: uninitialized variable when assigning pointer to array to - struct member) - -2009-11-05 Reijo Tomperi - - * lib/tokenize.cpp, lib/tokenize.h, test/testsimplifytokens.cpp: - Fixed #896 (False positive with --all when return value of open() is - positive in a loop) - http://sourceforge.net/apps/trac/cppcheck/ticket/896 - -2009-11-04 Daniel Marjamäki - - * lib/checkexceptionsafety.h, test/testexceptionsafety.cpp: updated - error message when memory leaks upon exception - -2009-11-04 Reijo Tomperi - - * test/testclass.cpp: Add one more test case for #895 (false - positive: Suspicious pointer subtraction) - -2009-11-04 Reijo Tomperi - - * lib/checkclass.cpp, test/testclass.cpp: Fix #895 (false positive: - Suspicious pointer subtraction) - http://sourceforge.net/apps/trac/cppcheck/ticket/895 - -2009-11-03 Daniel Marjamäki - - * lib/checkother.cpp: use Token::link instead of findmatch to find - ']' - -2009-11-03 Reijo Tomperi - - * lib/tokenize.cpp, test/teststl.cpp, test/testtokenize.cpp: Fix - #894 (Invalid line number in "Invalid number of character") - http://sourceforge.net/apps/trac/cppcheck/ticket/894 - -2009-11-03 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #893 (False - Positive: Uninitialized variable b in a[0] = b[0] = '\0';) - -2009-11-03 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h, - test/testexceptionsafety.cpp: Exception safety: added check for - unsafe reallocation of member pointer - -2009-11-03 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h, - test/testexceptionsafety.cpp: Exception Safety: detect unsafe - multiple new in a execution path (#831) - -2009-11-03 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #890 (false - positive: Uninitialized variable when pointer takes the address to - array) - -2009-11-03 Reijo Tomperi - - * lib/tokenize.cpp, test/testtokenize.cpp: Fix #881 (Tokenizer: - Something seems to be wrong in Tokenizer::simplifyKnownVariables) - http://sourceforge.net/apps/trac/cppcheck/ticket/881 - -2009-11-02 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: STL: refactoring and fixing - -2009-11-02 Daniel Marjamäki - - * test/teststl.cpp: Refactoring - -2009-11-02 Daniel Marjamäki - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: astyle - formatting - -2009-11-02 Daniel Marjamäki - - * lib/checkstl.cpp, lib/checkstl.h, test/teststl.cpp: STL: added - check for dangerous usage of std::find (#829) - -2009-11-02 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #764 (usage of - unitialized variable not detected) - -2009-11-02 Daniel Marjamäki - - * lib/preprocessor.cpp, test/testother.cpp, - test/testpreprocessor.cpp: Fixed #882 (false positive: uninitialized - variable) - -2009-11-02 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #889 (false - positive: uninitialized variable) - -2009-11-01 Daniel Marjamäki - - * test/testsimplifytokens.cpp: fixed todo testcase - -2009-11-01 Reijo Tomperi - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed segmentation - fault. Had to change one test case to TODO for now. - -2009-11-01 Daniel Marjamäki - - * lib/tokenize.cpp, test/testclass.cpp, test/testsimplifytokens.cpp: - Fixed #880 (Tokenizer: The Tokenizer::simplifyTemplates doesn't - handle recursive templates) - -2009-11-01 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Templates: Better - handling of recursive templates - -2009-11-01 Reijo Tomperi - - * lib/checkother.cpp, test/testother.cpp: Fix #884 (False positive: - Possible null pointer reference about a non-pointer) - http://sourceforge.net/apps/trac/cppcheck/ticket/884 - -2009-10-31 Daniel Marjamäki - - * lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h, - lib/cppcheck.cpp, lib/settings.cpp, lib/settings.h, - test/testexceptionsafety.cpp: Fixed #831 (Exception safety: multiple - new in a simple execution path) - -2009-10-31 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #843 (new check: - Passing uninitialized array to strlen/strdup/strcpy/strcat/etc) - -2009-10-31 Daniel Marjamäki - - * lib/checkstl.cpp, test/teststl.cpp: Fixed #877 (False positive: - After insert, iterator may be invalid) - -2009-10-31 Reijo Tomperi - - * lib/preprocessor.cpp: Fix #685 (Include file not found is printed - with -v when include file is empty) - http://sourceforge.net/apps/trac/cppcheck/ticket/685 - -2009-10-31 Daniel Marjamäki - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #430 - (Tokenizer: handle templates with partial specialisation) - -2009-10-31 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #876 (false - positive: uninitialized variable) - -2009-10-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #875 (Uninitialized - variable: initialization in subfunction) - -2009-10-30 Daniel Marjamäki - - * lib/checkother.cpp: uninitialized variables: return|goto are not - used in variable declarations - -2009-10-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: null pointer: fixed false - positive when condition checks if pointer is ok - -2009-10-30 Daniel Marjamäki - - * lib/checkunusedfunctions.cpp, test/testunusedfunctions.cpp: Fixed - #867 (unused member function warning) - -2009-10-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: uninitialized variables: - fixed false positive when switch is used - -2009-10-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Uninitialized pointers: - It's allowed to dereference uninitialized non-pointer variables - -2009-10-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: Fixed #874 (false - positive: uninitialized variable) - -2009-10-30 Daniel Marjamäki - - * lib/checkother.cpp, test/testother.cpp: uninitialized variables: - fixed false positives for member variables - -2009-10-29 Daniel Marjamäki - - * test/testother.cpp: uninitialized variables: Added TODO testcase - for removing false positives - -2009-10-29 Daniel Marjamäki - - * lib/checkother.cpp, lib/checkother.h, test/testother.cpp: - uninitialized variables: added check - -2009-10-29 Reijo Tomperi - - * lib/tokenize.cpp, test/testsimplifytokens.cpp: Fix #870 (The - CheckClass::getVarList method detects 'const' as a variable name.) - http://sourceforge.net/apps/trac/cppcheck/ticket/870 - -2009-10-29 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #868 - (False positive - buffer access out of bounds in for loop) - http://sourceforge.net/apps/trac/cppcheck/ticket/868 - -2009-10-28 Reijo Tomperi - - * lib/checkbufferoverrun.cpp: Minor fix to previous commit - -2009-10-28 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Modify - CheckBufferOverrun::checkGlobalAndLocalVariable() to use varid only. - Also add some TODO test cases. - -2009-10-28 Daniel Marjamäki - - * all.pro, cppcheck.pro: Renamed top-level cppcheck.pro to all.pro - -2009-10-28 Daniel Marjamäki - - * cli/cppcheck.vcproj, test/test.vcproj: Visual Studio: Manually - edited the vcproj files. The absolute paths were replaced with - relative paths - -2009-10-28 Daniel Marjamäki - - * cppcheck.pro: Restructuring: updated the top cppcheck.pro file - -2009-10-28 Daniel Marjamäki - - * cli/cli.pro, cli/cppcheck.vcproj, cli/resource.h, cppcheck.sln, - cppcheck.vcproj, gui/gui.pro, lib/lib.pri, lib/resource.h, - test/test.vcproj, testrunner.sln, testrunner.vcproj: Restructuring: - Updated the Visual Studio project files. They are now generated by - qmake - -2009-10-27 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - Detect simple leak - -2009-10-27 Kimmo Varis - - * win_installer/build1.bat, win_installer/build2.bat: Make switching - QT version easier in build batch files. - -2009-10-27 Daniel Marjamäki - - * lib/errorlogger.cpp: Fixed #854 (invalid XML generated for folders - containing &) - -2009-10-27 Daniel Marjamäki - - * lib/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #860 (Improve - double delete detection) - -2009-10-27 Daniel Marjamäki - - * cppcheck.cbproj: Restructuring: Updated the Borland C++ project - file - -2009-10-27 Daniel Marjamäki - - * cli/cli.pro, cli/cppcheck.rc, gui/gui.pro, lib/cppcheck.rc, - win_installer/build.proj, win_installer/build1.bat, - win_installer/build2.bat, win_installer/build3.bat: Restructuring: - updated win_installer scripts - -2009-10-27 Reijo Tomperi - - * test/testbufferoverrun.cpp: Test case for #863 (false positive - memset array of pointers) - http://sourceforge.net/apps/trac/cppcheck/ticket/863 - -2009-10-27 Reijo Tomperi - - * lib/checkbufferoverrun.cpp, test/testsimplifytokens.cpp: Fix #863 - (false positive memset array of pointers) - http://sourceforge.net/apps/trac/cppcheck/ticket/863 Also fix test - cases for 64 bit systems. - -2009-10-27 Daniel Marjamäki - - * lib/settings.cpp, lib/settings.h: simple optimisation - -2009-10-27 Reijo Tomperi - - * cppcheck.vcproj, testrunner.vcproj: Apply patches from polygon7 to - fix #857 (Compilation error after refactoring the folder structure) - http://sourceforge.net/apps/trac/cppcheck/ticket/857 - -2009-10-27 Reijo Tomperi - - * lib/cppcheck.cpp, tools/dmake.cpp: astyle fix - -2009-10-26 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: Restructuring: Updated the dependency - walker - -2009-10-26 Daniel Marjamäki - - * test/test.pro: Restructuring: Updated test/test.pro - -2009-10-26 Daniel Marjamäki - - * lib/cppcheck.cpp, lib/cppcheck.h: Refactoring: Changed pointer to - reference - -2009-10-26 Daniel Marjamäki - - * doxyfile: Restructuring: Doxyfile updated - -2009-10-26 Daniel Marjamäki - - * generate_coverage_report: Restructuring: Generate coverage report - -2009-10-25 Reijo Tomperi - - * cppcheck.cbp: codeblocks project file updated - -2009-10-25 Daniel Marjamäki - - * Makefile: Refactoring: Updated Makefile - -2009-10-25 Daniel Marjamäki - - * cli/cli.pro, cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h, - cli/main.cpp, cli/threadexecutor.cpp, cli/threadexecutor.h, - lib/cppcheckexecutor.cpp, lib/cppcheckexecutor.h, lib/lib.pri, - lib/threadexecutor.cpp, lib/threadexecutor.h: restructuring the - folder structure - -2009-10-25 Reijo Tomperi - - * cppcheck.cbp, gui/mainwindow.cpp, lib/cppcheck.cpp, - lib/cppcheck.h: Refactoring: Make Cppcheck::version() static Update - codeblocks projectfile - -2009-10-25 Daniel Marjamäki - - * Makefile, cli/cli.pro, cli/cppcheckexecutor.cpp, - cli/cppcheckexecutor.h, cli/main.cpp, cli/threadexecutor.cpp, - cli/threadexecutor.h, gui/checkthread.h, gui/gui.pro, - gui/mainwindow.cpp, gui/resultsview.h, gui/threadhandler.h, - gui/threadresult.h, lib/cppcheckexecutor.cpp, - lib/cppcheckexecutor.h, lib/lib.pri, lib/src.pri, lib/src.pro, - lib/threadexecutor.cpp, lib/threadexecutor.h: fixed qmake building - with new folder structure - -2009-10-25 Reijo Tomperi - - * man/cppcheck.1.xml: Fixed typo in man page - -2009-10-25 Daniel Marjamäki - - * Makefile, cli/cppcheckexecutor.cpp, cli/cppcheckexecutor.h, - cli/main.cpp, cli/threadexecutor.cpp, cli/threadexecutor.h, - lib/check.h, lib/checkautovariables.cpp, lib/checkautovariables.h, - lib/checkbufferoverrun.cpp, lib/checkbufferoverrun.h, - lib/checkclass.cpp, lib/checkclass.h, - lib/checkdangerousfunctions.cpp, lib/checkdangerousfunctions.h, - lib/checkexceptionsafety.cpp, lib/checkexceptionsafety.h, - lib/checkheaders.cpp, lib/checkheaders.h, lib/checkmemoryleak.cpp, - lib/checkmemoryleak.h, lib/checkother.cpp, lib/checkother.h, - lib/checkstl.cpp, lib/checkstl.h, lib/checkunusedfunctions.cpp, - lib/checkunusedfunctions.h, lib/classinfo.h, lib/cppcheck.cpp, - lib/cppcheck.h, lib/cppcheck.rc, lib/errorlogger.cpp, - lib/errorlogger.h, lib/filelister.cpp, lib/filelister.h, - lib/mathlib.cpp, lib/mathlib.h, lib/preprocessor.cpp, - lib/preprocessor.h, lib/resource.h, lib/settings.cpp, - lib/settings.h, lib/src.pri, lib/src.pro, lib/token.cpp, - lib/token.h, lib/tokenize.cpp, lib/tokenize.h, runastyle, - runastyle.bat, src/check.h, src/checkautovariables.cpp, - src/checkautovariables.h, src/checkbufferoverrun.cpp, - src/checkbufferoverrun.h, src/checkclass.cpp, src/checkclass.h, - src/checkdangerousfunctions.cpp, src/checkdangerousfunctions.h, - src/checkexceptionsafety.cpp, src/checkexceptionsafety.h, - src/checkheaders.cpp, src/checkheaders.h, src/checkmemoryleak.cpp, - src/checkmemoryleak.h, src/checkother.cpp, src/checkother.h, - src/checkstl.cpp, src/checkstl.h, src/checkunusedfunctions.cpp, - src/checkunusedfunctions.h, src/classinfo.h, src/cppcheck.cpp, - src/cppcheck.h, src/cppcheck.rc, src/cppcheckexecutor.cpp, - src/cppcheckexecutor.h, src/errorlogger.cpp, src/errorlogger.h, - src/filelister.cpp, src/filelister.h, src/main.cpp, - src/mathlib.cpp, src/mathlib.h, src/preprocessor.cpp, - src/preprocessor.h, src/resource.h, src/settings.cpp, - src/settings.h, src/src.pri, src/src.pro, src/threadexecutor.cpp, - src/threadexecutor.h, src/token.cpp, src/token.h, src/tokenize.cpp, - src/tokenize.h, test/testautovariables.cpp, - test/testbufferoverrun.cpp, test/testcharvar.cpp, - test/testclass.cpp, test/testconstructors.cpp, - test/testcppcheck.cpp, test/testdangerousfunctions.cpp, - test/testdivision.cpp, test/testexceptionsafety.cpp, - test/testfilelister.cpp, test/testincompletestatement.cpp, - test/testmathlib.cpp, test/testmemleak.cpp, test/testother.cpp, - test/testpreprocessor.cpp, test/testredundantif.cpp, - test/testsimplifytokens.cpp, test/teststl.cpp, test/testsuite.h, - test/testtoken.cpp, test/testtokenize.cpp, - test/testunusedfunctions.cpp, test/testunusedprivfunc.cpp, - test/testunusedvar.cpp, tools/dmake.cpp: refactoring the folder - structure - -2009-10-25 Daniel Marjamäki - - * Makefile: Makefile: Updated for the release - -2009-10-25 Daniel Marjamäki - - * Changelog: Changelog: updated the Changelog - -2009-10-25 Daniel Marjamäki - - * createrelease, src/cppcheck.cpp, src/main.cpp, - win_installer/cppcheck.iss, win_installer/cppcheck.wxs: updated - version to 1.38 - -2009-10-24 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #253 - (MemoryLeakInClass: False positive when memory is released in - function, which is called from destructor) - -2009-10-24 Daniel Marjamäki - - * src/checkunusedfunctions.cpp: don't report that the function - WinMain is unused - -2009-10-23 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: Added - and fixed testcase TestMemleakInClass::class13 - -2009-10-22 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #851 - (Tokenizer: sizeof(*a) returns incorrect result) - -2009-10-22 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #428 (Memory - leak not detected with class) - -2009-10-21 Daniel - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #844 - (Tokenizer: Simplify 'sizeof *ptr' correctly) - -2009-10-21 Daniel - - * src/checkstl.cpp, src/checkstl.h: Fixed #830 (id 'pushback' used - twice) - -2009-10-21 Daniel - - * cppcheck.pro: Removed toplevel qmake pro file that doesn't work - -2009-10-21 Daniel - - * cppcheck.geany: removed geany project file - -2009-10-20 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #767 - (Tokenizer: Known variable variable not simplified) - http://sourceforge.net/apps/trac/cppcheck/ticket/767 - -2009-10-20 Daniel - - * src/checkother.cpp, test/testother.cpp: Fixed #839 (False - positive: possible null pointer dereference after new) - -2009-10-20 Reijo Tomperi - - * src/checkbufferoverrun.cpp: Minor refactoring. - -2009-10-20 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Improved - countSprintfLength() to detect more errors with %d. Fixed some - errors from test cases. Added more test cases. - -2009-10-19 Daniel Marjamäki - - * Makefile, src/checkexceptionsafety.cpp, - src/checkexceptionsafety.h, test/testexceptionsafety.cpp: Fixed by - #828 (Exception Safety: No throwing in destructors) - -2009-10-19 Daniel Marjamäki - - * src/checkclass.cpp: David Binderman: Remove dead variable - -2009-10-19 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, test/testother.cpp: Null - pointers: Detect code where the assignment is conditional - -2009-10-18 Daniel Marjamäki - - * src/checkstl.cpp, src/checkstl.h, test/teststl.cpp: STL: checking - that containers are matching - -2009-10-18 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #827 - (Tokenizer: sizeof is incorrectly simplified) - -2009-10-18 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #449 (false - postive:: resource leak when using errno) - -2009-10-18 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #826 - (False positive: sprintf with "f%s") - http://sourceforge.net/apps/trac/cppcheck/ticket/826 - -2009-10-18 Reijo Tomperi - - * src/check.h, src/cppcheck.cpp, src/tokenize.cpp, src/tokenize.h: - Fix #825 (Error with id syntaxError not in list printed with - --errorlist) http://sourceforge.net/apps/trac/cppcheck/ticket/825 - -2009-10-17 Reijo Tomperi - - * src/checkbufferoverrun.cpp: Fix segmentation fault with - --errorlist - -2009-10-17 Daniel Marjamäki - - * src/checkother.cpp, test/testunusedvar.cpp: unused struct member: - bail out when casting - -2009-10-17 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Pointer Aliasing: - Handle pointer aliasing through the - Tokenizer::simplifyKnownVariables - -2009-10-17 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, test/testunusedvar.cpp: - Unused struct members: bail out upon casting - -2009-10-17 Daniel Marjamäki - - * gui/mainwindow.cpp, src/cppcheck.cpp, src/cppcheck.h: fixed - compiler error when building gui - -2009-10-17 Daniel Marjamäki - - * src/cppcheck.cpp, src/cppcheck.h, src/cppcheckexecutor.cpp: Fixed - #824 (Exit code of cppcheck) - -2009-10-15 Daniel Marjamäki - - * src/checkstl.cpp, src/checkstl.h, test/teststl.cpp: stl: after - vector::insert, iterators may become invalid - -2009-10-15 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #823 - (Buffer overrun with memcpy) - -2009-10-15 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h: fixed doxygen - warning messages - -2009-10-14 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #821 - (Preprocessor: Wrong stringification in macros) - -2009-10-14 Daniel Marjamäki - - * src/cppcheck.cpp: Fixed #820 (Borland C++: Compiler errors because - of time_t) - -2009-10-14 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Buffer - overrun errors behind function call should be possible errors. - -2009-10-13 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Move - buffer overrun errors behind --all Fix one possible error issue with - arrayindexoutofbounds Make sure that possible errors are not shown - without --all - -2009-10-13 Reijo Tomperi - - * : commit 4036dd5effb90957b2b9b7ffb861344215757953 Author: Reijo - Tomperi Date: Tue Oct 13 22:39:51 - 2009 +0300 - -2009-10-13 Daniel Marjamäki - - * src/checkstl.cpp, test/teststl.cpp: stl: better checking for - invalid iterator after push_back - -2009-10-13 Reijo Tomperi - - * src/settings.cpp, src/settings.h: Fix #815 (rev. 47e9d1: - compilation error) - http://sourceforge.net/apps/trac/cppcheck/ticket/815 - -2009-10-13 Reijo Tomperi - - * src/cppcheck.cpp: Undocumented --showtime option should now work - on other platforms also. Improved --showtime to give more - information. - -2009-10-13 Reijo Tomperi - - * gui/mainwindow.cpp, gui/threadhandler.cpp, gui/threadhandler.h: - Fix #455 (Recheck is enabled when no previous results available) - http://sourceforge.net/apps/trac/cppcheck/ticket/455 - -2009-10-12 Daniel Marjamäki - - * : commit ed3860a0a74ffcd325d0380130de83e703f82659 Author: Daniel - Marjamäki Date: Mon Oct 12 - 21:36:28 2009 +0200 - -2009-10-12 Reijo Tomperi - - * readme.txt: Fix #814 (Improvements for readme.txt) - http://sourceforge.net/apps/trac/cppcheck/ticket/814 - -2009-10-11 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #812 - (False positive: sprintf with "%.4s" with --all) - http://sourceforge.net/apps/trac/cppcheck/ticket/812 - -2009-10-11 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #694 - (False (possible error) Buffer overrun with %-1s) ashim2009 did most - of the work http://sourceforge.net/apps/trac/cppcheck/ticket/694 - -2009-10-11 Daniel Marjamäki - - * webreport.sh: script for creating web content - -2009-10-11 Reijo Tomperi - - * src/checkother.cpp, src/checkother.h: Refactoring: Split null - pointer check into 4 smaller functions. - -2009-10-11 Reijo Tomperi - - * src/checkother.cpp, test/testdivision.cpp: Fix #810 (false - positive: Division with signed and unsigned operators) - http://sourceforge.net/apps/trac/cppcheck/ticket/810 - -2009-10-11 Reijo Tomperi - - * src/tokenize.cpp: Getting rid of warning C4267: 'return' : - conversion from 'size_t' to 'unsigned int' - -2009-10-11 Reijo Tomperi - - * src/preprocessor.cpp: Getting rid of compiler warning: C4310: cast - truncates constant value - -2009-10-11 Daniel Marjamäki - - * win_installer/build.proj, win_installer/build1.bat, - win_installer/build2.bat: win_installer: Added build scripts - -2009-10-11 Daniel Marjamäki - - * win_installer/gui.wxs, win_installer/productInfo.wxi: - win_installer: minor tweaks - -2009-10-10 Daniel Marjamäki - - * htdocs/build.bat: a simple build script for building devinfo.html - -2009-10-10 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix #808 - (Segfault in Preprocessor) - http://sourceforge.net/apps/trac/cppcheck/ticket/808 - -2009-10-10 Daniel Marjamäki - - * : commit d2e2b1d9feb1e826c7118e1c8c3f85ae89895e38 Author: Daniel - Marjamäki Date: Sat Oct 10 - 22:10:33 2009 +0200 - -2009-10-10 Reijo Tomperi - - * src/preprocessor.cpp: Fix compiler warning warning C4512: - 'PreprocessorMacro' : assignment operator could not be generated - -2009-10-10 Reijo Tomperi - - * src/preprocessor.cpp: Get rid of compiler warning warning C4127: - conditional expression is constant - -2009-10-10 Reijo Tomperi - - * src/tokenize.cpp, src/tokenize.h: Get rid of a compiler warning. - conversion from 'size_t' to 'int', possible loss of data - -2009-10-10 Slava Semushin - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #809 - (Tokenizer: don't replace sizeof() of unknown type to zero) http://sourceforge.net/apps/trac/cppcheck/ticket/809 - -2009-10-10 Daniel Marjamäki - - * test/testtokenize.cpp: Added testcase for #807 (cppcheck crashes - scanning ruby 1.9.1) - -2009-10-10 Daniel Marjamäki - - * src/preprocessor.cpp: minor refactoring - -2009-10-10 Daniel Marjamäki - - * src/checkbufferoverrun.cpp: Borland C++: Fixed compiler errors - -2009-10-09 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed #806 (cppcheck - crashes scanning openssl) - -2009-10-09 Daniel Marjamäki - - * src/tokenize.cpp: jonas054: fixed #807 (cppcheck crashes scanning - ruby 1.9.1) - -2009-10-08 Daniel Marjamäki - - * src/checkmemoryleak.cpp: memory leaks: minor cleanups - -2009-10-08 Daniel Marjamäki - - * src/checkmemoryleak.cpp: optimisation: made the memory leaks - checking faster - -2009-10-08 Daniel Marjamäki - - * src/cppcheck.cpp: optimisation: removed duplicate call of - Tokenizer::setVarId - -2009-10-08 Reijo Tomperi - - * man/cppcheck.1.xml, src/cppcheck.cpp, src/settings.cpp, - src/settings.h: Fix #674 (Feature request: error filtering) - --suppressions argument added to CLI - http://sourceforge.net/apps/trac/cppcheck/ticket/674 - -2009-10-08 Reijo Tomperi - - * test/testbufferoverrun.cpp: More test cases for sprintf counter - -2009-10-08 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: sprintf - counter improvements - -2009-10-08 Reijo Tomperi - - * src/checkother.cpp, test/testother.cpp: Fix #802 (possible null - pointer dereference reported for reference) - http://sourceforge.net/apps/trac/cppcheck/ticket/802 - -2009-10-07 Reijo Tomperi - - * src/checkstl.cpp: Use var id instead of var name in check stl. - -2009-10-07 Reijo Tomperi - - * src/checkstl.cpp: Use varid instead of varname in stl check. - -2009-10-07 Reijo Tomperi - - * src/checkother.cpp, src/checkstl.cpp, test/testother.cpp, - test/teststl.cpp: Optimize speed and fix one false positive with stl - checks. - -2009-10-07 Reijo Tomperi - - * test/testbufferoverrun.cpp: Added more test cases for sprintf - counter - -2009-10-07 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Ashim - Kapoor: updated the counter (#694) - -2009-10-07 Reijo Tomperi - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Refactoring: Moved some code into a new - function. Renamed count->countSprintfLength. Added code to collect - sprintf parameters. Added a few TODO test cases. - -2009-10-07 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #801 - (Tokenizer: Simplify sizeof for function parameters) - http://sourceforge.net/apps/trac/cppcheck/ticket/801 - -2009-10-07 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #487 - (Tokenizer: Simplify sizeof for string array and string pointer) - http://sourceforge.net/apps/trac/cppcheck/ticket/487 - -2009-10-07 Reijo Tomperi - - * src/checkbufferoverrun.cpp, src/checkmemoryleak.cpp, - src/tokenize.cpp, src/tokenize.h, test/testsimplifytokens.cpp: - Refactored sizeof simplification and fixed one TODO assert. - -2009-10-07 Reijo Tomperi - - * src/checkother.cpp, test/testother.cpp: Detect referenced by value - errors for std::map also. - -2009-10-06 Reijo Tomperi - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fix #388 (resource - leak not detected, allocation through function call) - http://sourceforge.net/apps/trac/cppcheck/ticket/388 - -2009-10-06 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #796 - (segmentation fault while scanning) - http://sourceforge.net/apps/trac/cppcheck/ticket/796 - -2009-10-06 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: don't - write errors for static member variables - -2009-10-06 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, test/testother.cpp: Fix #797 - (false positive: variable scope when using function call) - -2009-10-06 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #575 - (Array index out of bounds check: get address of one-past-the-end - array is legal) http://sourceforge.net/apps/trac/cppcheck/ticket/575 - -2009-10-06 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #580 (double - free not found) http://sourceforge.net/apps/trac/cppcheck/ticket/580 - -2009-10-06 Reijo Tomperi - - * test/testsimplifytokens.cpp, test/testtokenize.cpp: Moved some - test cases from testtokenize into testsimplifytokens and added one - TODO case. - -2009-10-06 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix #795 - (Preprocessor: Incorrect handling of #if (A) || (B)) - http://sourceforge.net/apps/trac/cppcheck/ticket/795 - -2009-10-06 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix #765 (divsion by zero - not detected in std::cout stream) - http://sourceforge.net/apps/trac/cppcheck/ticket/765 - -2009-10-05 Reijo Tomperi - - * src/preprocessor.cpp: Removed variable that wasn't used. - -2009-10-05 Reijo Tomperi - - * src/preprocessor.cpp: Replace substr() with compare() to speed up - preprocessing. See #762 (version 1.37 of cppcheck runs extremely - slowly on windows) - http://sourceforge.net/apps/trac/cppcheck/ticket/762 - -2009-10-05 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #794 - (Floating point exception on CheckBufferOverrun) - http://sourceforge.net/apps/trac/cppcheck/ticket/794 - -2009-10-05 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #365 (Improve - simplifyQuestionMark() in tokenize.cpp) - http://sourceforge.net/apps/trac/cppcheck/ticket/365 - -2009-10-05 Reijo Tomperi - - * src/tokenize.cpp, src/tokenize.h: Refactoring: Remove - findClosing(). It is replaced by Token::link(). - -2009-10-05 Reijo Tomperi - - * src/checkother.cpp, test/testother.cpp: Fix #771 (False positive. - Null pointer dereference in a switch case) - http://sourceforge.net/apps/trac/cppcheck/ticket/771 - -2009-10-05 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix - simplifyRedundantParanthesis() to work after '}' - -2009-10-05 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #776 - (Tokenizer: remove useless brackets around variable assignment) - http://sourceforge.net/apps/trac/cppcheck/ticket/776 - -2009-10-05 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #778 - (Tokenizer: impove simplification inside if()) - http://sourceforge.net/apps/trac/cppcheck/ticket/778 - -2009-10-05 Reijo Tomperi - - * src/checkother.cpp, test/testother.cpp: Fix #793 (Improve - passedByValue check) - http://sourceforge.net/apps/trac/cppcheck/ticket/793 - -2009-10-05 Reijo Tomperi - - * generate_coverage_report: Better cleanup for coverage script. - -2009-10-05 Reijo Tomperi - - * generate_coverage_report: Add script generate_coverage_report for - generating test coverage report using gcov and lcov - -2009-10-05 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #777 - (Tokenizer: double casting simplified incorrectly) - http://sourceforge.net/apps/trac/cppcheck/ticket/777 - -2009-10-04 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #784 - (Tokenizer: Simplify 2[a] -> a[2]) - http://sourceforge.net/apps/trac/cppcheck/ticket/784 - -2009-10-04 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #789 (false - positive: resource leak reported when using for loop) - -2009-10-04 Daniel Marjamäki - - * src/checkmemoryleak.cpp: Fixed #786 (memleak: segmentation fault - for 'if TRACE_ON(x)') - -2009-10-04 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - Minor fixes (#772) - -2009-10-04 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #785 (False - positive: resource leak of extern FILE*) - -2009-10-04 Daniel Marjamäki - - * src/checkother.h: doc: fixed linebreak in previous commit - 6aea2faacd - -2009-10-04 Daniel Marjamäki - - * src/checkother.h: doc: refactoring of the docs for CheckOther - -2009-10-04 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h: Removed - CheckOther::warningIf - -2009-10-04 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #727 (False - positive: Resource leak when release is done inside function call) - -2009-10-04 Slava Semushin - - * src/checkautovariables.cpp, src/checkautovariables.h: Fixed #783 - (Refactoring: autoVariables error message is hard coded in 3 - locations) http://sourceforge.net/apps/trac/cppcheck/ticket/783 - -2009-10-04 Daniel Marjamäki - - * src/tokenize.cpp: astyle formatting - -2009-10-04 Slava Semushin - - * test/testother.cpp: Fixed #782 (Checks are missing test cases) http://sourceforge.net/apps/trac/cppcheck/ticket/782 - -2009-10-04 Slava Semushin - - * src/preprocessor.h: src/preprocessor.h: fixed comment. removeParantheses() doesn't throws exception. Correction for 1a48f869c84018d73fd63bf59263224b019a5997 commit. No code change. - -2009-10-04 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/tokenize.cpp, - test/testsimplifytokens.cpp, test/testtokenize.cpp: use '<' - comparisons instead of '>' (#610) - -2009-10-04 Daniel Marjamäki - - * src/preprocessor.cpp, src/preprocessor.h, - test/testpreprocessor.cpp: Fixed #772 (Preprocessor: #if(A) is not - seen equal to #if A) - -2009-10-03 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #733 (New - check: locking & unlocking mutex and semaphore variables) - -2009-10-03 Slava Semushin - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #780 - (Tokenizer: replace typedef for pointers to struct) http://sourceforge.net/apps/trac/cppcheck/ticket/780 - -2009-10-03 Slava Semushin - - * src/token.cpp: Token::Match(): made message about bug more - verbose. - -2009-10-03 Slava Semushin - - * src/checkbufferoverrun.cpp: Fixed #775 (###### If you see this, - there is a bug ###### Token::Match() - varid was 0) http://sourceforge.net/apps/trac/cppcheck/ticket/775 - -2009-10-03 Slava Semushin - - * src/tokenize.cpp: Tokenizer::simplifyVarDecl(): join 2 conditions. No functional change. - -2009-10-03 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed #770 (Tokenizer: - Var id not set for static variables in some cases) http://sourceforge.net/apps/trac/cppcheck/ticket/770 - -2009-10-03 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/tokenize.cpp: Borland C++: Fixed - compiler errors - -2009-10-02 Reijo Tomperi - - * src/preprocessor.cpp: Attempt to speed up preprocessing on - macro-in-macro situations. See #762 (version 1.37 of cppcheck runs - extremely slowly on windows) - http://sourceforge.net/apps/trac/cppcheck/ticket/762 - -2009-10-02 Reijo Tomperi - - * test/testtokenize.cpp: TODO test cases - TestTokenizer::vardec_static added - -2009-10-02 Reijo Tomperi - - * src/tokenize.cpp: Abort comma simplification when ", %num%" is - detected. This increases speed a lot in some rare situations. - -2009-10-01 Daniel Marjamäki - - * test/testmemleak.cpp: memory leaks: refactoring unit tests - -2009-10-01 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h, test/testtokenize.cpp: Fixed - #679 (False positive: Unused private function produced by exception - specification) - -2009-10-01 Daniel Marjamäki - - * gui/application.ui: eliedebrauwer: fix typo (#755) - -2009-10-01 Daniel Marjamäki - - * gui/cppcheck_nl.ts: eliedebrauwer: dutch translation (#756) - -2009-10-01 Daniel Marjamäki - - * gui/gui.pro, gui/translationhandler.cpp: eliedebrauwer: dutch - translation (#756) - -2009-10-01 Reijo Tomperi - - * man/cppcheck.1.xml: Minor fix to man page - -2009-10-01 Reijo Tomperi - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fix #421 (Memory - leak not found when typeid() is used.) - http://sourceforge.net/apps/trac/cppcheck/ticket/421 - -2009-10-01 Reijo Tomperi - - * src/checkbufferoverrun.cpp: Trivial refactoring - -2009-10-01 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #741 - (False positive: Buffer overrun with -a when index increased in - multiple locations) - http://sourceforge.net/apps/trac/cppcheck/ticket/741 - -2009-10-01 Reijo Tomperi - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Fix #419 (missleading buffer overrun) - http://sourceforge.net/apps/trac/cppcheck/ticket/419 - -2009-10-01 Reijo Tomperi - - * src/tokenize.cpp: Removed dead code created by previous commit - -2009-10-01 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #763 - (Tokenizer: Goto incorrectly simplified) - http://sourceforge.net/apps/trac/cppcheck/ticket/763 - -2009-09-30 Daniel Marjamäki - - * test/testmemleak.cpp: memory leaks: fixed TODO_ASSERT_EQUALS - -2009-09-30 Reijo Tomperi - - * src/tokenize.cpp, test/testmemleak.cpp, test/testother.cpp, - test/testsimplifytokens.cpp, test/testtokenize.cpp: Fix #745 (false - positive: possible null pointer dereference , while) - http://sourceforge.net/apps/trac/cppcheck/ticket/745 - -2009-09-30 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #744 - (False positive: (possible error) Array index out of bounds) - http://sourceforge.net/apps/trac/cppcheck/ticket/744 - -2009-09-30 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix #759 (Tokenizer: - Incorrect var id when two variables with same name) - http://sourceforge.net/apps/trac/cppcheck/ticket/759 - -2009-09-30 Reijo Tomperi - - * src/tokenize.cpp, src/tokenize.h, test/testsimplifytokens.cpp: Fix - #761 (Tokenizer: typedef inside class is incorrectly simplified) - http://sourceforge.net/apps/trac/cppcheck/ticket/761 - -2009-09-30 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #760 - (Tokenizer: Goto not simplified) - http://sourceforge.net/apps/trac/cppcheck/ticket/760 - -2009-09-30 Reijo Tomperi - - * test/testsimplifytokens.cpp: Added TODO test cases: - simplifyTypedef, simplifyTypedef2, simplifyTypedef3 - -2009-09-30 Reijo Tomperi - - * src/checkother.cpp, test/testother.cpp: Fix #750 (cppcheck wants - variable outside do-loop to be only inside loop) - http://sourceforge.net/apps/trac/cppcheck/ticket/750 Fix #758 (False - positive on variable scope with boost foreach) - http://sourceforge.net/apps/trac/cppcheck/ticket/758 - -2009-09-29 Reijo Tomperi - - * src/tokenize.cpp: Changed simplifyConditionOperator() to create - also {} around if and else Fixed validate() in tokenizer. - -2009-09-29 Daniel Marjamäki - - * test/testbufferoverrun.cpp: added a TODO_ASSERT_EQUALS for the - counter - -2009-09-29 Reijo Tomperi - - * src/checkclass.cpp, test/testclass.cpp, test/testconstructors.cpp: - Fix #757 (Change message: (style) The class 'KClass' has no - constructor) http://sourceforge.net/apps/trac/cppcheck/ticket/757 - -2009-09-29 Slava Semushin - - * src/tokenize.cpp: Tokenizer::tokenize(): removed useless - const_cast. No functional change. - -2009-09-29 Reijo Tomperi - - * test/testbufferoverrun.cpp: TODO test case for count() added - -2009-09-29 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Ashim - Kapoor: deal with backspace better (#694) - -2009-09-29 Reijo Tomperi - - * test/testtokenize.cpp: Fix comment in test case - -2009-09-29 Reijo Tomperi - - * src/checkother.h, test/testother.cpp: Check nullpointer check is - now executed without --style flag Added TODO test case for - nullpointer check - -2009-09-29 Reijo Tomperi - - * src/checkother.cpp, test/testother.cpp: Fix #751 (if-condition - considered redundant even with else-branch) - http://sourceforge.net/apps/trac/cppcheck/ticket/751 Fix also other - issue with if(a.b) delete c.b; Fix also other issue with if(a.b.c) - delete a.b.c; - -2009-09-28 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #746 (False - positive, Memory leak when goto is used) - -2009-09-28 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: fixed - a TODO_ASSERT_EQUALS for a false positive - -2009-09-28 Reijo Tomperi - - * man/cppcheck.1.xml, src/cppcheck.cpp: Fix #739 (Pre-defined output - format templates) - http://sourceforge.net/apps/trac/cppcheck/ticket/739 Patch from - lanurmi. Slightly modified by me. - -2009-09-28 Reijo Tomperi - - * src/tokenize.cpp, src/tokenize.h, test/testtokenize.cpp: Fix #754 - (Tokenizer: transform modifier "signed" to "int") - http://sourceforge.net/apps/trac/cppcheck/ticket/754 Also fix int - unsigned -> unsigned int - -2009-09-28 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed #753 (Tokenizer: - don't simplify variables inside do {} while loop) http://sourceforge.net/apps/trac/cppcheck/ticket/753 - -2009-09-27 Daniel Marjamäki - - * test/testbufferoverrun.cpp: Refactoring the unit testing of format - strings - -2009-09-27 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #728 (False - positive, resource leak, when released in a loop) - -2009-09-27 Slava Semushin - - * src/checkbufferoverrun.cpp: src/checkbufferoverrun.cpp: fixed - regression. test suite was broken after my - e8c83613e4bcc95b7c3d91d5c71f4e2363a5cdf3 commit. - -2009-09-27 Slava Semushin - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #740 - (False positive, buffer overrun with --all) Regression since 07f41f4563fc138b527af6ce153433a661250020 commit. http://sourceforge.net/apps/trac/cppcheck/ticket/740 - -2009-09-27 Slava Semushin - - * src/checkbufferoverrun.cpp: src/checkbufferoverrun.cpp: removed - useless semicolon. No functional change. - -2009-09-27 Slava Semushin - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #738 - (False Buffer overrun with -a when i is increased by more than 1 - inside loop body) http://sourceforge.net/apps/trac/cppcheck/ticket/738 - -2009-09-27 Reijo Tomperi - - * cppcheck.cbp, gui/aboutdialog.cpp, gui/aboutdialog.h, - gui/applicationdialog.cpp, gui/applicationdialog.h, - gui/applicationlist.cpp, gui/applicationlist.h, - gui/checkthread.cpp, gui/checkthread.h, gui/common.h, - gui/csvreport.cpp, gui/csvreport.h, gui/fileviewdialog.cpp, - gui/fileviewdialog.h, gui/main.cpp, gui/mainwindow.cpp, - gui/mainwindow.h, gui/projectfile.cpp, gui/projectfile.h, - gui/report.cpp, gui/report.h, gui/resultstree.cpp, - gui/resultstree.h, gui/resultsview.cpp, gui/resultsview.h, - gui/settingsdialog.cpp, gui/settingsdialog.h, - gui/threadhandler.cpp, gui/threadhandler.h, gui/threadresult.cpp, - gui/threadresult.h, gui/translationhandler.cpp, - gui/translationhandler.h, gui/txtreport.cpp, gui/txtreport.h, - gui/xmlreport.cpp, gui/xmlreport.h, src/check.h, - src/checkautovariables.cpp, src/checkautovariables.h, - src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/checkclass.cpp, src/checkclass.h, - src/checkdangerousfunctions.cpp, src/checkdangerousfunctions.h, - src/checkheaders.cpp, src/checkheaders.h, src/checkmemoryleak.cpp, - src/checkmemoryleak.h, src/checkother.cpp, src/checkother.h, - src/checkstl.cpp, src/checkstl.h, src/checkunusedfunctions.cpp, - src/checkunusedfunctions.h, src/classinfo.h, src/cppcheck.cpp, - src/cppcheck.h, src/cppcheckexecutor.cpp, src/cppcheckexecutor.h, - src/errorlogger.cpp, src/errorlogger.h, src/filelister.cpp, - src/filelister.h, src/main.cpp, src/mathlib.cpp, src/mathlib.h, - src/preprocessor.cpp, src/preprocessor.h, src/settings.cpp, - src/settings.h, src/threadexecutor.cpp, src/threadexecutor.h, - src/token.cpp, src/token.h, src/tokenize.cpp, src/tokenize.h, - test/testautovariables.cpp, test/testbufferoverrun.cpp, - test/testcharvar.cpp, test/testclass.cpp, - test/testconstructors.cpp, test/testcppcheck.cpp, - test/testdangerousfunctions.cpp, test/testdivision.cpp, - test/testfilelister.cpp, test/testincompletestatement.cpp, - test/testmathlib.cpp, test/testmemleak.cpp, test/testother.cpp, - test/testpreprocessor.cpp, test/testredundantif.cpp, - test/testrunner.cpp, test/testsimplifytokens.cpp, test/teststl.cpp, - test/testsuite.cpp, test/testsuite.h, test/testtoken.cpp, - test/testtokenize.cpp, test/testunusedfunctions.cpp, - test/testunusedprivfunc.cpp, test/testunusedvar.cpp, - tools/dmake.cpp: Fix GPL comments in all files. ">." was missing - from the end. - -2009-09-27 Reijo Tomperi - - * src/cppcheck.cpp: Remove redundant comparison - -2009-09-27 Slava Semushin - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #714 - (False Buffer overrun with -a when i is increased by more than 1 in - a loop) http://sourceforge.net/apps/trac/cppcheck/ticket/714 - -2009-09-27 Reijo Tomperi - - * src/mathlib.cpp, src/mathlib.h, src/tokenize.cpp, src/tokenize.h, - test/testsimplifytokens.cpp: Fix #720 (String length for strings - like this "\x61" is calculated wrong) - http://sourceforge.net/apps/trac/cppcheck/ticket/720 - -2009-09-27 Slava Semushin - - * src/checkstl.cpp, test/teststl.cpp: Detects invalid iterator - inside for() when postfix form of increment used. - -2009-09-27 Slava Semushin - - * src/checkstl.cpp, test/teststl.cpp: Fixed #735 (Detects invalid - iterator after push_back() when iterator declared inside for()) http://sourceforge.net/apps/trac/cppcheck/ticket/735 - -2009-09-27 Slava Semushin - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Detect - buffer overruns when ?: use as sprintf() argument. - -2009-09-27 Slava Semushin - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #729 - (False positive: Buffer overrun when ? is used to select parameter) http://sourceforge.net/apps/trac/cppcheck/ticket/729 - -2009-09-26 Slava Semushin - - * src/token.cpp, test/testbufferoverrun.cpp, test/testtoken.cpp: - Fixed #731 (False positive, strcpy copying a buffer with a null - character) http://sourceforge.net/apps/trac/cppcheck/ticket/731 - -2009-09-26 Slava Semushin - - * src/checkbufferoverrun.cpp: CheckBufferOverrun::count(): commented - out debug message. Added in 3da779725db1de541fd5e0c14468b3b09e6234a6 commit. - -2009-09-26 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Ashim - Kapoor: handle %i,%f,%d,%x,%X better (#694) - -2009-09-26 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed #732 (Tokenizer: - Incorrect simplification) Regression since 58a9e05697b4585883bbc00153d1584d9247190f commit. http://sourceforge.net/apps/trac/cppcheck/ticket/732 - -2009-09-26 Daniel Marjamäki - - * src/checkstl.cpp, test/teststl.cpp: Fixed #710 (False positive: - invalid vector iterator after push_back) - -2009-09-26 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #718 (False - positive, resource leak when break in a loop before exit) - -2009-09-25 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix #730 - (False positive, buffer overrun with strncpy) - http://sourceforge.net/apps/trac/cppcheck/ticket/730 - -2009-09-25 Daniel Marjamäki - - * test/testmemleak.cpp: Memory leaks: Added a TODO assertion for a - false positive - -2009-09-25 Daniel Marjamäki - - * src/checkclass.cpp, test/testunusedprivfunc.cpp: Fixed #678 (False - positive: Unused private function produced by inner class) - -2009-09-25 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Ashim Kapoor: Added function that - returns minimum size of format strings (#694) - -2009-09-24 Reijo Tomperi - - * : commit 16e55f4f8908acbc47b76ad7f89c73df2dabd8fe Author: Reijo - Tomperi Date: Thu Sep 24 23:46:08 - 2009 +0300 - -2009-09-24 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: fixed - a TODO_ASSERT_EQUALS - -2009-09-24 Daniel Marjamäki - - * Makefile: Revert "Makefile: made it ready for release" This reverts commit 67d695437430e93a788a378cb73611ff49fb7229. - -2009-09-23 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #700 (False - positive: Memory leak) - -2009-09-23 Daniel Marjamäki - - * src/checkmemoryleak.h, src/tokenize.h, testrunner.vcproj: Replaced - UNIT_TESTING ifdef with _MSC_VER - -2009-09-23 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix #713 (Tokenizer: - Simplify 0L) http://sourceforge.net/apps/trac/cppcheck/ticket/713 - Use MathLib to handle other variations of 0. - -2009-09-23 Reijo Tomperi - - * src/cppcheckexecutor.h: Changed some CppcheckExecutor functions - and variables protected and virtual. - -2009-09-23 Daniel Marjamäki - - * win_installer/gui.wxs: added wix file for gui installation - -2009-09-23 Reijo Tomperi - - * readme.txt: cross compiling info added to readme.txt - -2009-09-23 Slava Semushin - - * src/tokenize.cpp, test/testsimplifytokens.cpp: - Tokenizer::simplifySizeof(): use Token::getStrLength(). Fixed wrong result when string contains escaped quotes. Correction for 0e729fedc070962d1023d4cd9ad9bdaa8e0eee30 commit. - -2009-09-23 Daniel Marjamäki - - * win_installer/cppcheck.wxs: Windows Installer: A simple installer - without the gui - -2009-09-23 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix #713 (Tokenizer: - Simplify 0L) http://sourceforge.net/apps/trac/cppcheck/ticket/713 - -2009-09-22 Daniel Marjamäki - - * Changelog: updated the Changelog - -2009-09-22 Daniel Marjamäki - - * Makefile: Makefile: made it ready for release - -2009-09-22 Daniel Marjamäki - - * createrelease, src/cppcheck.cpp, src/main.cpp, - win_installer/cppcheck.iss: updated version to 1.37 - -2009-09-22 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #716 - (segmentation fault: sizeof string) - -2009-09-22 Slava Semushin - - * test/testdivision.cpp: test/testdivision.cpp: fixed syntax errors - in TestDivision::division8 Before testrunner complains: ### Unlogged error at Tokenizer::syntaxError: Invalid number of - character ({) ### Unlogged error at Tokenizer::syntaxError: Invalid - number of character ({) ### Unlogged error at - Tokenizer::syntaxError: Invalid number of character ({) Broken since 36c7108a2821c477cf4d5eb9289281de8cd285ce commit where - test case was added. - -2009-09-22 Slava Semushin - - * src/tokenize.cpp: Tokenizer::createLinks(): fixed typo in comment. Since commit 1c01dd64f353d6872ec4b04867393aa283423445. - -2009-09-22 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #715 (False - positive: Resource leak when exit() after if loop) - -2009-09-22 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed #702 (If you see - this, there is a bug - varid was 0) - -2009-09-21 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix #706 (false - positive: invalid number of character ((), can't process file) - http://sourceforge.net/apps/trac/cppcheck/ticket/706 - -2009-09-20 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #701 (false - positive: Invalid deallocation) - http://sourceforge.net/apps/trac/cppcheck/ticket/701 - -2009-09-20 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix #703 (Tokenizer: - Create links for []) - http://sourceforge.net/apps/trac/cppcheck/ticket/703 - -2009-09-20 Reijo Tomperi - - * src/checkbufferoverrun.cpp: astyle fix - -2009-09-20 Daniel Marjamäki - - * Changelog: Changelog - -2009-09-20 Daniel Marjamäki - - * createrelease, src/cppcheck.cpp, src/main.cpp, - win_installer/cppcheck.iss, win_installer/cppcheck.wxs: Version: - 1.36 - -2009-09-20 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Additional fix for better - simplifying array declaration. Pointed out by hyd_danmar@ in IRC. Addressed to #696 - -2009-09-20 Slava Semushin - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #690 - (False positive: (possible error) Buffer overrun) http://sourceforge.net/apps/trac/cppcheck/ticket/690 - -2009-09-20 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed #696 (Tokenizer: - Simplify array declaration) http://sourceforge.net/apps/trac/cppcheck/ticket/696 - -2009-09-20 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix #667 - (Preprocessor does not handle macro inside macro correctly) - http://sourceforge.net/apps/trac/cppcheck/ticket/667 - -2009-09-19 Reijo Tomperi - - * test/testmemleak.cpp, test/testtokenize.cpp: astyle fix - -2009-09-19 Daniel Marjamäki - - * src/checkother.h, src/tokenize.cpp, test/testother.cpp: Fixed #673 - (False positive: null pointer dereference when dynamic cast is used) - -2009-09-19 Slava Semushin - - * src/token.cpp, src/token.h: Token::stringifyList(): removed const - modifier from parameter. const useless in this case because argument passed by value. No functional change. - -2009-09-19 Slava Semushin - - * test/testtokenize.cpp: test/testtokenize.cpp: refactoring code. - introduce and use simplifyKnownVariables() function - don't append leading space to result string with tokens No functional change. - -2009-09-19 Slava Semushin - - * src/preprocessor.h: Preprocessor: document that removeComments() - may throws exception. No code change. - -2009-09-19 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #688 (False positive in error category - when --all is used) - -2009-09-18 Vesa Pikki - - * gui/checkthread.cpp: Fixed ticket#687. Thread state is now - initialized to "Ready". - -2009-09-18 Daniel Marjamäki - - * src/preprocessor.cpp: Preprocessor: Skip BOM - -2009-09-17 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: Fixed #676 (The scope of - variable can actually not be limited) - -2009-09-16 Daniel Marjamäki - - * src/checkclass.cpp, test/testunusedprivfunc.cpp: Fixed #677 (False - positive: Unused private function produced by class member - initialization) - -2009-09-16 Daniel Marjamäki - - * src/checkclass.cpp, test/testclass.cpp: Fixed by #675 (false - positive: when operator is overloaded) - -2009-09-15 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #684 - (Tokenizer: (65536*72/100) incorrectly simplified to zero) - http://sourceforge.net/apps/trac/cppcheck/ticket/684 - -2009-09-15 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #671 (False - positive. Leak when loop is before exit) - -2009-09-15 Daniel Marjamäki - - * src/checkother.cpp, test/testdivision.cpp: Fixed #669 (possible - style without --all + false positives) - -2009-09-14 Reijo Tomperi - - * test/testpreprocessor.cpp: TODO test case for preprocessor macro - handling - -2009-09-14 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #658 - (Assertion 'begin != __null' failed) - -2009-09-14 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix #670 (Tokenizer: - Simplify '\0' into 0) - http://sourceforge.net/apps/trac/cppcheck/ticket/670 - -2009-09-13 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h: Tokenizer: Added a simple - validation function that we can use during debugging - -2009-09-13 Daniel Marjamäki - - * src/tokenize.cpp: simplifyTemplates: assert that braces and - parantheses are handled correctly - -2009-09-13 Slava Semushin - - * test/testsimplifytokens.cpp: TestSimplifyTokens::sizeof_(): don't - append leading space. No functional change. - -2009-09-13 Slava Semushin - - * src/token.cpp: Token::getStrLength(): fixed errors from valgrind. Correction for 13b2edd61e70d4d886e0cf5ba587aa8b2f9f2d3e commit. - -2009-09-13 Slava Semushin - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #645 - (Tokenizer::simplifyCasts() breaks link() if casts function) http://sourceforge.net/apps/trac/cppcheck/ticket/645 - -2009-09-13 Slava Semushin - - * test/testtoken.cpp: TestTOKEN::getStrLength(): allocate tok - variable in stack (instead of in heap) No functional change. - -2009-09-13 Slava Semushin - - * src/token.cpp: Token::getStrLength(): use Token::strValue(). No functional change. - -2009-09-13 Slava Semushin - - * src/token.cpp, src/token.h: Token::strValue(): added const - modifier. Correction for 241f585d34cb6f645d112c5e0cc54fe852c21c3b commit. No functional change. - -2009-09-13 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: - Tokenizer::simplifyMathFunctions(): change return type to void. Correction for 241f585d34cb6f645d112c5e0cc54fe852c21c3b commit. No functional change. - -2009-09-13 Daniel Marjamäki - - * src/check.h, src/checkbufferoverrun.cpp, src/checkmemoryleak.h, - src/cppcheck.cpp, src/preprocessor.cpp, src/threadexecutor.h, - src/tokenize.cpp, src/tokenize.h: Fixed #478 (Warnings in Visual - Studio build with -W4) - -2009-09-13 Daniel Marjamäki - - * test/testmemleak.cpp: memory leaks: added test assertion. simplify - ';alloc;exit;' to ';exit;' - -2009-09-12 Reijo Tomperi - - * src/token.cpp, src/token.h, src/tokenize.cpp, src/tokenize.h, - test/testsimplifytokens.cpp, test/testtoken.cpp: Fix #594 (division - by zero not detected when using atol or atof) - http://sourceforge.net/apps/trac/cppcheck/ticket/594 Simplify - atol("0") into 0 (and other atol() calls also) - -2009-09-12 Reijo Tomperi - - * man/cppcheck.1.xml: Fix #662 (Command line option --append not - documented) http://sourceforge.net/apps/trac/cppcheck/ticket/662 - -2009-09-12 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: minor - refactorings - -2009-09-12 Daniel Marjamäki - - * src/checkclass.cpp, src/checkclass.h, test/testclass.cpp: Fixed - #375 (new check: Detect when using 'this-x') - -2009-09-12 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #518 (False - positive for leaks when function from err()-family used) - -2009-09-12 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #644 - (Tokenizer::simplifyComma: Wrong simplification in cast) - -2009-09-11 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: More Fixing of - #635 (Preprocessor: remove 'asm(...)') - -2009-09-11 Reijo Tomperi - - * src/mathlib.cpp, test/testmathlib.cpp: Fix ticket #632 (Mathlib - isInt() identifies "330L" as not int) - http://sourceforge.net/apps/trac/cppcheck/ticket/632 - -2009-09-11 Daniel Marjamäki - - * src/preprocessor.cpp, src/preprocessor.h, - test/testpreprocessor.cpp: Simple fix for #635 (preprocessor: remove - 'asm(...)') - -2009-09-10 Reijo Tomperi - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h: Fixed some "is - passed by value" errors from cppcheck source. - -2009-09-10 Reijo Tomperi - - * src/tokenize.cpp, src/tokenize.h: Fix #656 (Improve - const-correctness) - http://sourceforge.net/apps/trac/cppcheck/ticket/656 Applied - slightly modified patch from elfring - -2009-09-09 Reijo Tomperi - - * test/testsimplifytokens.cpp: New test case in - TestSimplifyTokens::template_default_parameter - -2009-09-08 Daniel Marjamäki - - * src/checkother.h: Fixed #650 ('possible style' pre-incrementing - error shown without --all) - -2009-09-08 Daniel Marjamäki - - * src/cppcheck.cpp, src/settings.cpp, src/settings.h: Settings: - Added an 'append' command line flag that allows the user to provide - extra information about functions. See ticket #260 - -2009-09-06 Reijo Tomperi - - * test/testsimplifytokens.cpp: astyle fix - -2009-09-06 Slava Semushin - - * test/testsimplifytokens.cpp: Added test cases for #487. - -2009-09-06 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: Refactoring: move code for - sizeof() simplification to method. Introduce and use Tokenizer::simplifySizeof() method. No functional change. - -2009-09-06 Slava Semushin - - * src/tokenize.cpp: Tokenizer(simplifyNestedStrcat): correctly set - line numbers for new tokens. Pointed out by aggro80@ in IRC. Thanks! - -2009-09-06 Kimmo Varis - - * readme_gui.txt: Upate QT framework's URL to readme. - -2009-09-06 Kimmo Varis - - * gui/readme.txt, readme_gui.txt: Move gui's readme to root - directory to make it easier to find. - -2009-09-06 Kimmo Varis - - * readme.txt: Wrap long line in readme.txt. - -2009-09-06 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Templates: Scaled - up the handling of default values for template parameters (#638) - -2009-09-05 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix another issue - related to #647 (Crash during tokenizing (wrong) K&R function - declaration) http://sourceforge.net/apps/trac/cppcheck/ticket/647 - -2009-09-05 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix #647 (Crash - during tokenizing (wrong) K&R function declaration) - http://sourceforge.net/apps/trac/cppcheck/ticket/647 Thanks to - undingen for providing a patch - -2009-09-05 Reijo Tomperi - - * man/cppcheck.1.xml, src/cppcheck.cpp, src/cppcheckexecutor.cpp, - src/errorlogger.cpp, src/errorlogger.h, src/settings.h, - test/testcppcheck.cpp: New command line argument added --template - Fix ticket #462 (Allow using template to customize output format) - http://sourceforge.net/apps/trac/cppcheck/ticket/462 - -2009-09-06 Slava Semushin - - * src/preprocessor.cpp: Fixed #585 (Preprocessor: Don't check the - same configuration twice) http://sourceforge.net/apps/trac/cppcheck/ticket/585 - -2009-09-05 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h, test/testbufferoverrun.cpp, - test/testsimplifytokens.cpp: Fixed #629 (Tokenizer: expand nested - strcat() calls) http://sourceforge.net/apps/trac/cppcheck/ticket/629 - -2009-09-05 Daniel Marjamäki - - * : commit d9d2f53df6eb547432366937175af8f8b29c63a8 Author: Aleksey - Palazhchenko Date: Fri Sep 4 22:59:25 - 2009 +0400 - -2009-09-04 Daniel Marjamäki - - * test/testmemleak.cpp: memory leaks: Added a todo test case for the - getcode function - -2009-09-04 Aleksey Palazhchenko - - * test/test.pro: Fixes in test.pro - -2009-09-03 Reijo Tomperi - - * : commit 74086740172d1d9dfdaf5501a5f22aa1f48d32a6 Author: Reijo - Tomperi Date: Thu Sep 3 23:28:00 - 2009 +0300 - -2009-09-03 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: templates: remove - typename tokens - -2009-09-03 Reijo Tomperi - - * src/filelister.cpp: Fix ticket #642 (txx (template implementation - files) not recognized/checked.) - http://sourceforge.net/apps/trac/cppcheck/ticket/642 - -2009-09-03 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: templates: Quick - fix for the problem with default value for a template argument - -2009-09-02 Daniel Marjamäki - - * test/testsimplifytokens.cpp: Templates: Added todo testcase for - handling default values for template arguments. Related with ticket - #638 - -2009-09-02 Reijo Tomperi - - * src/checkclass.cpp, test/testclass.cpp: Fix ticket #637 (False - positive, Using 'memset' on struct that contains a 'std::string') - http://sourceforge.net/apps/trac/cppcheck/ticket/637 - -2009-09-02 Reijo Tomperi - - * test/testclass.cpp: Added few memset test cases - -2009-09-01 Reijo Tomperi - - * src/checkother.cpp, src/mathlib.cpp, test/testmathlib.cpp, - test/testother.cpp: Don't warn about division by zero if zero if - floating point number. Fix bug from mathlib isInt() and add test - case from which few are false positives - -2009-09-01 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: fixed - a todo testcase to find more leaks - -2009-09-01 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: fixed - todo testcases to find more memory leaks - -2009-09-02 Slava Semushin - - * src/checkmemoryleak.cpp: CheckMemoryLeakInFunction: print - simplified tokens only with --debug and --verbose. Suggested by aggro80@ and approved by hyd_danmar@ in IRC. - -2009-09-02 Slava Semushin - - * src/tokenize.cpp: Tokenizer::syntaxError(): throw exception when - debug enabled. This allows to stop test suite when first syntax error found. - -2009-09-02 Slava Semushin - - * src/mathlib.cpp, src/token.cpp, src/tokenize.cpp: Print error - messages to stderr (instead of stdout). - -2009-09-02 Slava Semushin - - * test/testmemleak.cpp: test/testmemleak.cpp(dofindleak): provide - settings object with debug enabled. This allows to print tokens when syntax error found in one of tests. - -2009-09-01 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: fixed - a todo testcase - -2009-09-01 Daniel Marjamäki - - * test/testmemleak.cpp: memory leaks: minor fix for testcase - -2009-09-01 Slava Semushin - - * src/tokenize.cpp: Tokenizer::syntaxError: show details about - unlogged syntax error. - -2009-09-01 Slava Semushin - - * src/checkstl.cpp, test/teststl.cpp: Fixed #631 (False positive - matching iterator which is dereferenced) http://sourceforge.net/apps/trac/cppcheck/ticket/631 - -2009-09-01 Reijo Tomperi - - * src/checkother.cpp, test/testother.cpp: Fix #630 (Division by zero - check only looks at first character of divisor) - http://sourceforge.net/apps/trac/cppcheck/ticket/630 Thanks to - liam_routt for finding this and providing fix for it. - -2009-08-31 Daniel Marjamäki - - * test/testpreprocessor.cpp: Preprocessor: Added a todo testcase - -2009-08-31 Daniel Marjamäki - - * src/checkclass.cpp, src/tokenize.cpp, test/testclass.cpp: Borland - C++: Don't warn about uninitialized variables that are declared in - the __published section. These are auto-initialized - -2009-08-30 Reijo Tomperi - - * test/testmemleak.cpp: astyle fix - -2009-08-30 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Refactoring: - Refactoring of the unit testing for the CheckMemoryLeakInFunction - -2009-08-30 Reijo Tomperi - - * src/checkother.cpp, test/testother.cpp: Fix ticket #612 (Division - by zero not detected when zero has type suffix) - http://sourceforge.net/apps/trac/cppcheck/ticket/612 - -2009-08-30 Daniel Marjamäki - - * : commit c50f7787f90ecd44395f2fb1fae4f69ca3a37899 Author: Slava - Semushin Date: Sun Aug 30 18:44:23 2009 - +0700 - -2009-08-30 Aleksey Palazhchenko - - * src/src.pro: Fixes in src.pro 1) Binary shouldn't be in bundle (Mac OS X). 2) Binary doesn't use Qt at all. - -2009-08-30 Slava Semushin - - * src/checkbufferoverrun.cpp: CheckBufferOverrun::checkScope(): use - Token::getStrLength(). No functional change. - -2009-08-30 Slava Semushin - - * src/token.cpp, src/token.h, test/testtoken.cpp: - Token::getStrLength(): introduce new static method. No functional change. - -2009-08-30 Slava Semushin - - * src/preprocessor.cpp: Preprocessor::getcfgs(): use - std::list::unique() for removing duplicates. No functional change. - -2009-08-30 Daniel Marjamäki - - * src/tokenize.cpp: Refactoring: Use the Token::link - -2009-08-30 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #611 - (Preprocessor: the configurations "A;B" and "B;A" are the same) - http://sourceforge.net/apps/trac/cppcheck/ticket/611 - -2009-08-29 Reijo Tomperi - - * src/checkmemoryleak.cpp, src/tokenize.cpp, - test/testsimplifytokens.cpp: astyle fix - -2009-08-30 Slava Semushin - - * src/tokenize.cpp: Tokenizer::setVarId(): simplify code a bit. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp: Tokenizer::setVarId(): use Token::link() instead - of loop. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp: Tokenizer::setVarId(): simplify condition. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp: Tokenizer: don't call simplifyCalculations() - twice. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: - Tokenizer::simplifyFunctionParameters(): change return type to void. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: - Tokenizer::simplifyConditionOperator(): change return type to void. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: Tokenizer::elseif(): change - return type to void. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: - Tokenizer::simplifyDoWhileAddBraces(): change return type to void. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: - Tokenizer::simplifyIfAddBraces(): change return type to void. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: Tokenizer::simplifyComma(): - change return type to void. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: Tokenizer::simplifyIfNotNull(): - change return type to void. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: Tokenizer::simplifyIfNot(): - change return type to void. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: Tokenizer::simplifyIfAssign(): - change return type to void. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: Tokenizer::simplifyVarDecl(): - change return type to void. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: Tokenizer::simplifyCasts(): - change return type to void. No functional change. - -2009-08-30 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h: - Tokenizer::simplifyLogicalOperators(): change return type to void. No functional change. - -2009-08-29 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #615 (Memleak - was detected in 1.32 but not in 1.33 and later) - -2009-08-29 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #414 (memory - leak in if-else construct not detected) - -2009-08-29 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: - improved the simplification of 'if* ;' - -2009-08-29 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: fixed - todo test case. reduce exit better - -2009-08-29 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h, test/testsimplifytokens.cpp: - Tokenizer: enhance simplifyNot() and rename to - simplifyLogicalOperators(). Don't replace "and" everything becuse it may be used as variable - name. Better fix for #620 Corrections for commit - eb05cf904df3b9b1e90de5dcc912817e83d422c8 - -2009-08-29 Slava Semushin - - * src/tokenize.cpp: Tokenizer(simplifyNot): replace "if" by "else - if" and added braces. No functional change. - -2009-08-29 Daniel Marjamäki - - * src/checkmemoryleak.cpp: memory leaks: fixed bug. return|else are - not part of a variable declaration - -2009-08-29 Slava Semushin - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #620 - (Tokenizer: replace "and" by "&&") http://sourceforge.net/apps/trac/cppcheck/ticket/620 - -2009-08-29 Slava Semushin - - * src/tokenize.cpp: Tokenizer(simplifyIfAssign): fixed to link() - just inserted tokens. Fixed segfault on samba sources. - -2009-08-29 Slava Semushin - - * src/tokenize.cpp: Tokenizer(simplifyComma): join two if bodies to - one. No functional change. - -2009-08-29 Slava Semushin - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #618 - (Tokenizer: Wrong handling of enum) http://sourceforge.net/apps/trac/cppcheck/ticket/618 - -2009-08-29 Slava Semushin - - * src/checkmemoryleak.cpp: CheckMemoryLeakInFunction(getcode): don't - call Token::Match() if varid equals to zero. - -2009-08-29 Slava Semushin - - * src/tokenize.cpp: Tokenizer: call createLinks() only once. Fixed simplifyIfAssign() and simplifyIfNot() to link() just inseted - tokens. No functional change. - -2009-08-29 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: - better handling of open/close - -2009-08-29 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: astyle - -2009-08-29 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #627 (False - positive with --all, Resource leak with open()) - -2009-08-29 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - handling asprintf better - -2009-08-29 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: Fixed - two todo testcases (getcode handling of asprintf) - -2009-08-29 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: fixed - a todo testcase - -2009-08-28 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - Testing that asprintf is handled correctly - -2009-08-28 Reijo Tomperi - - * src/token.cpp, src/tokenize.cpp: Fixed bug in Token::deleteThis - and optimized createLinks() calls. - -2009-08-28 Reijo Tomperi - - * src/checkmemoryleak.cpp, src/tokenize.cpp: astyle fix - -2009-08-28 Daniel Marjamki - - * test/testsimplifytokens.cpp: fixed failed assertions when running - the testrunner - -2009-08-28 danmar - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #625 - (cppcheck dumps core on valid code) - -2009-08-28 danmar - - * src/tokenize.cpp, test/testsimplifytokens.cpp, test/testsuite.h: - Fixed #622 (Tokenizer: Calculations are wrong) - -2009-08-28 danmar - - * src/filelister.cpp: Borland C++: Fixed problem in FileLister - -2009-08-28 danmar - - * src/checkmemoryleak.cpp, src/mathlib.cpp: borland c++: fixed - compiler errors - -2009-08-28 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: Fixed #623 (False - positive: possible null pointer dereference when using the ?: - operator) - -2009-08-27 Slava Semushin - - * src/tokenize.cpp: Fixed #616 (Tokenizer: simplifyTemplates() - should link() all inserted brackets) This also fixed #619. http://sourceforge.net/apps/trac/cppcheck/ticket/616 - http://sourceforge.net/apps/trac/cppcheck/ticket/619 - -2009-08-27 Slava Semushin - - * src/tokenize.cpp: Revert "Fixed #616 (cppcheck crashes with - Eigen/src/Cholesky/CholeskyInstantiations.cpp)" This reverts commit 89f96451742fcab458650581e01895acb7e1de07. This change not fully and properly fixes a problem but just work - arround it. The root of problem is because - Tokenizer::simplifyTemplates() inserts new tokens with brackets - which not link()-ed. - -2009-08-26 Reijo Tomperi - - * src/checkclass.cpp, test/testclass.cpp: Fix the last test case - from ticket #613 (array members variables are not checked in - constructor) http://sourceforge.net/apps/trac/cppcheck/ticket/613 - -2009-08-26 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - better handling of pragma asm and pragma endasm - -2009-08-27 Slava Semushin - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #617 - (False positive "buffer overrun" when sprintf() doesn't have - optional parameters) http://sourceforge.net/apps/trac/cppcheck/ticket/617 - -2009-08-26 Daniel Marjamäki - - * test/testsimplifytokens.cpp: added testcase for the - Tokenizer::simplifyGoto - -2009-08-26 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #498 - (Tokenizer: simplify 'goto') - -2009-08-26 Slava Semushin - - * src/tokenize.cpp: Fixed #616 (cppcheck crashes with - Eigen/src/Cholesky/CholeskyInstantiations.cpp) http://sourceforge.net/apps/trac/cppcheck/ticket/616 - -2009-08-26 Reijo Tomperi - - * test/testclass.cpp: Fix sytax error in uninitVarArray(). This also - causes the test to fail, so changing it as TODO. See - http://sourceforge.net/apps/trac/cppcheck/ticket/613 - -2009-08-26 Reijo Tomperi - - * test/testmemleak.cpp: astyle fix - -2009-08-25 Daniel Marjamäki - - * test/testmemleak.cpp: Refactoring the unit tests of - TestMemleakInFunction - -2009-08-26 Slava Semushin - - * src/checkmemoryleak.cpp: Fixed #614 (If you see this, there is a - bug ###### Token::Match() - varid was 0) http://sourceforge.net/apps/trac/cppcheck/ticket/614 - -2009-08-26 Slava Semushin - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h: - src/checkmemoryleak.{h,cpp}: minor improvements. Corrections for commit 0d6b6e840dea7a09fa3d52b98f3148a12942e067 No functional change. - -2009-08-26 Slava Semushin - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h: Replace "const - unsigned int" to "unsigned int" in methods parameters. No functional change. - -2009-08-26 Slava Semushin - - * src/checkclass.cpp: src/checkclass.cpp: propagate Token::strAt(). No functional change. - -2009-08-26 Slava Semushin - - * src/tokenize.cpp: Tokenizer(simplifyGoto): create links for - inserted braces. - -2009-08-25 Daniel Marjamäki - - * src/tokenize.cpp: fixed segmentation fault - -2009-08-24 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h, test/testmemleak.cpp, - test/testother.cpp, test/testsimplifytokens.cpp: Fixed #498 - (Tokenizer: simplify 'goto') - -2009-08-24 Daniel Marjamäki - - * test/testclass.cpp: TestClass: Added a testcase where a array - member variable is initialized through strcpy - -2009-08-23 Reijo Tomperi - - * src/checkclass.cpp, test/testclass.cpp: Fix ticket #613 (array - members variables are not checked in constructor) - http://sourceforge.net/apps/trac/cppcheck/ticket/613 Patch from - micres - -2009-08-23 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/token.h: astyle formatting - -2009-08-23 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: Refactoring the unit testing. Wrote special - tests for CheckMemoryLeakInFunction::findleak - -2009-08-23 Daniel Marjamäki - - * : Merge commit 'd0k/master' - -2009-08-23 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed #603 (Tokenizer: - Incorrect simplification of < >) http://sourceforge.net/apps/trac/cppcheck/ticket/603 - -2009-08-23 Slava Semushin - - * src/checkother.cpp, test/testother.cpp: Fixed #581 (Wrong usage of - div-function) http://sourceforge.net/apps/trac/cppcheck/ticket/581 - -2009-08-23 Slava Semushin - - * src/tokenize.cpp: Tokenize: minimize createLinks() calls. No functional change. - -2009-08-22 Benjamin Kramer - - * src/token.cpp, src/token.h: Token: inline some functions - -2009-08-22 Benjamin Kramer - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h: Improve - performance by using bsearch(3) instead of a std::set The function name list is already in memory so we can avoid copying - it into a std::set if we sort the list alphabetically. This way no - binary search tree has to be allocated. Before (best of 5 runs): ./testrunner > /dev/null 0,21s user 0,00s - system 95% cpu 0,221 total After (best of 5 runs): ./testrunner > - /dev/null 0,20s user 0,00s system 95% cpu 0,210 total - -2009-08-22 Slava Semushin - - * test/testother.cpp: TestOther::varScope5: fixed syntax error in - test case. Testrunner complains about "Unlogged error at - Tokenizer::syntaxError" since - 74bbe945f6a55c3eb9d125b1f16566b0f10c1479 commit. - -2009-08-22 Slava Semushin - - * src/token.cpp, src/token.h, src/tokenize.cpp: - Token::createMutualLinks(): introduce and use. No functional change. - -2009-08-22 Slava Semushin - - * src/tokenize.cpp: Tokenizer: propagate Token::eraseTokens(). No functional change. - -2009-08-22 Slava Semushin - - * src/tokenize.cpp: Tokenizer::simplifyTokenList(): call link() for - just inserted tokens. - -2009-08-22 Slava Semushin - - * src/tokenize.cpp: Refactoring: Use the MathLib::toString() to - stringify a number. No functional change. - -2009-08-22 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #507 - (Preprocessor: Incorrect expanding of inner macros) - -2009-08-22 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h, test/testtokenize.cpp: Fixed - #592 (Tokenizer: improve the tokenization of do .. while) http://sourceforge.net/apps/trac/cppcheck/ticket/592 - -2009-08-22 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed #608 (Tokenizer: - simplifyKnownVariables doesn't handle 'while (--i)' correctly) - -2009-08-22 Slava Semushin - - * src/tokenize.cpp: Tokenizer::simplifyIfAddBraces: use - Token::link() instead of loop. No functional change. - -2009-08-22 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed #609 (Tokenizer: - don't add {} after do-while();) http://sourceforge.net/apps/trac/cppcheck/ticket/609 - -2009-08-21 Daniel Marjamäki - - * src/checkother.cpp: Refactoring: Use the MathLib::toString to - stringify a number - -2009-08-21 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, test/testother.cpp: Fixed - #599 (False positive: null pointer dereference) - -2009-08-21 Daniel Marjamäki - - * src/filelister.cpp: astyle formatting - -2009-08-20 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix ticket #600 - (Tokenizer: if(!(fclose(fd) == 0)) is simplified incorrectly) - http://sourceforge.net/apps/trac/cppcheck/ticket/600 - -2009-08-20 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #598 - (Preprocessor: Multiline comments add line change to wrong location) - http://sourceforge.net/apps/trac/cppcheck/ticket/598 - -2009-08-19 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: Memory leaks: Use varid instead of varname - -2009-08-18 Kimmo Varis - - * : commit 85682ed4298352a69d0cd9658111b8c72d4e1b67 Author: Daniel - Marjamäki Date: Tue Aug 18 - 20:49:08 2009 +0200 - -2009-08-18 Kimmo Varis - - * createrelease: List Windows resource file as file to update. - -2009-08-18 Kimmo Varis - - * win_installer/readme.txt: Installer: update readme for latest - changes. - -2009-08-18 Kimmo Varis - - * win_installer/cppcheck.iss: Installer: Add Polish GUI translation - file. - -2009-08-18 Kimmo Varis - - * win_installer/cppcheck.iss: Installer: Pick cppcheck executable - from correct directory. VS IDE builds the executable to Build/Release folder but QMake - generated makefiles build to Src/Release. - -2009-08-17 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/checkmemoryleak.cpp, - src/checkother.cpp: Refactoring: Use the Token::link instead of loop - -2009-08-17 Reijo Tomperi - - * src/mathlib.cpp: Fix ticket #597 (Compile error with Visual C++) - http://sourceforge.net/apps/trac/cppcheck/ticket/597 - -2009-08-17 Kimmo Varis - - * gui/gui.pro, readme.txt, src/src.pro: Don't force debug builds in - qmake project files. When creating makefiles with qmake one needs to give the target in - command line. E.g. $ qmake -config debug or $ qmake -config release For Visual studio projects both targets are generated by just - running the qmake command without switches. - -2009-08-17 Kimmo Varis - - * gui/gui.pro, src/src.pro: Add new header file to qmake project - files. - -2009-08-16 Reijo Tomperi - - * src/token.cpp: Use _str.length() == 1, instead of _str[1] == 0 - -2009-08-16 Reijo Tomperi - - * src/token.cpp, src/token.h: Fix ticket #543 (Possible buffer - overrun in Token::Match()) - http://sourceforge.net/apps/trac/cppcheck/ticket/543 Get rid of - string copying in Token::Match(), also improves speed a little. - 8.0s -> 7.7s - -2009-08-16 Daniel Marjamäki - - * Makefile: generated the Makefile - -2009-08-17 Slava Semushin - - * src/checkother.cpp, test/testother.cpp: Fixed #272 ("The scope of - the variable XXX can be limited" not detected when variable is - initilialized during declaration) http://sourceforge.net/apps/trac/cppcheck/ticket/272 - -2009-08-17 Slava Semushin - - * src/mathlib.cpp: MathLib(isInt): formatted and get rid of tabs. No functional change. - -2009-08-17 Slava Semushin - - * src/mathlib.cpp: MathLib(isInt): use std::tolower(). No functional change. - -2009-08-17 Slava Semushin - - * src/mathlib.cpp: MathLib(isInt): use isxdigit(). No functional change. - -2009-08-16 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/mathlib.cpp, test/testmathlib.cpp: - ettlmartin: improved the MathLib::IsInt - -2009-08-16 Slava Semushin - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h: CheckMemoryLeak: - try to speed up call_func(). Using std::set::find() instead of sequence of Match() calls. - -2009-08-16 Daniel Marjamäki - - * Makefile: updated the Makefile for the release - -2009-08-16 Reijo Tomperi - - * Changelog, createrelease, src/cppcheck.cpp, src/main.cpp, - win_installer/cppcheck.iss: Update version number to 1.35 - -2009-08-16 Slava Semushin - - * .gitignore: .gitignore: added src/Makefile generated by qmake. - -2009-08-16 Slava Semushin - - * src/checkautovariables.cpp: CheckAutoVariables(autoVariables): - make code more readable. - Reduce indentation - Don't check bindent in many conditions - Move inner if-s to outer condition Should be no functional change. - -2009-08-16 Slava Semushin - - * src/checkautovariables.cpp: CheckAutoVariables: const modifier - propagation. No functional change. - -2009-08-16 Slava Semushin - - * src/checkautovariables.cpp: CheckAutoVariables: don't save and - search for local variables with varId 0. - -2009-08-16 Slava Semushin - - * src/checkautovariables.cpp: CheckAutoVariables: added braces. No functional change. - -2009-08-16 Slava Semushin - - * src/checkautovariables.cpp: - CheckAutoVariables(returnPointerToLocalArray): replace std::list to - std::set Use std::set and std::set::find() instead of std::list and - std::find(). First should be faster (runs in the logarithmic time) - than second (runs in linear time). No functional change. - -2009-08-16 Slava Semushin - - * src/checkautovariables.cpp, src/checkautovariables.h: - CheckAutoVariables: change type of vp_list member to std::set. Change type of vda_list from std::list to std::set. It allows to us - use find() method instead of self-written loop which may be slow. No functional change. - -2009-08-16 Slava Semushin - - * src/checkautovariables.cpp, src/checkautovariables.h: - CheckAutoVariables: change type of vd_list member to std::set. Change type of vda_list from std::list to std::set. It allows to us - use find() method instead of self-written loop which may be slow. No functional change. - -2009-08-16 Slava Semushin - - * src/checkautovariables.cpp, src/checkautovariables.h: - CheckAutoVariables: change type of vda_list member to std::set. Change type of vda_list from std::list to std::set. It allows to us - use find() method instead of self-written loop which may be slow. No functional change. - -2009-08-16 Slava Semushin - - * src/checkautovariables.cpp, src/checkautovariables.h: - CheckAutoVariables: use varId instead of variable names. This change similar to be89be8c30326954369c6132c6ebfb47d5ea0ab0 but - for vd_list member. - -2009-08-16 Slava Semushin - - * src/checkautovariables.cpp, src/checkautovariables.h, - test/testautovariables.cpp: Fixed #590 (False positive: Invalid - deallocation when variables have same name) http://sourceforge.net/apps/trac/cppcheck/ticket/590 - -2009-08-16 Daniel Marjamäki - - * gui/cppcheck_se.ts: Swedish: Updated the translation file - -2009-08-15 Reijo Tomperi - - * gui/csvreport.cpp, src/filelister.cpp: line change and encoding - fixes - -2009-08-15 Slava Semushin - - * src/preprocessor.cpp, src/preprocessor.h: Fixed #588 - (Preprocessor: Sort the configurations) http://sourceforge.net/apps/trac/cppcheck/ticket/588 - -2009-08-14 danmar - - * src/checkmemoryleak.h, src/tokenize.h: Visual C++: Fixed - testrunner compilation problems - -2009-08-14 danmar - - * cppcheck.cbproj, src/filelister.cpp: Borland C++ Builder: Fixed - compilation problems when compiling cppcheck - -2009-08-14 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: fix ticket #586 - (Preprocessor: Lines like "#error don't" can cause "no pair for - character" errors) - http://sourceforge.net/apps/trac/cppcheck/ticket/586 - -2009-08-13 Daniel Marjamäki - - * src/mathlib.cpp: mathlib: minor fix - -2009-08-13 danmar - - * src/checkbufferoverrun.cpp, src/mathlib.cpp, src/token.cpp, - test/testmemleak.cpp, testrunner.cbproj: Borland C++ Builder: Fixed - compilation and testrunner problems - -2009-08-12 Reijo Tomperi - - * cppcheck.cbp, src/classinfo.h, src/tokenize.cpp, src/tokenize.h, - test/testtokenize.cpp: Initial work for class and member - function/variable list in tokenizer. - -2009-08-12 Daniel Marjamäki - - * test/testpreprocessor.cpp: preprocessor: added todo testcase for - detecting redundant preprocessor conditions - -2009-08-12 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: Fixed #583 (False - positive: the nullpointer check doesn't handle goto properly) - -2009-08-12 Slava Semushin - - * test/testautovariables.cpp, test/testother.cpp: Fixed ticket #541 - (Wrong testcases produce unlogged error at Tokenizer::syntaxError) http://sourceforge.net/apps/trac/cppcheck/ticket/541 - -2009-08-12 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #584 - (Tokenizer: don't set varId for class declaration) http://sourceforge.net/apps/trac/cppcheck/ticket/584 - -2009-08-11 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, test/testother.cpp: - Refactoring: updated the nullPointer message so it contains the name - of the pointer - -2009-08-10 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #566 (False positive when assigning the - return value of realloc(NULL,..) to a pointer variable holding a - freed memory address) - -2009-08-10 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #582 - (Preprocessor: Remove assembler code inside pragmas) - -2009-08-10 Reijo Tomperi - - * src/checkclass.cpp, test/testclass.cpp: Fixed ticket #578 (missing - virtual destructor not detected) - http://sourceforge.net/apps/trac/cppcheck/ticket/578 - -2009-08-09 Vesa Pikki - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_pl.ts, gui/cppcheck_ru.ts, gui/cppcheck_se.ts, - gui/gui.pro, gui/translationhandler.cpp: Added a Polish translation - file. Also added some missing Finnish and English translations. - -2009-08-09 Daniel Marjamäki - - * src/checkclass.cpp, test/testclass.cpp: Hoangtuansu: Fixed #537 - (false positive::operator= should return something) - -2009-08-09 Daniel Marjamäki - - * win_installer/cppcheck.wxs: Created an experimental wix - installation file - -2009-08-09 Gianluca Scacco - - * src/checkautovariables.cpp: Style check - -2009-08-09 Gianluca Scacco - - * test/testautovariables.cpp: Added new test for invalid - deallocation - -2009-08-09 Gianluca Scacco - - * src/checkautovariables.cpp, src/checkautovariables.h: Invalid - deallocation check done - -2009-08-09 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #574 - (Tokenizer: not assign varId when variable first afer keyword and - has long type) http://sourceforge.net/apps/trac/cppcheck/ticket/574 - -2009-08-09 Slava Semushin - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed ticket #572 - (Tokenizer: improve detection of arrays) http://sourceforge.net/apps/trac/cppcheck/ticket/572 - -2009-08-09 Slava Semushin - - * src/checkstl.cpp, test/teststl.cpp: Fixed ticket #573 (False - positive of set range check when we dereferencing iterator) http://sourceforge.net/apps/trac/cppcheck/ticket/573 - -2009-08-09 Slava Semushin - - * src/checkbufferoverrun.cpp: checkbufferoverrun.cpp: get rid of - Match() usage with varid 0. - -2009-08-08 Slava Semushin - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - ticket #570 (Buffer overrun not detected when sprintf() format - string greater then buffer size) http://sourceforge.net/apps/trac/cppcheck/ticket/570 - -2009-08-08 Slava Semushin - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - ticket #571 (Buffer overrun for sprintf() not detected after first - ')' symbol) http://sourceforge.net/apps/trac/cppcheck/ticket/571 - -2009-08-08 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #565 - (Tokenizer: simplify variable declaraion like 'int z = x >> 16') http://sourceforge.net/apps/trac/cppcheck/ticket/565 - -2009-08-08 Reijo Tomperi - - * src/tokenize.cpp: Improve speed with files containing classes. - E.g. measured speed difference was 1m11.042s --> 0m45.005s with one - large test file. - -2009-08-07 Daniel Marjamäki - - * src/checkstl.cpp, test/teststl.cpp: Fixed #525 (false positive: - vector range checking with <) - -2009-08-07 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed ticket #564 - (set variable id for "struct ABC **p") - http://sourceforge.net/apps/trac/cppcheck/ticket/564 - -2009-08-06 Reijo Tomperi - - * src/checkbufferoverrun.cpp, src/tokenize.cpp, - test/testsimplifytokens.cpp: Fix ticket #563 (set variable id for - **p) http://sourceforge.net/apps/trac/cppcheck/ticket/563 - -2009-08-06 Daniel Marjamäki - - * src/checkbufferoverrun.cpp: Bail out if variable id is 0. This - should be reverted when #563 has been fixed - -2009-08-05 Reijo Tomperi - - * src/tokenize.cpp: Improve speed a lot for files that have long - number lists like = { 0,1,2,3,4, etc. } - -2009-08-05 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #555 (False - positive: [CuTest.c:25]: (error) Memory leak: len) - -2009-08-05 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed #558 (Tokenizer: - Bad simplification of 'for(unsigned i = 0; i < 100; ++i)') - -2009-08-05 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #528 - (Tokenizer: Simplify: 'if(!(a->x=b()))') - -2009-08-04 Reijo Tomperi - - * : commit c6a1f173182b128a8f03168cd48265f8b66e44b2 Author: Reijo - Tomperi Date: Tue Aug 4 22:41:32 - 2009 +0300 - -2009-08-04 Daniel Marjamäki - - * src/check.h, src/checkautovariables.h, - src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/checkclass.h, src/checkdangerousfunctions.h, - src/checkmemoryleak.cpp, src/checkmemoryleak.h, src/checkother.h, - src/checkstl.h, src/cppcheck.cpp: Listing error messages in XML - format - -2009-08-04 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #554 - (resource leak false positive) - -2009-08-04 Daniel Marjamäki - - * src/checkother.h, src/tokenize.h, test/testmemleak.cpp, - test/testredundantif.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Refactoring the unit testing - -2009-08-04 Reijo Tomperi - - * src/checkclass.cpp, test/testclass.cpp: Fix ticket #531 (false - positive about missing virtual destructor) - http://sourceforge.net/apps/trac/cppcheck/ticket/531 - -2009-08-03 Kimmo Varis - - * gui/test.cpp: Oops. Didn't mean to commit the change to - gui/test.cpp. But since I did, lets remove the linefeeds and make - the function look like it gets called. - -2009-08-02 Reijo Tomperi - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fix ticket #552 - (False positive with --all when realloc is used with two variables.) - http://sourceforge.net/apps/trac/cppcheck/ticket/552 - -2009-08-02 Reijo Tomperi - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: TODO test case - realloc5 added and "Checkmemoryleak: simplifycode result for" debug - info added. - -2009-08-02 Reijo Tomperi - - * gui/test.cpp, src/mathlib.cpp, src/tokenize.cpp: astyle fix - -2009-08-02 Slava Semushin - - * src/checkbufferoverrun.cpp: src/checkbufferoverrun.cpp: fixed - regression. - -2009-08-02 Slava Semushin - - * src/checkbufferoverrun.cpp: src/checkbufferoverrun.cpp: don't call - Token::Match() for variables with varId 0. - -2009-08-02 Slava Semushin - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Improved - "index out of bounds" check. Corrected 342acaaaf2f56e1de18371a1a726425127939178 commit. - -2009-08-02 Slava Semushin - - * test/testbufferoverrun.cpp: test/testbufferoverrun.cpp: improve - test cases. - -2009-08-02 Slava Semushin - - * src/mathlib.cpp, src/mathlib.h, src/tokenize.cpp: MathLib: - introduce and use calculate() method. No functional change. - -2009-08-02 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts: GUI: update translation - files. - -2009-08-02 Kimmo Varis - - * gui/common.h, gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h, - gui/resultstree.cpp, gui/test.cpp: Add 'possible style error' - severity for the GUI. Fixes ticket #436 (GUI: All style -severity). The possible style - errors can be now selected visible / hidden so all severities have - their own menu item. - -2009-08-02 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Use native path separators in main window - caption. - -2009-08-02 Slava Semushin - - * src/tokenize.cpp: src/tokenize.cpp: don't call std::string.c_str() - for Token::str() argument. In 4286fdbabb64014fd6ef968e163257a977400d3e commit I introduce - Token::str() method with std::string argument and now we may get rid - of useless std::string.c_str() calls. No functional change. - -2009-08-02 Slava Semushin - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed ticket #549 - (Tokenizer: improve calculation simplification) http://sourceforge.net/apps/trac/cppcheck/ticket/549 - -2009-08-02 Slava Semushin - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #547 - (index out of bounds not detected when addition used as array index) http://sourceforge.net/apps/trac/cppcheck/ticket/547 - -2009-08-01 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed #542 (Tokenizer: - allow numbers in templates parameters) http://sourceforge.net/apps/trac/cppcheck/ticket/542 - -2009-08-01 Kimmo Varis - - * : commit 5ce15eeb232e3f4a73b4285e0e5fb4c187ce443f Author: Kimmo - Varis Date: Sat Aug 1 18:28:21 2009 +0300 - -2009-08-01 Slava Semushin - - * src/checkstl.cpp: src/checkstl.cpp(iterators): some corrections. Corrections for my changes in - 12ca70fe5a61fa9a7b847411ca23329c52544402 and - 347802f81983bf94494c50bd71522f5c5d8f1e15 commits. - -2009-08-01 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #539 - (Tokenizer: don't replace constants variables with varid 0) http://sourceforge.net/apps/trac/cppcheck/ticket/539 - -2009-08-01 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - fixed problem in Preprocessor::expandMacros when macro argument is - for example 'unsigned long' - -2009-08-01 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: null pointers: fixed a - false positive - -2009-08-01 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/resultsview.cpp: GUI: - Make two report saving errors translatable. - -2009-07-31 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #511 (false - positive, memory leak when using 'var = ({});') - -2009-07-31 Kimmo Varis - - * gui/resultsview.cpp: GUI: Fix bug that GUI didn't close the report - file. - -2009-07-31 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/mainwindow.h, - gui/resultstree.cpp: GUI: Fix GUI to recognize and use "possible - error" type (was "all" earlier). - -2009-08-01 Slava Semushin - - * src/checkstl.cpp, src/tokenize.cpp, test/testtokenize.cpp: Fixed - #521 (Tokenizer: improve static variable detection) Also change cppcheck default behavior to don't show "If you see - this, there is a bug" message for each variable without varId. This - feature was very helpful for developers but may annoying users. http://sourceforge.net/apps/trac/cppcheck/ticket/521 - -2009-07-31 Slava Semushin - - * src/tokenize.cpp: Fixed ticket #534 (Segmentation fault when - checking VLC sourcecode) Fixed all valgrind errors. http://sourceforge.net/apps/trac/cppcheck/ticket/534 - -2009-07-31 Daniel Marjamäki - - * test/testtokenize.cpp: astyle formatting - -2009-07-31 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: null pointers: detect when - there are possible null pointer dereferencing when looping through a - linked list both in inner and outer loops at the same time - -2009-07-30 Daniel Marjamäki - - * test/testother.cpp: null pointers: Added a todo testcase - -2009-07-31 Slava Semushin - - * src/checkstl.cpp, test/teststl.cpp: Fixed ticket #503 - (Dereferencing after erase() not work if we try to get access to - member) http://sourceforge.net/apps/trac/cppcheck/ticket/503 - -2009-07-31 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #523 - (Tokenizer: set varId for types with long namespaces) FIXME: skip namespaces by the best way. http://sourceforge.net/apps/trac/cppcheck/ticket/533 - -2009-07-31 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #532 - (Tokenizer: set varId for types which have comma in template - parameter) http://sourceforge.net/apps/trac/cppcheck/ticket/532 - -2009-07-30 Slava Semushin - - * src/checkstl.cpp: src/checkstl.cpp(iterators): skip already - processed tokens. No functional change. - -2009-07-30 Slava Semushin - - * src/checkstl.cpp: src/checkstl.cpp(iterators): simplify condition. - -2009-07-30 Slava Semushin - - * src/checkstl.cpp: src/checkstl.cpp(iterators): fixed coding - mistake. - -2009-07-30 Reijo Tomperi - - * src/cppcheck.cpp: include for clock_t (fix compile - problem) - -2009-07-30 Daniel Marjamäki - - * src/preprocessor.cpp, src/preprocessor.h, - test/testpreprocessor.cpp: Preprocessor: Speedup of the - match_cfg_def function - -2009-07-30 Reijo Tomperi - - * test/testsimplifytokens.cpp: Added more tests to test case - TestSimplifyTokens::ifassign1 - -2009-07-30 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed ticket #529 - (Tokenizer: simplify if((x==0))) - http://sourceforge.net/apps/trac/cppcheck/ticket/529 - -2009-07-29 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leak for - struct member: fixed false positive when the struct pointer is - stored away - -2009-07-29 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: null pointers: Fixed false - positive when 'do' are used - -2009-07-29 Slava Semushin - - * src/checkstl.cpp, test/teststl.cpp: Fixed ticket #524 (Containers - range check shouldn't stop at first founded error) http://sourceforge.net/apps/trac/cppcheck/ticket/524 - -2009-07-29 Slava Semushin - - * src/checkstl.cpp: src/checkstl.cpp(stlBoundries): simplify - condition. No functional change. - -2009-07-29 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #522 - (Tokenizer: recognize comma in container with STL type declaration) http://sourceforge.net/apps/trac/cppcheck/ticket/522 - -2009-07-29 Slava Semushin - - * src/checkstl.cpp: src/checkstl.cpp(iterators): reduce indentation. No functional change. - -2009-07-29 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #520 - (Tokenizer: properly set varId for containers with STL types) http://sourceforge.net/apps/trac/cppcheck/ticket/520 - -2009-07-28 Slava Semushin - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed ticket #519 - (Tokenizer converts commas in for-loops) http://sourceforge.net/apps/trac/cppcheck/ticket/519 - -2009-07-28 Slava Semushin - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed ticket #514 - (false positive:: memory leak when using comma near delete[]) http://sourceforge.net/apps/trac/cppcheck/ticket/514 - -2009-07-28 Slava Semushin - - * test/testautovariables.cpp: test/testautovariables.cpp: renamed - some testcases. Make it readable. No functional change. - -2009-07-28 Slava Semushin - - * src/checkautovariables.cpp, test/testautovariables.cpp: - checkautovariables: added newlines to make code more readable. No code change. - -2009-07-28 Slava Semushin - - * src/checkautovariables.cpp, test/testautovariables.cpp: Fixed - ticket #517 (False positive for extern variables: return of the - address of an auto-variable) http://sourceforge.net/apps/trac/cppcheck/ticket/517 - -2009-07-27 Slava Semushin - - * src/checkclass.cpp, src/checkmemoryleak.cpp, src/checkother.cpp: - Replace Match() to operator==() from std::string. No functional change. - -2009-07-27 Slava Semushin - - * src/checkautovariables.cpp, src/checkclass.cpp, - src/checkmemoryleak.cpp, src/checkother.cpp, src/checkstl.cpp, - src/checkunusedfunctions.cpp, src/preprocessor.cpp, - src/tokenize.cpp: Replace simpleMatch() to operator==() from - std::string. No functional change. - -2009-07-27 Slava Semushin - - * src/checkautovariables.cpp: - src/checkautovariables.cpp(autoVariables): simplify condition. No functional change. - -2009-07-27 Slava Semushin - - * src/checkautovariables.cpp: src/checkautovariables.cpp: assign - default value to std::string during object creation. No functional change. - -2009-07-27 Daniel Marjamäki - - * src/cppcheck.cpp, src/settings.cpp, src/settings.h: gcc: added an - option '--showtime' => show some simple timing information - -2009-07-27 Reijo Tomperi - - * test/testsimplifytokens.cpp: Improve test case - TestSimplifyTokens::comma_keyword - -2009-07-26 Reijo Tomperi - - * src/preprocessor.cpp: Update to ticket #265 (Log a warning when an - include file is not found) Only warn about "foo.h", don't warn about - http://sourceforge.net/apps/trac/cppcheck/ticket/265 - -2009-07-26 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: astyle formatting - -2009-07-26 Slava Semushin - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - ticket #499 (buffer overflow not detected when using macros) sprintf() buffer overrun detection works wrong due to typo (since - time when it was added in commit - a604f56f1960d3abe7a7c4bbc221bf62ccb676a2). Also reports buffer overrun when sprintf() writes bytes equal to - buffer size -- in this case off-by-one error appears. http://sourceforge.net/apps/trac/cppcheck/ticket/499 - -2009-07-26 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h, test/testsimplifytokens.cpp: - Fixed ticket #496 (Tokenizer: simplify statements with "," better) https://sourceforge.net/apps/trac/cppcheck/ticket/496 - -2009-07-26 Daniel Marjamäki - - * src/checkother.cpp: Fixed #506 (###### If you see this, there is a - bug ###### Token::Match()) - -2009-07-26 Slava Semushin - - * gui/cppcheck_ru.ts: gui/cppcheck_ru.ts: start Russian translation. - -2009-07-26 Slava Semushin - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts: gui: regenerate ts-files. - -2009-07-26 Reijo Tomperi - - * src/preprocessor.cpp: Removed some debug output which should not - be on and cleaned up a little. - -2009-07-25 Reijo Tomperi - - * src/cppcheck.cpp, src/preprocessor.cpp, src/preprocessor.h, - test/testpreprocessor.cpp: Fix ticket #265 (Log a warning when an - include file is not found) - http://sourceforge.net/apps/trac/cppcheck/ticket/265 - -2009-07-25 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: Fixed #504 (false - positive: null pointer dereference) - -2009-07-25 Daniel Marjamäki - - * src/checkother.cpp: speedup of CheckOther::postIncrement - -2009-07-25 Daniel Marjamäki - - * test/testpreprocessor.cpp: Added more tests to the - TestPreprocessor::match_cfg_def (#505) - -2009-07-25 Daniel Marjamäki - - * src/tokenize.cpp: astyle formatting - -2009-07-25 Daniel Marjamäki - - * src/preprocessor.h, test/testpreprocessor.cpp: Preprocessor: Added - todo test case for better evaluation of #if conditions - -2009-07-25 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #501 - (Preprocessor should read open configurations that are defined - within the file) - -2009-07-25 Slava Semushin - - * src/checkother.cpp: src/checkother.cpp: simplify condition a bit. No functional change. - -2009-07-25 Slava Semushin - - * src/checkmemoryleak.cpp, src/checkother.cpp, src/tokenize.cpp, - src/tokenize.h, test/testtokenize.cpp: Fixed ticket #500 (Tokenizer: - simplify the "(p != NULL)" conditions) Also teach simplifyIfNot() to handle variables like Foo::var. https://sourceforge.net/apps/trac/cppcheck/ticket/500 - -2009-07-25 Slava Semushin - - * test/testtokenize.cpp: test/testtokenize.cpp: use - tokenizeAndStringify() function. Instead of self-written code. No functional change. - -2009-07-24 booga - - * src/checkother.cpp, src/checkstl.cpp, test/testother.cpp, - test/teststl.cpp: astyle FTW (should have read about that sooner) - -2009-07-24 booga - - * src/checkother.cpp, src/checkother.h, src/checkstl.cpp, - src/checkstl.h, test/testother.cpp, test/teststl.cpp: Fix #476 STL - Container checks. Fix #473 Add post increment check for STL objects - and Classes. - -2009-07-24 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/tokenize.cpp, - test/testsimplifytokens.cpp: Tokenizer: simplify return statements - - remove redundant parantheses - -2009-07-24 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: fixed - false positive for struct members - better handling of if/else - -2009-07-23 Daniel Marjamäki - - * test/testmemleak.cpp: memory leaks: added a todo test case for - struct members when using if-else - -2009-07-23 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: null pointers: fixed false - positives when checking if pointer is null at many locations (#485) - -2009-07-23 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: null pointers: fixed false - positives (#49) - -2009-07-23 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #493 (Memory - leak: False positive when using the exit(0)) - -2009-07-23 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: null pointers: - dereferencing a pointer and then checking if it's null (#49) - -2009-07-23 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: tokenizer: simplify - '?:' better when the condition is always true - -2009-07-22 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - Better evaluation of conditions such as '#if defined A || defined B' - (#469) - -2009-07-22 Daniel Marjamäki - - * src/tokenize.cpp: tokenizer: added todo for simplifying - '(true?x:y)' => '(x)' - -2009-07-22 Daniel Marjamäki - - * test/testother.cpp: astyle formatting - -2009-07-22 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fixed #469 - (Preprocessor should read open configurations that are defined - within the file) - -2009-07-22 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed #497 - (Templates are not expanded correctly) - -2009-07-22 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #494 (False - positives of checking leaks struct members) Better handling of - function calls - -2009-07-21 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, test/testother.cpp: null - pointers: better checking when dereferencing pointer and then - checking if it is null (#485) - -2009-07-21 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testcppcheck.cpp, - test/testmemleak.cpp: dereferencing deallocated memory: it is ok to - take the address to deallocated memory but it is not ok to - dereference the address - -2009-07-21 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, test/testother.cpp: invalid - pointer usage: broke out CheckOther::invalidPointer from the - CheckOther::nullPointer (#485) - -2009-07-21 Daniel Marjamäki - - * : commit d2278b5ce0d23b864cd99a998866b45e1bdf257b Author: Reijo - Tomperi Date: Mon Jul 20 23:24:23 - 2009 +0300 - -2009-07-20 Reijo Tomperi - - * src/checkother.cpp, test/testother.cpp: Fix ticket #486 (C-style - pointer casting misses const pointers) - http://sourceforge.net/apps/trac/cppcheck/ticket/486 - -2009-07-20 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: null pointer - dereferencing: fixed another false positive (#485) - -2009-07-20 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: null pointer - dereferencing: removed a few false positives in the new check that I - added (#485) - -2009-07-20 Daniel Marjamäki - - * src/checkother.cpp: fix bug in previous commit that fixed #485 - -2009-07-20 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: Fixed #485 (detect when - code is checking for null after dereferencing) - -2009-07-20 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: Fixed hanging in - Preprocessor::expandMacros when trying to replace all '__VA_ARGS__' - with '__VA_ARGS__' - -2009-07-20 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leak for - struct member: made the checking more sensitive. Skip bail-out - execution paths were the member is properly deallocated - -2009-07-19 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: memleak: implemented simple checking for - leaking struct members - -2009-07-19 Slava Semushin - - * test/testrunner.cpp: test/testrunner.cpp: fixed exit code when - count of fails tests equals to 256. When 256 tests fails return code was 0 and it was wrong. Now exit - code may be only 0 or 1 and not show how many tests fails. Thanks to aggro80@ for pointing to this! - -2009-07-18 Daniel Marjamäki - - * src/checkother.cpp, test/testmemleak.cpp, test/testtokenize.cpp: - astyle formatting - -2009-07-18 Slava Semushin - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: - src/checkmemoryleak.cpp: added fchmod() function to white list. - -2009-07-18 Slava Semushin - - * src/checkother.cpp, test/testother.cpp: Finally fixed ticket #284 - (style check: redundant condition improvement) http://sourceforge.net/apps/trac/cppcheck/ticket/284 - -2009-07-18 Slava Semushin - - * test/testrunner.cpp, test/testsuite.cpp, test/testsuite.h: Fixed - ticket #481 (testrunner should exit with non-zero status if one of - tests fails) http://sourceforge.net/apps/trac/cppcheck/ticket/481 - -2009-07-18 Slava Semushin - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed ticket #464 - (resource leak not detected when getc is used on the file handle) http://sourceforge.net/apps/trac/cppcheck/ticket/464 - -2009-07-18 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #479 (varId - not assigned to reference to standart container) http://sourceforge.net/apps/trac/cppcheck/ticket/479 - -2009-07-18 Kimmo Varis - - * : commit d1eb7e65584421d346c69371594301c227cf05c8 Author: Kimmo - Varis Date: Sat Jul 18 13:34:00 2009 +0300 - -2009-07-18 Kimmo Varis - - * src/src.pro: Enable more warnings in QMake-generated makefiles. Use same warning levels for GCC than in original makefile. Use W4 - level for Visual Studio. - -2009-07-18 Slava Semushin - - * test/teststl.cpp: Fixed ticket #477 (Bug in Token::Match() during - process TestStl::pushback3) http://sourceforge.net/apps/trac/cppcheck/ticket/477 - -2009-07-18 Kimmo Varis - - * : commit 180a04316d511d743508adc595d2cab6ef564711 Author: Kimmo - Varis Date: Sat Jul 18 11:25:22 2009 +0300 - -2009-07-18 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: tokenizer: improved - the Tokenizer::simplifyIfNot - -2009-07-18 Daniel Marjamäki - - * src/main.cpp: astyle formatting - -2009-07-17 Slava Semushin - - * src/checkclass.cpp, test/testclass.cpp: Fixed ticket #459 (false - positive::Member variable not initialized in constructor) http://sourceforge.net/apps/trac/cppcheck/ticket/459 - -2009-07-17 Daniel Marjamäki - - * gui/aboutdialog.h, gui/applicationdialog.h, - gui/applicationlist.h, gui/checkthread.h, gui/common.h, - gui/csvreport.h, gui/fileviewdialog.h, gui/mainwindow.h, - gui/projectfile.h, gui/report.h, gui/resultstree.h, - gui/resultsview.h, gui/settingsdialog.h, gui/threadhandler.h, - gui/threadresult.h, gui/translationhandler.h, gui/txtreport.h, - gui/xmlreport.h, src/check.h, src/checkautovariables.h, - src/checkbufferoverrun.h, src/checkclass.h, - src/checkdangerousfunctions.h, src/checkheaders.h, - src/checkmemoryleak.h, src/checkother.h, src/checkstl.h, - src/checkunusedfunctions.h, src/cppcheck.h, src/errorlogger.h, - src/filelister.h, src/mathlib.h, src/preprocessor.h, - src/settings.h, src/token.h, src/tokenize.h: doc: updated doxygen - comments. three groups where created - 'GUI', 'Core' and 'Checks' - -2009-07-16 Daniel Marjamäki - - * cppcheck.geany, src/main.cpp: doc: changed the doxygen comments - for the mainpage - -2009-07-16 Vesa Pikki - - * gui/main.cpp, gui/mainwindow.cpp, gui/mainwindow.h, - src/preprocessor.cpp, src/tokenize.cpp: Added support for checking - files via commandline arguments. - -2009-07-14 Kimmo Varis - - * : commit c6b82cab21cffa6d7ec6ae5d8f15bb6dbd861707 Author: Kimmo - Varis Date: Tue Jul 14 18:47:38 2009 +0300 - -2009-07-14 Kimmo Varis - - * .gitignore: Add generated GUI header files to gitignore. - -2009-07-14 Daniel Marjamäki - - * src/tokenize.cpp: doxygen: added a todo to simplify 'for' loops - better in the tokenizer - -2009-07-14 Kimmo Varis - - * gui/gui.pro: GUI: Place intermediate resource files to temp - folder. - -2009-07-14 Kimmo Varis - - * src/src.pro, test/test.pro: Add QMake project files for core and - tests. Ticket #472 (QMake project file to build cppcheck core). - -2009-07-14 Daniel Marjamäki - - * src/checkstl.cpp, test/teststl.cpp: fixed todo test case - detect - iterator usage after push_front|push_back - -2009-07-14 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h, test/testsimplifytokens.cpp: - tokenizer: simplify the '?:' operator - -2009-07-14 Daniel Marjamäki - - * test/testsimplifytokens.cpp: simplify tokens: simplify test cases - -2009-07-14 Daniel Marjamäki - - * src/checkclass.cpp, src/checkmemoryleak.cpp, - src/checkmemoryleak.h, src/checkunusedfunctions.cpp, - src/preprocessor.cpp, src/token.cpp, src/tokenize.cpp: doxygen: made - the todos visible in the doxygen output - -2009-07-13 Daniel Marjamäki - - * src/check.h, src/checkheaders.cpp, src/checkunusedfunctions.cpp, - src/cppcheck.cpp, src/tokenize.cpp, src/tokenize.h, - test/testpreprocessor.cpp, test/testsimplifytokens.cpp, - test/teststl.cpp, test/testtokenize.cpp: minor refactoring: header - cleanup. use forward declarations instead of includes - -2009-07-13 Kimmo Varis - - * : commit 7f7e85390f72ee63ec9bdf4642a36b144dcb69f3 Author: Kimmo - Varis Date: Mon Jul 13 18:53:43 2009 +0300 - -2009-07-13 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/checkdangerousfunctions.cpp, src/checkdangerousfunctions.h, - test/testbufferoverrun.cpp, test/testdangerousfunctions.cpp: - refactoring: Renamed checking classes - -2009-07-13 Kimmo Varis - - * : commit 6393498966e7e030445cca0387c85942826964d7 Author: Kimmo - Varis Date: Mon Jul 13 16:51:35 2009 +0300 - -2009-07-13 Daniel Marjamäki - - * src/checkmemoryleak.h, src/errorlogger.h: astyle formatting - -2009-07-13 Kimmo Varis - - * gui/common.h, gui/main.ui, gui/mainwindow.cpp, gui/mainwindow.h, - gui/resultstree.cpp: GUI: Remove security-category. The security-category was removed from core in commits - 03f3ee62a0d9a7e38f1dfcbefae872cd08990dbc and - 11bc5195b84c18cc59f336cc0588dc07294a1de7. - -2009-07-13 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h: refactoring: - Refactoring of the leak-checking classes - -2009-07-13 Daniel Marjamäki - - * src/main.cpp, src/token.h: doxygen: updated a few comments - -2009-07-13 Kimmo Varis - - * : commit d88cf4d3e4caa2a7d9234d8be9aefa67df081dc0 Author: Kimmo - Varis Date: Mon Jul 13 11:39:46 2009 +0300 - -2009-07-13 Daniel Marjamäki - - * src/check.h, src/checkautovariables.cpp, - src/checkautovariables.h, src/checkbufferoverrun.cpp, - src/checkclass.cpp, src/checkdangerousfunctions.cpp, - src/checkmemoryleak.cpp, src/checkmemoryleak.h, src/checkother.cpp, - src/checkstl.cpp, src/errorlogger.h, test/testbufferoverrun.cpp, - test/testconstructors.cpp, test/testdivision.cpp, - test/testmemleak.cpp: refactoring: renamed the severity "all" to - "possible error" - -2009-07-12 Daniel Marjamäki - - * gui/gui.pro, gui/mainwindow.cpp, src/errorlogger.h, - src/settings.cpp, src/settings.h: cleanup: continued with the - removing of the security. Some more work is needed but now - everything compiles and runs at least. - -2009-07-12 Daniel Marjamäki - - * src/checkother.h: doc: add link - -2009-07-12 Daniel Marjamäki - - * Makefile, src/checksecurity.cpp, src/checksecurity.h, - test/testsecurity.cpp, tools/dmake.cpp, tools/errmsg.cpp: cleanup: - removed deprecated files. security checking and errmsg - -2009-07-12 Daniel Marjamäki - - * createrelease, src/cppcheck.cpp, win_installer/cppcheck.iss: - updated version to 1.34 - -2009-07-12 Daniel Marjamäki - - * src/checkclass.cpp, test/testunusedprivfunc.cpp: unused private - functions: don't check classes declared in header files unless it is - known that their whole implementation is seen - -2009-07-12 Kimmo Varis - - * gui/about.ui, gui/cppcheck_de.ts, gui/cppcheck_en.ts, - gui/cppcheck_fi.ts, gui/cppcheck_ru.ts, gui/cppcheck_se.ts: GUI: - Improve About-dialog layout. Add vertical spacer above texts to that icon box becomes narrow and - text box wide. - -2009-07-12 Kimmo Varis - - * gui/about.ui: GUI: Wordwrap texts in the About-dialog. Fixes ticket #454 (About-dialog size/text problems). - -2009-07-11 Daniel Marjamäki - - * src/main.cpp: doxygen: wrote a simple text for the mainpage - -2009-07-11 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: better - description for the message with id strncatUsage - -2009-07-10 Daniel Marjamäki - - * src/cppcheck.cpp, src/cppcheckexecutor.cpp, src/errorlogger.cpp, - src/errorlogger.h, src/settings.cpp, src/settings.h, - src/threadexecutor.cpp, test/testcppcheck.cpp, test/testsuite.cpp: - Revert "cppcheck: Now it's possible to change the output format, for - example to a visual studio compliant format" This reverts commit 91a8dbd7b987d6af5f0c00b850bcdd82fe848459. - -2009-07-09 Daniel Marjamäki - - * cppcheck.geany: geany: updated the project file - -2009-07-08 Daniel Marjamäki - - * src/check.h, src/checkclass.cpp, src/checkclass.h, - src/checksecurity.h, src/checkstl.h, src/preprocessor.cpp, - src/preprocessor.h: refactoring: minor refactorings and added some - doxygen comments - -2009-07-08 Daniel Marjamäki - - * src/cppcheck.cpp, src/cppcheckexecutor.cpp, src/errorlogger.cpp, - src/errorlogger.h, src/settings.cpp, src/settings.h, - src/threadexecutor.cpp, test/testcppcheck.cpp, test/testsuite.cpp: - cppcheck: Now it's possible to change the output format, for example - to a visual studio compliant format - -2009-07-08 Daniel Marjamäki - - * src/check.h, src/checkother.cpp, src/checkstl.cpp: doc: added more - information when '--verbose' is used for these error messages: * dangerous usage of erase * overlapping data buffer - -2009-07-08 Daniel Marjamäki - - * test/testsimplifytokens.cpp: templates: simplified a todo test - case by removing a redundant function from the code - -2009-07-07 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memleak: fixed todo - test case - -2009-07-07 Daniel Marjamäki - - * src/checkclass.cpp, test/testunusedprivfunc.cpp: Fixed #431 - (Unused private function, wrong line when two functions with same - name) - -2009-07-07 Daniel Marjamäki - - * src/checkclass.cpp, test/testunusedprivfunc.cpp: Fixed #382 (False - positive: public function flagged as 'Unused private function') - -2009-07-06 Daniel Marjamäki - - * gui/cppcheck_se.ts: Translation: Updated the translation file for - swedish - -2009-07-06 Daniel Marjamäki - - * test/testmemleak.cpp: addon to previous commit - changed - ASSERT_EQUALS to TODO_ASSERT_EQUALS for the todo test case - -2009-07-06 Daniel Marjamäki - - * test/testmemleak.cpp: Memory leaks: Added a simple todo test case - -2009-07-06 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #446 (memory - leak false positive when variable is static) - -2009-07-06 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: tokenizer: Don't simplify - declarations of static variables - -2009-07-06 Kimmo Varis - - * gui/resultsview.cpp: GUI: Add icons for error messages of failed - report saving. - -2009-07-06 Kimmo Varis - - * gui/csvreport.h, gui/txtreport.h, gui/xmlreport.h: GUI: Make - report class destructors virtual. - -2009-07-06 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/csvreport.cpp, - gui/csvreport.h, gui/gui.pro, gui/mainwindow.cpp, gui/report.h, - gui/resultsview.cpp, gui/resultsview.h: GUI: Add new CSV report - type. CSV files are handy (and commonly used) to export/import data - to other programs. CSV reports allow easy import of cppcheck error - data to other programs for further processing. - -2009-07-06 Kimmo Varis - - * win_installer/cppcheck.iss: Installer: Add option to create - desktop icon for GUI. - -2009-07-06 Kimmo Varis - - * win_installer/cppcheck.iss: Installer: Remove QT-based from GUI - description and use only GUI. Users don't care and don't need to - know that GUI is QT-based. It may even confuse some who don't know - what QT is. So use simply GUI. - -2009-07-06 Kimmo Varis - - * win_installer/cppcheck.iss: Installer: Label GUI as Beta. - -2009-07-05 Reijo Tomperi - - * cppcheck.cbp, gui/mainwindow.cpp, src/checkbufferoverrun.cpp, - src/checkbufferoverrun.h, src/checkclass.cpp, src/checkclass.h, - src/checkheaders.cpp, src/checkheaders.h, src/checkmemoryleak.cpp, - src/checkmemoryleak.h, src/checkother.cpp, src/checkother.h, - src/cppcheck.cpp, src/filelister.cpp, src/filelister.h, - src/tokenize.cpp, src/tokenize.h, test/testcharvar.cpp, - test/testcppcheck.cpp, test/testdivision.cpp, - test/testincompletestatement.cpp, test/testother.cpp, - test/testpreprocessor.cpp, test/testtokenize.cpp, - test/testunusedvar.cpp, tools/dmake.cpp: Refactoring: Rename member - functions to follow naming guidelines. - -2009-07-05 Reijo Tomperi - - * src/tokenize.h, test/testmemleak.cpp: Test case improvement, - unused function removed from tokenizer. - -2009-07-05 Reijo Tomperi - - * src/tokenize.cpp, src/tokenize.h, test/testsimplifytokens.cpp: Fix - ticket #457 (False positive: Member variable not assigned a value in - copy constructor) - http://sourceforge.net/apps/trac/cppcheck/ticket/457 Simplify "a = - 0, b = 0;" into "a = 0; b = 0;" - -2009-07-04 Kimmo Varis - - * : commit b6e543fd4f0e98410527500f2b7f60986304189f Author: Kimmo - Varis Date: Sat Jul 4 22:33:18 2009 +0300 - -2009-07-04 Kimmo Varis - - * gui/resultstree.cpp: Fix ticket #456 (GUI:: save only the results - selected in view settings) - http://sourceforge.net/apps/trac/cppcheck/ticket/456 - -2009-07-04 Reijo Tomperi - - * test/testsimplifytokens.cpp: TODO Test case - TestSimplifyTokens::remove_comma added - -2009-07-04 Reijo Tomperi - - * gui/mainwindow.cpp, gui/translationhandler.cpp: astyle fix - -2009-07-04 Vesa Pikki - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/translationhandler.cpp: - I reverted back the translation file checking. Allthough I put it - after QTranslator had failed to load the translation. This still - allows QTranslator to try and open the file with several variations - of the file. To user we'll tell that the default file is missing. - -2009-07-04 Vesa Pikki - - * gui/translationhandler.cpp: Removed an unnecessary translation - file check. It was missing the file extension and QTranslator - returns false if it was unable to find the translation file which is - just as good. QTranslator can also check for several variations of - the given filename. - -2009-07-04 Vesa Pikki - - * : commit e656c951e59bbde0eba9e23dfb3c7f10a4249af3 Author: Vesa - Pikki Date: Sat Jul 4 11:06:29 2009 +0300 - -2009-07-04 Kimmo Varis - - * gui/mainwindow.cpp, gui/projectfile.cpp, gui/projectfile.h: GUI: - Read include directories from project file. - -2009-07-04 Kimmo Varis - - * src/cppcheck.cpp, src/cppcheck.h, src/settings.h: Move include - paths list to Settings class so we can set include paths from GUI. - -2009-07-03 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix ticket #448 - (false positive:: resource leak) - http://sourceforge.net/apps/trac/cppcheck/ticket/448 Tokenizer - improved to simplify "if( (p)==-1 )" - -2009-07-03 Reijo Tomperi - - * src/checkclass.cpp, test/testclass.cpp: Fix ticket #452 (Failure - to detect "member var not initialized in constructor" if class - inherits) http://sourceforge.net/apps/trac/cppcheck/ticket/452 - -2009-07-03 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/resultstree.cpp: GUI: - Show instructions instead of error when viewer application is not - configured. - -2009-07-03 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/mainwindow.cpp, - gui/translationhandler.cpp: GUI: Further improve error message for - lang file not found. Not being able to switch language is critical - error, not just warning. Also show full file name (with extension) - of the file not found. - -2009-07-03 Kimmo Varis - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/translationhandler.cpp: - GUI: Check translation file exists before loading it. This allows - more accurate error message for the user. - -2009-07-03 Kimmo Varis - - * gui/resultsview.ui: Fix EOL style for gui/resultsview.ui that got - converted to Windows style. Apparently QT Creator blindly converts - file EOL style without any warning to user. - -2009-07-03 Kimmo Varis - - * gui/resultsview.ui: GUI: Remove doubled margin from main window. - The main window sets default margin for central widget. And layout - was setting another margin so margin was doubled. - -2009-07-03 Kimmo Varis - - * win_installer/cppcheck.iss, win_installer/readme.txt: Installer: - Install translation files. - -2009-07-03 Kimmo Varis - - * gui/mainwindow.cpp: Remove unused variable. - -2009-07-02 Vesa Pikki - - * : commit 7a4115236aa61e3c8d3ca9264d816515e572a3a5 Author: Vesa - Pikki Date: Thu Jul 2 23:41:37 2009 +0300 - -2009-07-02 Reijo Tomperi - - * src/cppcheck.cpp: Fix ticket #434 (Unused function gets reported - dozens of times) - http://sourceforge.net/apps/trac/cppcheck/ticket/434 Using - --unused-functions with -j will now print out error message: - "cppcheck: error: --unused-functions can't be used with -j option." - -2009-07-02 Vesa Pikki - - * gui/translationhandler.cpp, gui/translationhandler.h: Added - missing license texts. - -2009-07-02 Vesa Pikki - - * gui/fileviewdialog.cpp, gui/fileviewdialog.h, gui/mainwindow.cpp, - gui/mainwindow.h, gui/resultsview.cpp, gui/resultsview.h, - gui/threadhandler.h: Disabling progressbar if stop button is - pressed. This actually had no visible effect on KDE. - -2009-07-02 Vesa Pikki - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/main.ui, - gui/mainwindow.cpp, gui/mainwindow.h: Checks if toolbar is closed - when opening view menu. Basically just reverted back Kimmo's code - that was lost in merge. - -2009-07-02 Vesa Pikki - - * gui/main.ui: Removed unused statusbar. - -2009-07-02 Vesa Pikki - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/file.ui, - gui/fileviewdialog.cpp, gui/fileviewdialog.h, gui/gui.pro, - gui/mainwindow.cpp: Fileview dialogs now use Qt Designer ui files. - Translation also updated. - -2009-07-02 Vesa Pikki - - * gui/about.ui, gui/aboutdialog.cpp, gui/aboutdialog.h, - gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/gui.pro: About dialog - now uses Qt Designer ui file. Updated translations again. - -2009-07-02 Vesa Pikki - - * : commit 32725c872ec24903c3625ebb32605bb2eacf0e67 Author: Vesa - Pikki Date: Thu Jul 2 19:15:34 2009 +0300 - -2009-07-02 Vesa Pikki - - * gui/application.ui, gui/applicationdialog.cpp, - gui/applicationdialog.h, gui/mainwindow.cpp, gui/settings.ui, - gui/settingsdialog.cpp, gui/settingsdialog.h: Settings dialog and - application dialog now use Qt Designer ui files. - -2009-07-02 Kimmo Varis - - * gui/applicationlist.cpp, gui/mainwindow.cpp, gui/resultstree.cpp: - Astyle fixes. - -2009-07-02 Kimmo Varis - - * gui/aboutdialog.cpp, gui/cppcheck_de.ts, gui/cppcheck_en.ts, - gui/cppcheck_fi.ts, gui/cppcheck_ru.ts, gui/cppcheck_se.ts: GUI: Add - homepage URL to About-dialog. - -2009-07-02 Vesa Pikki - - * gui/application.ui, gui/cppcheck_de.ts, gui/cppcheck_en.ts, - gui/cppcheck_fi.ts, gui/cppcheck_ru.ts, gui/cppcheck_se.ts, - gui/gui.pro, gui/settings.ui: Added ui files for Settings and - Application dialogs. The code doesn't use those at the moment - though. Updated the translation files aswell. - -2009-07-02 Vesa Pikki - - * gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/mainwindow.cpp, - gui/resultstree.cpp: Error types are now translated aswell. - -2009-07-02 Vesa Pikki - - * gui/mainwindow.cpp, gui/resultstree.cpp, gui/resultstree.h, - gui/resultsview.cpp, gui/resultsview.h: Toolbar can now be hidden. - Treeview's headers will now be translated when language changes. - -2009-07-02 Vesa Pikki - - * readme.txt: Added instructions to compile the GUI. - -2009-07-02 Vesa Pikki - - * gui/applicationlist.cpp, gui/applicationlist.h, gui/common.h, - gui/cppcheck_de.ts, gui/cppcheck_en.ts, gui/cppcheck_fi.ts, - gui/cppcheck_ru.ts, gui/cppcheck_se.ts, gui/fileviewdialog.cpp, - gui/gui.pro, gui/main.cpp, gui/main.ui, gui/mainwindow.cpp, - gui/mainwindow.h, gui/resultstree.cpp, gui/resultstree.h, - gui/resultsview.cpp, gui/resultsview.h, gui/resultsview.ui, - gui/settingsdialog.cpp, gui/settingsdialog.h, - gui/threadhandler.cpp, gui/translationhandler.cpp, - gui/translationhandler.h: Began adding translations and using Qt - Designer .ui files. Also added QSetting value names to common.h Work is halfway on both translations and .ui files. I added a very quick and rough finnish translation. The program now requires the translation files to be created before - running that can be done with lrelease gui.pro. To compile the whole GUI one must do the following cd gui qmake - lrelease gui.pro make - -2009-07-02 Kimmo Varis - - * gui/applicationlist.cpp, gui/mainwindow.cpp, gui/resultstree.cpp, - gui/settingsdialog.cpp, gui/threadhandler.cpp: GUI: Do not make - settings names translatable. Having translated settings names is a - bad idea. If user changes GUI language one loses settings. Also - settings might be exported/imported and translated names might not - work between systems/users. - -2009-07-02 Kimmo Varis - - * : commit c79d50a7103ac08f31c392d9c7ebac6affff68b0 Author: Kimmo - Varis Date: Thu Jul 2 00:05:09 2009 +0300 - -2009-07-01 Kimmo Varis - - * gui/applicationlist.cpp, gui/applicationlist.h, - gui/resultstree.cpp, gui/threadhandler.cpp: Astyle fixes. - -2009-07-01 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Add View-menu item to - show/hide standard toolbar. - -2009-06-30 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix ticket - #445 (simple to avoid false positive for buffer overflow) - http://sourceforge.net/apps/trac/cppcheck/ticket/445 Simple bailout - in case "if" is found inside the for-loop. - -2009-06-27 Kimmo Varis - - * gui/mainwindow.h: Fix couple of typos in comments. - -2009-06-27 Kimmo Varis - - * gui/common.h, gui/mainwindow.cpp, gui/mainwindow.h, - gui/resultstree.cpp: GUI: Remove GUI for showing unused functions. - Implements ticket #443 (Remove checking of unused functions from - GUI) https://sourceforge.net/apps/trac/cppcheck/ticket/443 See also - ticket #434 https://sourceforge.net/apps/trac/cppcheck/ticket/434 - -2009-06-27 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Disable checking unused functions. - Implements ticket #443 (Remove checking of unused functions from - GUI) https://sourceforge.net/apps/trac/cppcheck/ticket/443 See also - ticket #434 https://sourceforge.net/apps/trac/cppcheck/ticket/434 - -2009-06-26 Daniel Marjamäki - - * cppcheck.geany, src/cppcheck.cpp, src/preprocessor.cpp, - src/preprocessor.h, test/testpreprocessor.cpp: Fix ticket #267 - (Glued define and define name in output text) The handling of ifdef configurations where rewritten. Either a - configuration is handled properly or it is not handled at all. - -2009-06-24 Reijo Tomperi - - * cppcheck.cbp, gui/aboutdialog.h, gui/fileviewdialog.h, - gui/projectfile.h, gui/report.h, gui/txtreport.h, gui/xmlreport.h: - Fixed compile error in Linux Include guard naming fix (names - starting with underscore+capital letter are reserved in C++, so we - should not use those) Codeblocks project file update - -2009-06-24 Kimmo Varis - - * gui/projectfile.h: GUI: Add include guard for projectfile.h. - -2009-06-24 Kimmo Varis - - * : commit 678714419c562d67e12111fc6b5472b53ba34c45 Author: Kimmo - Varis Date: Wed Jun 24 10:54:56 2009 +0300 - -2009-06-23 Daniel Marjamäki - - * src/checkmemoryleak.cpp: minor fix of test case - -2009-06-23 Daniel Marjamäki - - * src/checkmemoryleak.cpp: calling unknown function -> use - -2009-06-23 Daniel Marjamäki - - * test/testmemleak.cpp: added test case - -2009-06-23 Kimmo Varis - - * gui/projectfile.cpp: Fix ticket #437 (Compile warnings in GUI (in - Linux)) https://sourceforge.net/apps/trac/cppcheck/ticket/437 Add - empty cases for XML element types we don't need to handle. - -2009-06-23 Reijo Tomperi - - * cppcheck.cbp: codeblocks project file updated - -2009-06-22 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket #435 (False - positive: Invalid number of character when ({}) is used in code) - http://sourceforge.net/apps/trac/cppcheck/ticket/435 - -2009-06-22 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Add checked directory - path to main window caption. - -2009-06-22 Kimmo Varis - - * gui/gui.cppcheck, gui/projectfile.txt: Fix EOL style of project - file doc and example project file. - -2009-06-22 Kimmo Varis - - * gui/readme.txt, win_installer/cppcheck.iss, - win_installer/readme.txt: Add QT XML DLL to Windows installer and - update docs. - -2009-06-22 Kimmo Varis - - * : commit 1aafeebe7b2abd606043bcb212ad3fcca483e10b Author: Kimmo - Varis Date: Mon Jun 22 11:57:17 2009 +0300 - -2009-06-21 Daniel Marjamäki - - * src/checkmemoryleak.cpp: astyle formatting - -2009-06-21 Daniel Marjamäki - - * src/checkautovariables.h: doc: simplified the documentation for - autovariables a bit - -2009-06-21 Slava Semushin - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: Fixed ticket #399 (Add detection for resource - leaks after open() usage) http://sourceforge.net/apps/trac/cppcheck/ticket/399 - -2009-06-21 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: - CheckMemoryLeakInFunction: More sensitive checking when the code - calls an unknown function - -2009-06-21 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: detect memory leak - when all is given when calling an unknown function - -2009-06-21 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - Replace "#if !defined(A)" with "#ifndef A" - -2009-06-21 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Don't allow to open Settings-dialog while - checking. - -2009-06-20 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Rename Check all/Uncheck all View-menu - items to Show all/Hide all. It is not obvious for user what those - items do and after all it is about showing/hiding all items. - -2009-06-20 Kimmo Varis - - * gui/mainwindow.cpp, gui/resultstree.cpp, gui/resultstree.h, - gui/resultsview.cpp, gui/resultsview.h: GUI: Enable clearing/saving - results also if there are only hidden results. This commit fixes a - bug in my earlier commit that only checked visible results. - -2009-06-20 Kimmo Varis - - * : commit 71aa189efbbb221d755086958c63013be63d9362 Author: Kimmo - Varis Date: Sat Jun 20 23:23:54 2009 +0300 - -2009-06-20 Reijo Tomperi - - * src/checkclass.cpp, src/tokenize.h, test/testunusedprivfunc.cpp: - Fix ticket #426 (Problem with include) - http://sourceforge.net/apps/trac/cppcheck/ticket/426 - -2009-06-20 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Clear results from view before starting - new compare. Strictly speaking this is not necessary but it is the - easiest way to set the GUI state to "no results"-state. - -2009-06-20 Kimmo Varis - - * gui/mainwindow.cpp, gui/resultstree.cpp, gui/resultstree.h, - gui/resultsview.cpp, gui/resultsview.h: GUI: Disable result cleaning - and saving during the checking. - -2009-06-20 Kimmo Varis - - * .gitignore: Add Doxygen output directory to gitignore. - -2009-06-20 Kimmo Varis - - * : commit 210014b930928b323dd5e592c35c674c6e61871c Author: Kimmo - Varis Date: Sat Jun 20 20:55:28 2009 +0300 - -2009-06-20 Daniel Marjamäki - - * src/checkother.cpp, test/testcharvar.cpp: Fixed #425 (False - positive: usage of char variable.. c = c & 0x03) Using char variables in bit operations are ok if: * the result is stored in a char * the variable is and'ed with a number that is less than 0x100 - -2009-06-20 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h, gui/threadhandler.cpp, - gui/threadhandler.h: GUI: Make ThreadHandler class part of object - tree. - -2009-06-20 Daniel Marjamäki - - * src/checkmemoryleak.cpp: CheckMemoryLeakInClass: Only show the - memory leak message when --all is used - -2009-06-20 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/tokenize.cpp, test/testmemleak.cpp, - test/testsimplifytokens.cpp: Fixed ticket #411 (false positive: - resource leak in while loop) - -2009-06-20 Daniel Marjamäki - - * test/testtokenize.cpp: refactoring testcases for - Tokenizer::simplifyAddBraces - -2009-06-20 Kimmo Varis - - * gui/resultstree.h, src/cppcheck.h, src/cppcheckexecutor.h, - src/errorlogger.h, src/token.h: Doxygen fixes. Wrong parameter names - etc. - -2009-06-19 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Tokenizer: Fixed - problem when simplifying casts - -2009-06-19 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket #416 (False - positive: Redundant code) - http://sourceforge.net/apps/trac/cppcheck/ticket/416 - -2009-06-19 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - Better handling of macros that has parantheses but not parameters - such as "#define AAA( ) aaa" - -2009-06-19 Reijo Tomperi - - * src/preprocessor.cpp: astyle fix - -2009-06-19 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fixed ticket #417 - (Crashes in windows because of invalid char value) negative char values are allowed in strings and comments. but not in - other code. - -2009-06-19 Kimmo Varis - - * : commit 923e01af3fd18c9156601afc811206ab0a2146bd Author: Kimmo - Varis Date: Fri Jun 19 15:19:32 2009 +0300 - -2009-06-19 Daniel Marjamäki - - * src/checkother.h, test/testother.cpp: Fixed #420 - (WarningOldStylePointerCast() needs a test case) - -2009-06-19 Kimmo Varis - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Revert "Fix - ticket #417 (Crashes in Windows because of invalid char value)" This reverts commit 70db2562f498cd29a310dc88d2b47a232cd89690. See the ticket - the fix was not correct fix. - -2009-06-19 Kimmo Varis - - * : commit d5d96d2535c6bcb0581e63818e0cbcf440e2d703 Merge: 12f3ac5 - e8d1905 Author: Daniel Marjamäki - Date: Thu Jun 18 23:10:16 2009 +0200 - -2009-06-19 Kimmo Varis - - * : commit 12f3ac5a2fd77472ed4848bd39dfb47f9f9097b9 Author: Daniel - Marjamäki Date: Thu Jun 18 - 23:09:11 2009 +0200 - -2009-06-19 Kimmo Varis - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #417 - (Crashes in Windows because of invalid char value) 8-bit characters - and UTF-8 characters are now converted to spaces. They can only - appear in the code files in comments or string/char constants. So we - cannot just ignore them as that would change length. - -2009-06-19 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix ticket #418 - (delete a,b; not tokenized correctly) - http://sourceforge.net/apps/trac/cppcheck/ticket/418 - -2009-06-18 Reijo Tomperi - - * src/checkother.cpp, test/testother.cpp: Fix ticket #413 (false - positive: C-style pointer casting for pure virtual function) - http://sourceforge.net/apps/trac/cppcheck/ticket/413 - -2009-06-18 Reijo Tomperi - - * gui/fileviewdialog.cpp, gui/fileviewdialog.h: Encoding changed - from ISO* to UTF-8 - -2009-06-18 Reijo Tomperi - - * test/testtokenize.cpp: astyle fix - -2009-06-18 Slava Semushin - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed ticket #278 - (variable id: references are not handled correctly) http://sourceforge.net/apps/trac/cppcheck/ticket/278 - -2009-06-18 Kimmo Varis - - * gui/applicationdialog.cpp: GUI: Use native file selection dialog - to select viewer application. In Windows use *.exe filter since - almost all executable applications have that extension so it makes - no sense to show all files. - -2009-06-18 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Use native file selection dialog when - selecting report file. - -2009-06-17 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed a false - positive (memory leak) This false positive was first discovered in the VLC sourcecode. The - TestMemoryLeakInFunction::simple11 test case is a simplified test - code of that code. - -2009-06-17 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Use native dialogs in - Windows for check file/directory selection. - -2009-06-17 Reijo Tomperi - - * src/checkclass.cpp, test/testconstructors.cpp: Fix ticket #309 - (false positive::is not assigned a value in 'A::operator=') - http://sourceforge.net/apps/trac/cppcheck/ticket/309 - -2009-06-16 Daniel Marjamäki - - * src/checkmemoryleak.h, test/testmemleak.cpp: Created a new class - for detecting leaks (forgetting to free struct members) - -2009-06-16 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #131 - (Regression: leak reported by 1.27 is not reported by 1.29) The leak will be reported as a definite bug again. Not just a - possible bug. cppcheck don't know if the execution path is - possible, but it knows that if the execution path is taken the - memory leak will be certain. - -2009-06-15 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: Improved the - "CheckMemoryLeak::functionReturnType" - -2009-06-15 Reijo Tomperi - - * src/cppcheckexecutor.cpp, src/errorlogger.cpp, src/errorlogger.h: - getXMLFooter() and getXMLHeader() functions added and taken into use - -2009-06-15 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: Fixed #264 (Memory Leak: alloc by assigning to - a return value) The fix was inspired by the previous patch submitted by hoangtuansu - -2009-06-15 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h: GUI: Refactor menu and - toolbar creation to own methods. - -2009-06-14 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fixed ticket #405 - (#ifdef A and #if defined A should be handled as same configuration) - http://sourceforge.net/apps/trac/cppcheck/ticket/405 - -2009-06-14 Reijo Tomperi - - * gui/mainwindow.cpp: astyle fix - -2009-06-15 Slava Semushin - - * src/checkmemoryleak.cpp, src/tokenize.cpp, test/testmemleak.cpp, - test/testtokenize.cpp: Fixed ticket #346 (adding a "const" token - prevents detection of memory leak) http://sourceforge.net/apps/trac/cppcheck/ticket/346 - -2009-06-14 Vesa Pikki - - * gui/mainwindow.cpp: Made License and Authors dialogs a bit bigger. - -2009-06-14 Daniel Marjamäki - - * src/token.cpp, src/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Fixed #387 (Templates: template functions - that return a pointer are not simplified correctly) * Fixed so that the tokenizer handle variable declarations better - when the variable is assigned the return value of a template - function * Fixed so that the simplifyTemplates detect that a template - function is used when its return value is taken - -2009-06-14 Kimmo Varis - - * gui/resultstree.cpp, gui/resultstree.h: GUI: Add new context menu - items to copy filename/full path to clipboard. - -2009-06-14 Kimmo Varis - - * : commit 801a241e0b6452ab773b9c9c769fa8b0c3fa775b Author: Kimmo - Varis Date: Sun Jun 14 12:57:43 2009 +0300 - -2009-06-14 Daniel Marjamäki - - * : commit be52e573f3573af2497138719bb00d101ccef663 Author: Daniel - Marjamäki Date: Sun Jun 14 - 11:28:25 2009 +0200 - -2009-06-14 Slava Semushin - - * src/token.cpp, src/token.h, src/tokenize.cpp: Token: introduce - str(const std::string &) method. Get rid of useless std::string.c_str() calls. No functional change. - -2009-06-14 Slava Semushin - - * src/tokenize.cpp, test/testtoken.cpp: Replace - tok->previous()->previous() call to tok->tokAt(-2). Done by command: git grep -l 'previous()->previous()' | xargs sed -i - 's|previous()->previous()|tokAt(-2)|' No functional change. - -2009-06-14 Slava Semushin - - * src/checkmemoryleak.cpp: Replace - tok->previous()->previous()->previous() call to tok->tokAt(-3). Done by command: git grep -l 'previous()->previous()->previous()' | - xargs sed -i 's|previous()->previous()->previous()|tokAt(-3)|' No functional change. - -2009-06-14 Slava Semushin - - * src/checkmemoryleak.cpp, src/tokenize.cpp, test/testtoken.cpp: - Replace tok->next()->next() call to tok->tokAt(2). Done by command: git grep -l 'next()->next()' | xargs sed -i - 's|next()->next()|tokAt(2)|' No functional change. - -2009-06-14 Slava Semushin - - * src/checkmemoryleak.cpp: Replace tok->next()->next()->next() call - to tok->tokAt(3). Done by command: git grep -l 'next()->next()->next(),' | xargs sed - -i 's|next()->next()->next()|tokAt(3)|' No functional change. - -2009-06-14 Slava Semushin - - * src/checkmemoryleak.cpp: Replace - tok->next()->next()->next()->next() call to tok->tokAt(4). Done by command: git grep -l 'next()->next()->next()->next(),' | - xargs sed -i 's|next()->next()->next()->next()|tokAt(4)|' No functional change. - -2009-06-14 Slava Semushin - - * test/testbufferoverrun.cpp, test/testconstructors.cpp, - test/testmemleak.cpp: Embed errout.str() into ASSERT_EQUALS() call. Get rid of useless variables. No functional change. - -2009-06-14 Daniel Marjamäki - - * src/checkunusedfunctions.cpp, test/testunusedfunctions.cpp: Fixed - ticket #373 (False unused functions) Skip template functions when checking for unused functions - -2009-06-14 Slava Semushin - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fixed ticket #403 - (false positive::Array index out of range) http://sourceforge.net/apps/trac/cppcheck/ticket/403 - -2009-06-14 Kimmo Varis - - * src/cppcheck.rc: Fix the copyright text in Windows executable. - -2009-06-14 Kimmo Varis - - * gui/gui.qrc: GUI: Remove the SVG icon from the resources file as - it is not used. - -2009-06-13 Kimmo Varis - - * gui/gui.pro: GUI: Move Windows-specific options and files to own - scope in project file. - -2009-06-13 Kimmo Varis - - * gui/cppcheck-gui.rc: GUI: Include Windows resources from resource - file having version info. - -2009-06-13 Kimmo Varis - - * gui/gui.pro: GUI: Add common.h to the project. - -2009-06-13 Reijo Tomperi - - * src/tokenize.cpp: Fixed ticket #398 (valgrind shows error when - running testrunner) - http://172.29.29.21/apps/trac/cppcheck/ticket/398 - -2009-06-12 Reijo Tomperi - - * gui/mainwindow.cpp, src/errorlogger.cpp: Fix ticket #397 (xml - output doesn't encode " and & -characters as it should) - http://sourceforge.net/apps/trac/cppcheck/ticket/397 - -2009-06-12 Vesa Pikki - - * gui/mainwindow.cpp: Force extension to the file and check save - type by filter and not by filename. - -2009-06-12 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed ticket #367 - (Deallocating a deallocated pointer false positive when va_list - used) The overall matching of functions when calls are made were improved. - -2009-06-12 Reijo Tomperi - - * src/cppcheck.cpp: astyle fix - -2009-06-12 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: Fixed ticket #374 (False - positive: The scope of variable can be limited) A few refactorings and fixes were made - -2009-06-12 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h, test/testtokenize.cpp: Fixed - ticket #392 (false positive and wrong allocation and deallocation - not detected) http://sourceforge.net/apps/trac/cppcheck/ticket/392 - -2009-06-12 Slava Semushin - - * src/tokenize.cpp: Tokenizer::createLinks(): correct comment. No code change. - -2009-06-12 Daniel Marjamäki - - * src/checkautovariables.h: doc: minor update. The [BR] is not - working as I thought - -2009-06-12 Daniel Marjamäki - - * src/check.h, src/checkautovariables.h, src/checkbufferoverrun.h, - src/checkclass.h, src/checkdangerousfunctions.h, - src/checkheaders.h, src/checkmemoryleak.h, src/checkother.h, - src/checksecurity.h, src/checkstl.h, src/cppcheck.cpp: doc: - generating wiki documentation - -2009-06-12 Slava Semushin - - * src/tokenize.cpp, src/tokenize.h, test/testtokenize.cpp: Fixed - ticket #390 (wrong allocation and deallocation not detected) http://sourceforge.net/apps/trac/cppcheck/ticket/390 - -2009-06-12 Daniel Marjamäki - - * src/check.h, src/checkautovariables.h, src/checkbufferoverrun.h, - src/checkclass.h, src/checkdangerousfunctions.h, - src/checkmemoryleak.h, src/checkother.h, src/checksecurity.h, - src/checkstl.h: added a classInfo function for each check class - -2009-06-11 Reijo Tomperi - - * src/token.cpp, src/token.h, src/tokenize.cpp, src/tokenize.h, - test/testsimplifytokens.cpp: Fix ticket #386 (False positive (memory - leak) with comma) - http://apps.sourceforge.net/trac/cppcheck/ticket/386 - -2009-06-10 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed ticket #377 - (False positive with "char a[]") Updated the tokenizer so "char a[]" is tokenized into "char *a" - -2009-06-09 Reijo Tomperi - - * src/errorlogger.cpp, src/errorlogger.h: Partial fix for ticket - #380 (Error reporting on unused functions) Returning hard coded line - number 1 and assumed that severity should be "style" - https://apps.sourceforge.net/trac/cppcheck/ticket/380 - -2009-06-09 Reijo Tomperi - - * cppcheck.cbp: codeblocks project file updated - -2009-06-10 Slava Semushin - - * src/checkunusedfunctions.h: src/checkunusedfunctions.h: assign - default values in initializer list. No functional change. - -2009-06-09 Reijo Tomperi - - * gui/resultstree.cpp: Fix compile error in GUI - -2009-06-10 Slava Semushin - - * src/cppcheck.cpp: Don't print message about missing source files - when --errorlist used. Also exit with zero status in this case. Fix for 5193a36a6a2490f199de41c430482586557d9894 commit. - -2009-06-10 Slava Semushin - - * : commit d9f2dd385b3f2ab16b45a2ef084fe7447fa04659 Author: Slava - Semushin Date: Wed Jun 10 01:52:42 2009 - +0700 - -2009-06-09 Daniel Marjamäki - - * src/checkautovariables.cpp, src/checkautovariables.h, - src/checkother.cpp, src/checkother.h, test/testautovariables.cpp, - test/testother.cpp: Refactoring: Moved - CheckOther::returnPointerToLocalVariable to CheckAutoVariables - -2009-06-09 Kimmo Varis - - * gui/resultstree.cpp: GUI: One messagebox was missing "this" - parameter. - -2009-06-09 Kimmo Varis - - * testrunner.vcproj: Update VS testrunner project. - -2009-06-09 Vesa Pikki - - * gui/resultsview.cpp: Astyle formatting. - -2009-06-09 Vesa Pikki - - * gui/mainwindow.cpp, gui/resultsview.cpp, gui/resultsview.h: Force - progressbar to be visible when checking starts. - -2009-06-09 Vesa Pikki - - * gui/applicationdialog.cpp, gui/mainwindow.cpp, - gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.cpp, - gui/resultsview.h, gui/settingsdialog.cpp, gui/settingsdialog.h: - Added messagebox to inform user about not found/non visible errors. - -2009-06-09 Vesa Pikki - - * : commit 814cd37c905e9016aaf45f3189d8401dfbf166af Author: Vesa - Pikki Date: Tue Jun 9 09:30:28 2009 +0300 - -2009-06-09 Kimmo Varis - - * gui/readme.txt: GUI: Add readme file with instructions for running - and compiling the GUI. - -2009-06-08 Daniel Marjamäki - - * src/checkmemoryleak.h: Doxygen: Added a few simple doxygen - comments for the leaks checking - -2009-06-08 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: Refactoring: Split up the CheckMemoryLeak into - CheckMemoryLeakInFunction and CheckMemoryLeakInClass - -2009-06-08 Daniel Marjamäki - - * Makefile, src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: Refactoring: Renaming the CheckMemoryLeakClass - to CheckMemoryLeak. Deleted testmemleakmp - -2009-06-08 Daniel Marjamäki - - * test/testmemleakmp.cpp: deleted the testmemleakmp file - -2009-06-08 Kimmo Varis - - * gui/settingsdialog.cpp: GUI: If application list contains - applications select the first by default. - -2009-06-08 Kimmo Varis - - * gui/resultstree.cpp: GUI: Show error message when the viewer - application cannot be started. - -2009-06-08 Kimmo Varis - - * gui/applicationdialog.cpp: Fix #378 (GUI doesn't start application - if path contains spaces) In Windows we must surround paths including - spaces with quotation marks. This patch fixes application path when - it is read from Browse-dialog. - -2009-06-08 Kimmo Varis - - * gui/applicationdialog.cpp: GUI: Show application path with native - separators. - -2009-06-08 Kimmo Varis - - * cppcheck.vcproj: Update VS project file after files were renamed. - -2009-06-08 Kimmo varis - - * gui/gui.pro: GUI: Update project file after file renaming. - -2009-06-07 Daniel Marjamäki - - * Makefile, src/checkfunctionusage.cpp, src/checkfunctionusage.h, - src/checkunusedfunctions.cpp, src/checkunusedfunctions.h, - src/cppcheck.cpp, src/cppcheck.h, test/testfunctionusage.cpp, - test/testunusedfunctions.cpp: Refactoring: Renamed - CheckFunctionUsage to CheckUnusedFunctions - -2009-06-07 Daniel Marjamäki - - * src/checkautovariables.h, src/checkbufferoverrun.h, - src/checkclass.h, src/checkdangerousfunctions.h, - src/checkmemoryleak.h, src/checkother.h, src/checksecurity.h, - src/checkstl.h: Added headers to the "--errorlist" output - -2009-06-07 Kimmo Varis - - * : commit 8375d1f1aeef4273a73bd030357f373b2d360cae Author: Kimmo - Varis Date: Sun Jun 7 14:46:34 2009 +0300 - -2009-06-07 Daniel Marjamäki - - * Changelog: Added a Changelog file that is generated automaticly by - git2cl - -2009-06-07 Daniel Marjamäki - - * createrelease, src/cppcheck.cpp, win_installer/cppcheck.iss: - Updated version to 1.33 - -2009-06-07 Reijo Tomperi - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fix ticket #371 - (Resource leak when exit() and if() uses together) - http://apps.sourceforge.net/trac/cppcheck/ticket/371 - -2009-06-06 Daniel Marjamäki - - * src/checkautovariables.cpp, test/testautovariables.cpp: Fix #370 - (Assign auto variable to parameter false positive) - -2009-06-06 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fix #368 (Leak - detected when allocated memory assigned to member of structure which - returned from function) The return value of strcpy wasn't handled very well - -2009-06-06 Daniel Marjamäki - - * test/testfunctionusage.cpp: Refactoring: Simple code cleanup - -2009-06-06 Kimmo Varis - - * : commit 3142a73fd99462a3c88d99fe31fdb6757fa65e80 Author: Kimmo - Varis Date: Sat Jun 6 13:07:20 2009 +0300 - -2009-06-06 Kimmo Varis - - * gui/applicationdialog.cpp, gui/applicationdialog.h, - gui/settingsdialog.cpp: GUI: Make Settings-dialog a parent of Add - Application-dialog. - -2009-06-06 Kimmo Varis - - * gui/mainwindow.cpp, gui/settingsdialog.cpp, gui/settingsdialog.h: - GUI: Make mainwindow parent of Settings-dialog. - -2009-06-06 Kimmo Varis - - * gui/applicationdialog.cpp: GUI: Astyle fix. - -2009-06-06 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h, test/testtokenize.cpp: Fix #153 - (Unsigned divide) The "unsigned i" variable declaration wasn't handled well. So I - added an "int" token. - -2009-06-06 Kimmo Varis - - * gui/applicationdialog.cpp: GUI: Convert native path to internal - presentation. If application path is edited by hand there can be - native Windows path separators. Unify path separators to internal - presentation before storing the path. - -2009-06-06 Kimmo Varis - - * gui/main.cpp: GUI: Fix handling UTF-8 strings in sources. Our - source files are UTF-8 and as such contain some chars outside 7-bit - ASCII. To handle UTF-8 correctly we must set text codec for QT to - UTF-8. - -2009-06-06 Reijo Tomperi - - * src/tokenize.cpp, src/tokenize.h, test/testother.cpp: Fix ticket - #364 (false positive:: division by zero) - http://apps.sourceforge.net/trac/cppcheck/ticket/364 - -2009-06-05 Reijo Tomperi - - * cppcheck.cbp, gui/aboutdialog.cpp, gui/aboutdialog.h: UTF-8 fixes - to GUI files aboutdialog.* added to codeblocks projectfile - -2009-06-05 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #353 - (No pair for character (').) - http://apps.sourceforge.net/trac/cppcheck/ticket/353 - -2009-06-05 Daniel Marjamäki - - * src/check.h, src/cppcheck.cpp: Created an undocumented command - line flag "--errorlist" that prints all messages - -2009-06-05 Daniel Marjamäki - - * src/checkfunctionusage.cpp, test/testfunctionusage.cpp: Fix #359 - (Incorrect unused function) - -2009-06-05 Kimmo Varis - - * gui/aboutdialog.cpp: GUI: Fix warning from About-dialog layout. - -2009-06-05 Kimmo Varis - - * : commit aaba5735ed6dd93b5fa74a79be65975106c96e45 Author: Kimmo - Varis Date: Fri Jun 5 10:37:50 2009 +0300 - -2009-06-05 Kimmo Varis - - * win_installer/readme.txt: Update Windows installer readme for - including QT GUI and other installer improvements. - -2009-06-05 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed #354 (false - positive: memory leak) - -2009-06-05 Slava Semushin - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed ticket #360 - (Teach about new(std::nothrow) form) http://apps.sourceforge.net/trac/cppcheck/ticket/360 - -2009-06-05 Slava Semushin - - * src/tokenize.cpp, test/testbufferoverrun.cpp: Fixed ticket #329 - (snprintf size is out of bounds when two variables in one scope with - similar names) FIXME: Because it's fix for simplifyTokenList() test should be moved - to test/testsimplifytokens.cpp file. http://apps.sourceforge.net/trac/cppcheck/ticket/329 - -2009-06-05 Slava Semushin - - * test/testbufferoverrun.cpp, test/testcharvar.cpp, - test/testclass.cpp, test/testconstructors.cpp, - test/testdivision.cpp, test/testfunctionusage.cpp, - test/testincompletestatement.cpp, test/testmemleak.cpp, - test/testother.cpp, test/teststl.cpp, test/testtokenize.cpp, - test/testunusedprivfunc.cpp, test/testunusedvar.cpp: Strip redundant - std::string usage from tests. Second round: handle empty strings. Done by command: git grep -l ASSERT_EQUALS | xargs sed -i - 's|ASSERT_EQUALS(std::string(\(".*"\)),|ASSERT_EQUALS(\1,|' Should be no functional change. - -2009-06-05 Slava Semushin - - * src/checkclass.cpp, test/testclass.cpp: Fixed ticket #358 (Local - typedef flagged as uninitialized member) http://apps.sourceforge.net/trac/cppcheck/ticket/358 - -2009-06-04 Kimmo Varis - - * gui/resultstree.cpp: GUI: Enable sorting in results view. - -2009-06-04 Kimmo Varis - - * gui/settingsdialog.cpp: GUI: Improve Settings-dialog layout. - -2009-06-04 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h, gui/threadhandler.cpp, - gui/threadhandler.h: GUI: Prevent exiting the application while - checking. - -2009-06-04 Kimmo Varis - - * gui/aboutdialog.cpp: GUI: Add program icon to the About-dialog. - -2009-06-04 Kimmo Varis - - * gui/aboutdialog.cpp, gui/aboutdialog.h, gui/gui.pro, - gui/mainwindow.cpp: GUI: Add About-dialog. Replace messagebox - containing about-text with dialog. About-dialog must contain - copyright information. - -2009-06-04 Kimmo Varis - - * gui/mainwindow.cpp: Remove some empty lines. - -2009-06-04 Kimmo Varis - - * : commit a74faf334e2737c90f7f90e82b1be8d53a9ef7ee Author: Kimmo - Varis Date: Thu Jun 4 12:38:08 2009 +0300 - -2009-06-03 Reijo Tomperi - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fix ticket #352 - (Memory leaks: Missed memory leak when "--all" is not given) - http://apps.sourceforge.net/trac/cppcheck/ticket/352 Detect memory - leaks without --all when there is "alloc ; assign callfunc ; - -2009-06-03 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket #351 (false - positive::resource leak) - http://apps.sourceforge.net/trac/cppcheck/ticket/351 - -2009-06-03 Vesa Pikki - - * gui/resultstree.h: Added a missing include. - -2009-06-03 Vesa Pikki - - * gui/mainwindow.cpp, gui/mainwindow.h, gui/resultstree.cpp, - gui/resultstree.h, gui/resultsview.cpp, gui/resultsview.h, - gui/settingsdialog.cpp, gui/settingsdialog.h, - gui/threadhandler.cpp, gui/threadresult.cpp, gui/threadresult.h: - Added the initial version of saving results to a file. - -2009-06-02 Reijo Tomperi - - * gui/applicationdialog.h, gui/applicationlist.h, gui/common.h, - gui/settingsdialog.h, src/mathlib.cpp, src/mathlib.h: Changed EOL - character to LF in a few files. - -2009-06-02 Reijo Tomperi - - * gui/checkthread.cpp: astyle fix - -2009-06-02 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #350 - (False positive: Array index out of bounds) - -2009-06-02 Kimmo Varis - - * doxyfile: Add GUI code to doxygen output. - -2009-06-02 Kimmo Varis - - * gui/checkthread.cpp, gui/checkthread.h, gui/mainwindow.cpp, - gui/threadhandler.cpp: GUI: Implement stopping the compare. Threads - must be exited from check cleanly even though it takes small amount - of time. Just terminating thread can have unpredictable side-effects - (even weird crashes). - -2009-06-02 Kimmo Varis - - * gui/threadresult.h: Fix mixed EOL style. - -2009-06-02 Kimmo Varis - - * gui/mainwindow.cpp, gui/mainwindow.h, gui/resultsview.cpp, - gui/resultsview.h: GUI: Add Collapse/Expand all -items to View-menu. - -2009-06-02 Kimmo Varis - - * gui/mainwindow.h: Fix mixed EOL style. - -2009-06-02 Kimmo Varis - - * gui/resultstree.h: Fix mixed EOL style. - -2009-06-02 Kimmo Varis - - * gui/resultsview.h: Fix mixed EOL style. - -2009-06-02 Kimmo Varis - - * gui/resultstree.cpp: GUI: Include result tree icons to resource - (and executable). - -2009-06-01 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed #339 - (Buffer overrun not detected with pointer arrays) - http://apps.sourceforge.net/trac/cppcheck/ticket/339 - -2009-06-01 Slava Semushin - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed ticket #349 - (Add detection for resource leaks after tmpfile() usage) https://apps.sourceforge.net/trac/cppcheck/ticket/349 - -2009-06-01 Slava Semushin - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed ticket #348 - (Simplify sizeof for pointers) https://apps.sourceforge.net/trac/cppcheck/ticket/348 - -2009-06-01 Slava Semushin - - * src/tokenize.cpp: Tokenizer::simplifyTokenList: use SizeOfType(). No functional change. - -2009-06-01 Slava Semushin - - * src/tokenize.cpp: Tokenizer::simplifyTokenList: reduce indent. No functional change. - -2009-06-01 Slava Semushin - - * src/tokenize.cpp: Tokenizer::simplifyTokenList: some improvements. Corrections for 2de4c516e9e5e3dd9590379b0e980c9fc484db89 commit: - declare variable near their usage - set right position of next token - -2009-06-01 Slava Semushin - - * test/testautovariables.cpp, test/testbufferoverrun.cpp, - test/testcharvar.cpp, test/testclass.cpp, - test/testconstructors.cpp, test/testdangerousfunctions.cpp, - test/testdivision.cpp, test/testfilelister.cpp, - test/testincompletestatement.cpp, test/testmathlib.cpp, - test/testmemleak.cpp, test/testother.cpp, test/testredundantif.cpp, - test/testsimplifytokens.cpp, test/teststl.cpp, - test/testtokenize.cpp, test/testunusedprivfunc.cpp: Strip redundant - std::string usage from tests. Done by command: git grep -l ASSERT_EQUALS | xargs sed -i - 's|ASSERT_EQUALS(std::string(\(".\+"\)),|ASSERT_EQUALS(\1,|' Should be no functional change. - -2009-05-31 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fixed ticket #338 - (Simplify sizeof for pointer arrays) by patch submitted by - php-coderrr http://apps.sourceforge.net/trac/cppcheck/ticket/338 - -2009-06-01 Slava Semushin - - * src/tokenize.cpp: src/tokenize.cpp(unwantedWords): propagate const - modifier. No functional change. - -2009-05-31 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: Variable Id: structs must - not have variable id - -2009-05-31 Slava Semushin - - * : commit fb0c217c3e4103219737a1e20e68e95b05ee82f3 Author: Slava - Semushin Date: Sun May 31 20:48:40 2009 - +0700 - -2009-05-31 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket #344 - (Tokenizer crash in Windows) - http://apps.sourceforge.net/trac/cppcheck/ticket/344 - -2009-05-31 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h, test/testsimplifytokens.cpp: - Fixed ticket #345 ('!' and 'not' tokens interpreted differently even - though they mean the same) - -2009-05-31 Daniel Marjamäki - - * src/errorlogger.cpp, src/errorlogger.h, test/testcppcheck.cpp: Fix - ticket #318 ('..' in include will cause conflicting slashes in - messages) - -2009-05-31 Daniel Marjamäki - - * src/checkfunctionusage.cpp, test/testfunctionusage.cpp: Fix for - #341 (Functions passed as pointer not detected as used) - -2009-05-31 Daniel Marjamäki - - * src/cppcheck.cpp: cppcheck: removed the 'this may take several - minutes' when checking unused functions. The check is much faster - nowadays - -2009-05-30 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leaks: - calling function that deallocates the memory and allocates new - memory https://apps.sourceforge.net/trac/cppcheck/ticket/336 - -2009-05-30 Kimmo Varis - - * gui/gui.pro: GUI: Add manifest for Windows build. - -2009-05-30 Kimmo Varis - - * gui/gui.pro, src/filelister.cpp: GUI: Fix building with MinGW. - Add shlwapi library to qmake project file. Use WCHAR instead of - wchar_t. - -2009-05-30 Kimmo Varis - - * src/filelister.cpp: Make GUI work in Windows compiled with VS. - Since GUI is QT project it is also Unicode project. And other - cppcheck code is ANSI code. So we must convert data between Unicode - and ANSI when calling WinAPI functions. WinAPI functions want - Unicode strings but e.g. std::string contains ANSI strings. - -2009-05-30 Kimmo Varis - - * .gitignore: Add more generated GUI files to gitignore. - -2009-05-30 Daniel Marjamäki - - * : commit d33139b2c781d1c4eda1b8ab56212aef5fb1cf42 Author: Daniel - Marjamäki Date: Sat May 30 - 14:24:55 2009 +0200 - -2009-05-30 Kimmo Varis - - * src/filelister.cpp: Windows: Fix FileLister to send full paths - instead of only filenames. - -2009-05-30 Kimmo Varis - - * : commit b2d50ca512ca136732e69bb4e7d9641fd0d168e1 Author: Kimmo - Varis Date: Sat May 30 10:32:33 2009 +0300 - -2009-05-30 Reijo Tomperi - - * AUTHORS, cppcheck.cbp, gui/applicationdialog.cpp, - gui/applicationdialog.h, gui/applicationlist.cpp, - gui/applicationlist.h, gui/checkthread.cpp, gui/checkthread.h, - gui/common.h, gui/main.cpp, gui/mainwindow.cpp, gui/mainwindow.h, - gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.cpp, - gui/resultsview.h, gui/settingsdialog.cpp, gui/settingsdialog.h, - gui/threadhandler.cpp, gui/threadhandler.h, gui/threadresult.cpp, - gui/threadresult.h, src/check.h, src/checkautovariables.cpp, - src/checkautovariables.h, src/checkbufferoverrun.cpp, - src/checkbufferoverrun.h, src/checkclass.cpp, src/checkclass.h, - src/checkdangerousfunctions.cpp, src/checkdangerousfunctions.h, - src/checkfunctionusage.cpp, src/checkfunctionusage.h, - src/checkheaders.cpp, src/checkheaders.h, src/checkmemoryleak.cpp, - src/checkmemoryleak.h, src/checkother.cpp, src/checkother.h, - src/checksecurity.cpp, src/checksecurity.h, src/checkstl.cpp, - src/checkstl.h, src/cppcheck.cpp, src/cppcheck.h, - src/cppcheckexecutor.cpp, src/cppcheckexecutor.h, - src/errorlogger.cpp, src/errorlogger.h, src/filelister.cpp, - src/filelister.h, src/main.cpp, src/mathlib.cpp, src/mathlib.h, - src/preprocessor.cpp, src/preprocessor.h, src/settings.cpp, - src/settings.h, src/threadexecutor.cpp, src/threadexecutor.h, - src/token.cpp, src/token.h, src/tokenize.cpp, src/tokenize.h, - test/testautovariables.cpp, test/testbufferoverrun.cpp, - test/testcharvar.cpp, test/testclass.cpp, - test/testconstructors.cpp, test/testcppcheck.cpp, - test/testdangerousfunctions.cpp, test/testdivision.cpp, - test/testfilelister.cpp, test/testfunctionusage.cpp, - test/testincompletestatement.cpp, test/testmathlib.cpp, - test/testmemleak.cpp, test/testmemleakmp.cpp, test/testother.cpp, - test/testpreprocessor.cpp, test/testredundantif.cpp, - test/testrunner.cpp, test/testsecurity.cpp, - test/testsimplifytokens.cpp, test/teststl.cpp, test/testsuite.cpp, - test/testsuite.h, test/testtoken.cpp, test/testtokenize.cpp, - test/testunusedprivfunc.cpp, test/testunusedvar.cpp, - tools/dmake.cpp, tools/errmsg.cpp: Fix ticket #325 (Replace - developer names in source files with AUTHORS file) - http://apps.sourceforge.net/trac/cppcheck/ticket/325 - -2009-05-30 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket #342 (Simplify - "if( (true) == true )") - http://apps.sourceforge.net/trac/cppcheck/ticket/342 - -2009-05-28 Reijo Tomperi - - * test/testtokenize.cpp: Changed expected result for test case - TestTokenizer::removeParantheses3 to simplify it more - -2009-05-28 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix bug related to ticket - #330, cppcheck hanged with some files containing "((" - http://apps.sourceforge.net/trac/cppcheck/ticket/330 - -2009-05-28 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Simplifying - redundant parantheses http://apps.sourceforge.net/trac/cppcheck/ticket/330 - -2009-05-28 Kimmo Varis - - * gui/threadhandler.h: Fix EOL style (had Unix/DOS) mixed style. - -2009-05-28 Kimmo Varis - - * gui/applicationdialog.cpp: GUI: Fix typo in Add New Application - -dialog. - -2009-05-28 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Add separator in View-menu before - check/uncheck all. - -2009-05-28 Kimmo Varis - - * .gitignore: Add GUI build folders to gitignore. - -2009-05-28 Kimmo Varis - - * gui/cppcheck-gui.rc, gui/gui.pro: GUI: Add application icon for - Windows. - -2009-05-28 Kimmo Varis - - * gui/mainwindow.cpp: GUI: Use PNG icon instead of SVG icon for - Check directory -action. - -2009-05-28 Kimmo Varis - - * gui/gui.pro, gui/gui.qrc, gui/main.cpp, gui/mainwindow.cpp, - gui/resultstree.cpp: Add icon files to resource file. Having - resource files compiled in the executable makes installing the - application easier (especially on Windows). - -2009-05-28 Kimmo Varis - - * src/filelister.cpp: Fix building GUI with Visual Studio. - -2009-05-27 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket #319 (Function - names are tagged as variables) - http://apps.sourceforge.net/trac/cppcheck/ticket/319 - -2009-05-27 Reijo Tomperi - - * test/testmemleak.cpp, test/testtokenize.cpp: Added test case - TestMemleak::dealloc_and_alloc_in_func - -2009-05-27 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket 330 (found - memory leak when __builtin_expect uses) - -2009-05-27 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket 308 (cppcheck - msg:: invalid number of ((). Cant process file) - -2009-05-27 Daniel Marjamäki - - * : commit 650d58e3de2a9487edc36e97fb55cf0ebefb9f77 Author: Daniel - Marjamäki Date: Wed May 27 - 19:38:26 2009 +0200 - -2009-05-27 Kimmo Varis - - * win_installer/cppcheck.iss, win_installer/readme.txt: Installer: - Add docoments to Start-menu. Add AUTHORS.txt, COPYING.txt and - readme.txt to the Start-menu. Files are opened by default .txt file - viewer which is usually Notepad. - -2009-05-27 Kimmo Varis - - * win_installer/cppcheck.iss: Installer: Add .txt extension to text - files. Windows does not know how to open files without extension in - name so add .txt extension when installing for AUTHORS and COPYING. - -2009-05-27 Kimmo Varis - - * win_installer/cppcheck.iss: Installer: Install AUTHORS-file. - AUTHORS is good to install as it tells who are working with - cppcheck. - -2009-05-27 Kimmo Varis - - * win_installer/cppcheck.iss: Installer: Add large installer bitmap. - Adding large installer image which is shown as "sidebar" of - installer's welcome window. The bitmap is combination of Inno Setup - standard image and cppcheck icon. - -2009-05-27 Kimmo Varis - - * win_installer/readme.txt: Installer: Fix output folder name in - installer readme. - -2009-05-27 Kimmo Varis - - * win_installer/cppcheck.iss: Installer: Add small image shown in - top of the installer. - -2009-05-26 Reijo Tomperi - - * src/token.cpp, test/testtokenize.cpp: Fix ticket #334 - (segmentation fault on boost 1.39.0) - http://apps.sourceforge.net/trac/cppcheck/ticket/334 - -2009-05-26 Vesa Pikki - - * gui/mainwindow.cpp, gui/resultstree.cpp: Astyle formatting. - -2009-05-26 Vesa Pikki - - * AUTHORS, gui/mainwindow.cpp, gui/mainwindow.h, - gui/resultstree.cpp, gui/resultstree.h: Added 22x22 icons from - http://tango.freedesktop.org. Also added icon source to AUTHORS - file. Also added toolbar with the default actions. Added icons to - result files and errors. - -2009-05-25 Daniel Marjamäki - - * gui/icon.svg, gui/main.cpp, logo.svg: renamed the logo files to - icon instead - -2009-05-25 Daniel Marjamäki - - * gui/main.cpp, logo.svg: logo: modified the logo so it looks better - when used as mainicon for the gui program - -2009-05-25 Vesa Pikki - - * gui/main.cpp: GUI now uses Cppcheck's logo. - -2009-05-25 Daniel Marjamäki - - * logo.svg: Added a temporary logotype for cppcheck - -2009-05-25 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Fixed ticket #333 (tokenizer: incorrect - removal of decrement/increment) - -2009-05-25 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix ticket #317 - (pre-increment causes style false positive) - -2009-05-25 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix ticket #317 - (pre-increment causes style false positive) - -2009-05-24 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #332 - (White space between macro name and '(' causes macro simplification - to fail) http://apps.sourceforge.net/trac/cppcheck/ticket/332 - -2009-05-24 Vesa Pikki - - * : commit d9c36eada2cdc5f6c2e9b8f92bd319789fc588eb Author: Vesa - Pikki Date: Sun May 24 12:09:37 2009 +0300 - -2009-05-24 Vesa Pikki - - * gui/applicationlist.cpp, gui/applicationlist.h, - gui/settingsdialog.cpp, gui/settingsdialog.h: User can now undo - changes to application list by clicking cancel. - -2009-05-24 Vesa Pikki - - * gui/applicationdialog.cpp, gui/applicationlist.cpp, - gui/mainwindow.cpp, gui/settingsdialog.cpp: Astyle formatting. - -2009-05-24 Vesa Pikki - - * gui/applicationdialog.cpp, gui/applicationdialog.h, - gui/applicationlist.cpp, gui/checkthread.cpp, gui/checkthread.h, - gui/mainwindow.cpp, gui/mainwindow.h, gui/resultstree.cpp, - gui/settingsdialog.cpp: Fixed issues pointed out by Reijo. The - number of threads is now atleast 1. Added a very simple about - dialog with version number and license. Replaced all CppCheck's - with Cppcheck. Renamed "show more errors" to "show possible false - positives" in the menu. User created application now has to have a - name and a path. - -2009-05-24 Slava Semushin - - * src/checkmemoryleak.cpp: - src/checkmemoryleak.cpp(GetAllocationType): simplify condition a - bit. Replace two Token::simpleMatch() calls to one Token::Match(). Correction for my previous - (2654a4aa54457f71b5dbcdc43ee714a054e65069) commit. No functional change. - -2009-05-22 Slava Semushin - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: Added support to search resource leaks after - opendir()/fdopendir() usage. - -2009-05-20 Slava Semushin - - * src/checkother.cpp, test/testother.cpp: Part of fix for ticket - #284 (style check: redundant condition improvement) Fixed case "if (p) delete [] p;" and also added test case for it. http://apps.sourceforge.net/trac/cppcheck/ticket/284 - -2009-05-20 Slava Semushin - - * src/checkother.cpp, test/testother.cpp: Part of fix for ticket - #284 (style check: redundant condition improvement) Fixed case "if (p != NULL) delete p;" and also added test case for - it. http://apps.sourceforge.net/trac/cppcheck/ticket/284 - -2009-05-24 Slava Semushin - - * src/checkmemoryleak.cpp: - src/checkmemoryleak.cpp(GetDeallocationType): removed brackets. No functional change. - -2009-05-23 Vesa Pikki - - * gui/applicationdialog.cpp, gui/applicationdialog.h, - gui/applicationlist.h, gui/common.h, gui/mainwindow.h, - gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.h, - gui/settingsdialog.h, gui/threadhandler.h, gui/threadresult.h: Added - more comments to class members and methods. - -2009-05-23 Vesa Pikki - - * gui/applicationlist.cpp, gui/applicationlist.h, - gui/mainwindow.cpp, gui/mainwindow.h, gui/resultstree.cpp, - gui/resultstree.h, gui/settingsdialog.cpp, gui/settingsdialog.h: Now - starts the default application by double clicking the error. - -2009-05-23 Vesa Pikki - - * : commit 70c32c10e4e3b69562d00ffc2922f46f7c280ee8 Author: Vesa - Pikki Date: Sat May 23 14:26:04 2009 +0300 - -2009-05-23 Slava Semushin - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Added 17 functions - which work with FILE structure to white list. Inspired by previous commit. - -2009-05-23 Vesa Pikki - - * gui/applicationdialog.cpp, gui/applicationdialog.h, - gui/applicationlist.cpp, gui/applicationlist.h, gui/gui.pro, - gui/mainwindow.cpp, gui/mainwindow.h, gui/settingsdialog.cpp, - gui/settingsdialog.h: Added the ability to add/remove/modify - applications to open errors with. Only the list of applications - added, errors cant be opened yet. - -2009-05-23 Slava Semushin - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed ticket #327 - (File descriptor leak not detected when feof() used) Thanks to aggro80@ for help. http://apps.sourceforge.net/trac/cppcheck/ticket/327 - -2009-05-23 Vesa Pikki - - * gui/resultstree.cpp, gui/resultstree.h: When adding a new error, - only hides it and doesn't check all errors. - -2009-05-23 Vesa Pikki - - * gui/common.h, gui/mainwindow.cpp, gui/mainwindow.h, - gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.cpp, - gui/resultsview.h, gui/test.cpp, gui/threadhandler.cpp, - gui/threadresult.cpp, gui/threadresult.h: Results tree now uses only - QStandardItemModel for data storage. Items are now hidden from the - tree and the tree is not recreated everytime it is refreshed. Also - added test.cpp as a sample data for GUI testing. Added Check all - and uncheck all buttons to menu to show/hide all errors more easily. - -2009-05-23 Vesa Pikki - - * gui/gui.pro: Updated new cppcheck files to project file. - -2009-05-23 Reijo Tomperi - - * src/preprocessor.cpp, src/preprocessor.h, - test/testpreprocessor.cpp: Fix ticket #304 (#include should - be searched from paths given with -I parameter.) - http://apps.sourceforge.net/trac/cppcheck/ticket/304 Note that the - ticket is same as with previous commit, but task description was - changed a little. - -2009-05-22 Reijo Tomperi - - * src/preprocessor.cpp, src/preprocessor.h, - test/testpreprocessor.cpp: Fix ticket #304 (#include should - be parsed like #include "file.h" is being parsed) - http://apps.sourceforge.net/trac/cppcheck/ticket/304 - -2009-05-22 Reijo Tomperi - - * src/tokenize.cpp, test/testmemleak.cpp: Fix ticket #326 (Reported - memory leak when pointer returned by assign to function's parameter) - http://apps.sourceforge.net/trac/cppcheck/ticket/326 - -2009-05-22 Slava Semushin - - * src/checkfunctionusage.cpp, src/checkmemoryleak.cpp, - src/tokenize.cpp: Replaced two Token::simpleMatch() calls to one - Token::Match(). Suggested by hyd_danmar in ticket - http://apps.sourceforge.net/trac/cppcheck/ticket/323 No functional change. - -2009-05-22 Slava Semushin - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed ticket #324 - (Teach about fcloseall() function) http://apps.sourceforge.net/trac/cppcheck/ticket/324 - -2009-05-22 Slava Semushin - - * src/checkdangerousfunctions.h: Fixed ticket #300 (wrong level - given) Enable checks of dangerous functions only when --style option used. http://apps.sourceforge.net/trac/cppcheck/ticket/300 - -2009-05-22 Slava Semushin - - * src/checkautovariables.cpp, src/checkother.cpp, tools/errmsg.cpp: - Propagate static and const modifiers. No functional change. - -2009-05-22 Slava Semushin - - * src/checkautovariables.cpp, src/checkdangerousfunctions.cpp: - Removed unused or superfluous headers. No functional change. - -2009-05-22 Slava Semushin - - * src/checkautovariables.cpp, src/checkautovariables.h, - src/checkdangerousfunctions.cpp, src/checkdangerousfunctions.h, - test/testautovariables.cpp, test/testdangerousfunctions.cpp: Updated - wrong comments (looks like after copy&paste). No code change. - -2009-05-21 Reijo Tomperi - - * man/cppcheck.1.xml: Updated man page to reflect AUTHORS file. - -2009-05-21 Reijo Tomperi - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fix #299 (Memory - leak not detected when parameters contain ::) - http://apps.sourceforge.net/trac/cppcheck/ticket/299 - -2009-05-21 Daniel Marjamäki - - * AUTHORS: AUTHORS: Added an authors file Ticket: http://apps.sourceforge.net/trac/cppcheck/ticket/325 - -2009-05-21 Daniel Marjamäki - - * src/checkautovariables.cpp, src/checkclass.cpp, - src/checkfunctionusage.cpp, src/checkheaders.cpp, - src/checkmemoryleak.cpp, src/checkother.cpp, src/checkstl.cpp, - src/preprocessor.cpp, src/tokenize.cpp: Applied patch - 0001-Use-Token-simpleMatch-instead-of-Token-Match-w Author: php-coder Ticket: http://apps.sourceforge.net/trac/cppcheck/ticket/323 - -2009-05-21 Daniel Marjamäki - - * src/checkmemoryleak.cpp: Applied patch - 0003-GetAllocationType-mark-some-members-as-static-and-a.patch Author: php-coder Ticket: http://apps.sourceforge.net/trac/cppcheck/ticket/321 - -2009-05-21 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h: Applied patch - 0002-CheckMemoryLeak-renamed-enum-members.patch Author: php-coder - -2009-05-21 Daniel Marjamäki - - * src/checkmemoryleak.h: Applied patch - 0001-src-checkmemoryleak.h-replaced-assignment-in-contru.patch Author: php-coder - -2009-05-20 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #316 - (\n is tokenized into \\ in a string when macro is used) - http://apps.sourceforge.net/trac/cppcheck/ticket/316 - -2009-05-19 Reijo Tomperi - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Apply patch #320 - from php-coderrr ([PATCH] Determine memory leaks after strndup() - usage) http://apps.sourceforge.net/trac/cppcheck/ticket/320 - -2009-05-19 Reijo Tomperi - - * src/preprocessor.cpp, src/preprocessor.h, - test/testpreprocessor.cpp: Fix ticket #315 (Segmentation fault when - checking Linux kernel) (previous fix was only partial fix) - http://apps.sourceforge.net/trac/cppcheck/ticket/315 - -2009-05-18 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #315 - (Segmentation fault when checking Linux kernel) - http://apps.sourceforge.net/trac/cppcheck/ticket/315 - -2009-05-18 Reijo Tomperi - - * src/checkclass.cpp, test/testconstructors.cpp: astyle fix - -2009-05-17 Daniel Marjamäki - - * src/checkclass.cpp, test/testconstructors.cpp: Classes: Static - variables don't need to be initialized or assigned in constructors - etc http://apps.sourceforge.net/trac/cppcheck/ticket/307 - -2009-05-17 Daniel Marjamäki - - * src/checkstl.cpp, test/teststl.cpp: STL: It is ok to compare - vector iterators with < - https://apps.sourceforge.net/trac/cppcheck/ticket/313 - -2009-05-17 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix for ticket - 291 - preprocessor: better handling of defines - http://apps.sourceforge.net/trac/cppcheck/ticket/291 - -2009-05-14 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #312 - (division by pointer value causes wrong tokenizing) - http://apps.sourceforge.net/trac/cppcheck/ticket/312 - -2009-05-13 Daniel Marjamäki - - * test/testpreprocessor.cpp: Preprocessor: Added test case for #291. - One of the assertions is a TODO and it should be fixed. http://apps.sourceforge.net/trac/cppcheck/ticket/291 - -2009-05-13 Reijo Tomperi - - * src/preprocessor.cpp, src/preprocessor.h, - test/testpreprocessor.cpp: Fix ticket #306 (Invalid multi-line - comment produces cryptic internal error) - http://apps.sourceforge.net/trac/cppcheck/ticket/306 - -2009-05-13 Reijo Tomperi - - * src/tokenize.cpp, test/testpreprocessor.cpp: Added TODO test case - TestPreprocessor::multiline_comment Made tokenizer to printout token - list in case of syntax error, if debug is used - -2009-05-12 Reijo Tomperi - - * test/testmemleak.cpp: Added TODO test case TestMemleak::stdstring - -2009-05-12 Reijo Tomperi - - * test/testtoken.cpp, test/testtokenize.cpp: Fix ticket #305 - (Negative value passed to ASSERT_EQUALS) - http://apps.sourceforge.net/trac/cppcheck/ticket/305 Moved also test - case from testtokenizer to testtoken. - -2009-05-11 Reijo Tomperi - - * src/cppcheck.cpp, src/tokenize.cpp, src/tokenize.h, - test/teststl.cpp, test/testtokenize.cpp: Fix ticket #288 - (Tokenizer::syntaxError should use error logger instead of - std::cout) http://apps.sourceforge.net/trac/cppcheck/ticket/288 - -2009-05-11 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #302 - (White space between "\" and newline not handled correctly) - http://apps.sourceforge.net/trac/cppcheck/ticket/302 - -2009-05-10 Daniel Marjamäki - - * createrelease, src/cppcheck.cpp, win_installer/cppcheck.iss: - Updated version to 1.32 - -2009-05-10 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: null pointer - dereferencing: check that its a pointer that is dereferenced to - avoid false positives when using classes that behave almost like - pointers (#295) - -2009-05-10 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: - Handling exit (#297) - -2009-05-09 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp, - test/testtokenize.cpp: Fix #289 (if() is not properly tokenized) - http://apps.sourceforge.net/trac/cppcheck/ticket/289 - -2009-05-09 Reijo Tomperi - - * src/threadexecutor.cpp: Apply #296 ([PATCH] cppcheck leak memory - when -j option uses) - http://apps.sourceforge.net/trac/cppcheck/ticket/296 - -2009-05-09 Reijo Tomperi - - * src/preprocessor.cpp, src/tokenize.cpp, src/tokenize.h, - test/testpreprocessor.cpp: Fix ticket #294 (### Error: Invalid - number of character () - http://apps.sourceforge.net/trac/cppcheck/ticket/294 - -2009-05-09 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: templates: fixed - problem when for example calling static member function in a - template class (#293) - -2009-05-08 Kimmo Varis - - * win_installer/cppcheck.iss, win_installer/readme.txt: Add VS - runtimes to the Windows installer. cppcheck requires VS 9 - runtimefiles to run. Those runtimes are installed by many programs - and it is probable lots of people already have them. But still there - are users without those files. And for them it is non-trivial task - to get cppcheck to run. So better just include runtimes for - everybody. - -2009-05-08 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: template: no usage - -> no expansion (#292) - -2009-05-07 Reijo Tomperi - - * cppcheck.cbp: testautovariables added to the codeblocks project - file - -2009-05-07 Reijo Tomperi - - * src/cppcheck.cpp, src/tokenize.cpp, src/tokenize.h, - test/testautovariables.cpp, test/testdivision.cpp, - test/testincompletestatement.cpp, test/teststl.cpp, - test/testtokenize.cpp: Initial fix for ticket #283 (segmentation - fault when checking xterm sources) - http://apps.sourceforge.net/trac/cppcheck/ticket/283 It should print - out error message now instead of crashing. Cleanup is needed. - -2009-05-07 Daniel Marjamäki - - * src/tokenize.cpp: templates: don't expand forward declarations for - templates - -2009-05-06 Reijo Tomperi - - * src/checkclass.cpp, test/testclass.cpp: Fix ticket #282 (protected - destructor - false positive) - http://apps.sourceforge.net/trac/cppcheck/ticket/282 - -2009-05-06 Daniel Marjamäki - - * src/checkstl.cpp, test/teststl.cpp: stl: removed false positives - for STL buffer overruns. Bailing out when it can't be checked if the - index is ok or not. (#285) - -2009-05-06 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memleak: removed - false positives for pclose (#286) - -2009-05-06 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: templates: - instantiations in a template class (#280) - -2009-05-06 Reijo Tomperi - - * test/testmemleak.cpp: Added TODO test case - TestMemleak::assign_pclose - -2009-05-05 Reijo Tomperi - - * test/testsimplifytokens.cpp: Added test case - TestSimplifyTokens::template7 - -2009-05-05 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: templates: speedup - by breaking out inner loops (#257) - -2009-05-05 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - Handling newlines when using # to stringify parameters (#281) - -2009-05-03 Daniel Marjamäki - - * src/tokenize.cpp: speedup: made the token simplifications a little - faster - -2009-05-03 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h: templates: extracted the - template simplification into a separate function - -2009-05-03 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix #276 (simplification: - Variable value) http://apps.sourceforge.net/trac/cppcheck/ticket/276 - -2009-05-03 Reijo Tomperi - - * src/checkbufferoverrun.cpp, src/checkclass.cpp, - src/checkheaders.cpp, src/checkmemoryleak.cpp, src/token.cpp, - src/token.h, src/tokenize.cpp, test/testtokenize.cpp: Fix #279 - (Refactoring: replace and remove Token::aaaa , Token::aaaa0 and - Token::aaaa1) http://apps.sourceforge.net/trac/cppcheck/ticket/279 - -2009-05-03 Daniel Marjamäki - - * src/tokenize.cpp: varid: speedup of the algorithm for setting - variable ids - -2009-05-03 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: varid: updated handling - of variable id for class variables (#26) - -2009-05-03 Reijo Tomperi - - * src/tokenize.cpp: Fix possible bug caused by previous commit. - -2009-05-03 Reijo Tomperi - - * src/tokenize.cpp: Fix slowlyness, caused by one of the previous - commits. - -2009-05-03 Daniel Marjamäki - - * src/checkstl.cpp, src/checkstl.h, test/teststl.cpp: stl: Fixed - ticket #277 - dereferencing an iterator that has been erased - -2009-05-02 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: tokenizer: give class - member variables varId (#26) - -2009-05-02 Daniel Marjamäki - - * test/teststl.cpp: stl: added a ticket for the todo test case - TestStl::eraseDereference - -2009-05-02 Daniel Marjamäki - - * test/teststl.cpp: stl: added todo test case, invalid iterator - after insert - -2009-05-02 Daniel Marjamäki - - * test/teststl.cpp: stl: added todo test case, erasing invalid - iterator - -2009-05-02 Daniel Marjamäki - - * test/teststl.cpp: stl: added test case, dereferencing an iterator - that has been erased - -2009-05-02 Daniel Marjamäki - - * test/testmathlib.cpp: testing mathlib: Test that conversion to - numbers work - -2009-05-02 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkother.cpp, src/mathlib.h, - src/tokenize.cpp: Refactoring: Using MathLib for converting string - to number commit beacd5793f9e9987432a20ac39a76ae6c2c8babd Author: Daniel - Marjamäki Date: Sat May 2 - 10:44:18 2009 +0200 memleak: using mathlib commit 4d28172a5d88cc2cbe5ed94a4e4fdbd0dd4bb5e1 Author: Daniel - Marjamäki Date: Sat May 2 - 10:35:06 2009 +0200 tokenizer: using the MathLib for converting string to number commit 4e4b95b3554c9c6d121efeb39741204b1621b1a3 Author: Daniel - Marjamäki Date: Sat May 2 - 10:28:39 2009 +0200 CheckOther: Using mathlib - -2009-05-01 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testtokenize.cpp: refactoring: - Replaced 'aaaa' - -2009-05-01 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket #204 (false - positive::memory leak with --all when free is guarded by simple if) - http://apps.sourceforge.net/trac/cppcheck/ticket/204 - -2009-05-01 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: tokenizer: simplify - assembler (#270), fix _asm also. - http://apps.sourceforge.net/trac/cppcheck/ticket/270 - -2009-05-01 Reijo Tomperi - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fix ticket #196 - (False positive: Resource leak) - http://apps.sourceforge.net/trac/cppcheck/ticket/196 - -2009-05-01 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: tokenizer: simplify - assembler (#270) - -2009-05-01 Reijo Tomperi - - * src/tokenize.cpp: Astyle fix - -2009-05-01 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix ticket #275 - Simplify if( a == 0 ), if( 0 == a ) into if( !a ) - http://apps.sourceforge.net/trac/cppcheck/ticket/275 - -2009-05-01 Daniel Marjamäki - - * test/testconstructors.cpp: astyle formatting - -2009-05-01 Daniel Marjamäki - - * test/testconstructors.cpp: class checking: enabled test case. The - --all setting must be provided - -2009-05-01 Reijo Tomperi - - * test/testmemleak.cpp: astyle fix - -2009-05-01 Reijo Tomperi - - * src/checkmemoryleak.cpp, test/testconstructors.cpp, - test/testmemleak.cpp: Fix partially ticket #196 False positive: - Resource leak And add few test cases related to it. Move one failing - test behind TODO - http://apps.sourceforge.net/trac/cppcheck/ticket/196 - -2009-05-01 Daniel Marjamäki - - * src/checkclass.cpp: class checking: only check class assignments - if the --all has been given - -2009-05-01 Daniel Marjamäki - - * src/checkclass.cpp, src/checkclass.h, test/testconstructors.cpp: - class checking: Checking that vectors/lists/strings etc are modified - in the assignment function - -2009-04-29 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket #269 - (Incorrect variable id, when delete is used.) - http://apps.sourceforge.net/trac/cppcheck/ticket/269 - -2009-04-29 Reijo Tomperi - - * test/testtokenize.cpp: Added test case TestTokenizer::varid_delete - for ticket #269 http://apps.sourceforge.net/trac/cppcheck/ticket/269 - -2009-04-29 Reijo Tomperi - - * test/testmemleak.cpp: Added test case - TestMemleak::free_member_in_sub_func for ticket #253 - http://apps.sourceforge.net/trac/cppcheck/ticket/253 - -2009-04-29 Daniel Marjamäki - - * src/checkstl.cpp, test/teststl.cpp: stl: checking that iterator is - used against a single container - -2009-04-29 Daniel Marjamäki - - * test/teststl.cpp: stl: added todo test case about using same - iterator with different containers - -2009-04-28 Daniel Marjamäki - - * test/teststl.cpp: changed todo comment to TODO_ASSERT_EQUALS - -2009-04-28 Daniel Marjamäki - - * src/checkstl.cpp, src/checkstl.h, test/teststl.cpp: checkstl: - Check for invalid pointer to vector element - -2009-04-28 Daniel Marjamäki - - * test/testconstructors.cpp: added todo test case for detecting - unmodified containers in the operator= function - -2009-04-28 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: - handling std::auto_ptr (#266) - -2009-04-27 Daniel Marjamäki - - * : commit b49997e69d7d058ea722d2d7ef8d4a231a514181 Author: Daniel - Marjamäki Date: Mon Apr 27 - 21:29:03 2009 +0200 - -2009-04-26 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Improve fix to - ticket #261: Allow macro definition to have uncoupled double quote. - http://apps.sourceforge.net/trac/cppcheck/ticket/261 - -2009-04-26 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - Report correct file and line in message 'No pair for character..' - (#261) - -2009-04-25 Daniel Marjamäki - - * src/checkstl.cpp, test/teststl.cpp: push_back: updated the - checking of push_back (#263) - -2009-04-25 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: varid: Set variable id - for stl containers and iterators - -2009-04-25 Daniel Marjamäki - - * test/teststl.cpp: push_back: added a few todo test cases for the - checking of push_back - -2009-04-23 Reijo Tomperi - - * src/errorlogger.cpp: astyle fix - -2009-04-23 Daniel Marjamäki - - * src/errorlogger.cpp, test/testcppcheck.cpp: xml generator: handle - '<' and '>' (#263) - -2009-04-20 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket #258 - (segmentation fault) - http://apps.sourceforge.net/trac/cppcheck/ticket/258 - -2009-04-19 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: return pointer to local - array: fixed false positive when return value is converted to for - instance a std::string (#255) - -2009-04-16 Daniel Marjamäki - - * src/mathlib.cpp, src/mathlib.h, test/testmathlib.cpp: mathlib: - Fixed todo 3/2=1 - -2009-04-14 Reijo Tomperi - - * src/tokenize.cpp: Fix ticket #257 (Improve speed of template - tokenizing) http://apps.sourceforge.net/trac/cppcheck/ticket/257 - -2009-04-14 Daniel Marjamäki - - * src/checkclass.cpp, test/testunusedprivfunc.cpp: private - functions: don't report false positives when using initialization - lists (#254) - -2009-04-13 Daniel Marjamäki - - * src/checkstl.cpp, src/checkstl.h, test/teststl.cpp: STL boundries: - added new check written by Bill Eggert (#247) - -2009-04-13 Kimmo Varis - - * .gitignore: Improve gitignore file for VS. Improve gitignore to - ignore Visual Studio build directories and other VS generated files - not wanted in version control. - -2009-04-13 Reijo Tomperi - - * cppcheck.cbp, gui/threadhandler.cpp, src/check.h: Fix ticket #252 - (Fix --style warnings in cppcheck) - http://apps.sourceforge.net/trac/cppcheck/ticket/252 - -2009-04-12 Daniel Marjamäki - - * createrelease, src/cppcheck.cpp, win_installer/cppcheck.iss: - updated version to 1.31 - -2009-04-12 Daniel Marjamäki - - * test/testmathlib.cpp: math lib: 3/2 should result in 1 - -2009-04-10 Reijo Tomperi - - * src/checkstl.cpp, test/teststl.cpp: Fix ticket #248 (STL erase - check broken?) http://apps.sourceforge.net/trac/cppcheck/ticket/248 - -2009-04-10 Daniel Marjamäki - - * cppcheck.sln, cppcheck.vcproj, testrunner.sln, testrunner.vcproj: - changed mode of visual studio files - -2009-04-10 Daniel Marjamäki - - * cppcheck.sln, cppcheck.vcproj, testrunner.sln, testrunner.vcproj: - updated Visual Studio files - -2009-04-09 Reijo Tomperi - - * cppcheck.cbp: Add mathlib to codeblocks projectfile - -2009-04-09 Daniel Marjamäki - - * src/mathlib.cpp, src/mathlib.h: mathlib: Added licence text - -2009-04-06 Daniel Marjamäki - - * src/tokenize.cpp: simplify calculations: Don't simplify division - with 0 - -2009-04-06 Daniel Marjamäki - - * Makefile, src/tokenize.cpp: tokenize: use mathlib when simplifying - calculations (ticket: 236) - -2009-04-06 Daniel Marjamäki - - * Makefile, cppcheck.geany, src/mathlib.cpp, src/mathlib.h, - test/testmathlib.cpp: added testing for mathlib - -2009-04-06 Daniel Marjamäki - - * Makefile, src/mathlib.cpp, src/mathlib.h: Added math library that - was created by hoangtuansu - -2009-04-05 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix ticket #212 - (Tokenizer: Handle L "text") - http://apps.sourceforge.net/trac/cppcheck/ticket/212 - -2009-04-05 Reijo Tomperi - - * src/preprocessor.cpp: Fix ticket #244 (Headers from included file - are searched from wrong path) - http://apps.sourceforge.net/trac/cppcheck/ticket/244 - -2009-04-04 Leandro Lisboa Penz - - * .gitignore: .gitignore: do not show status of built files. - -2009-04-04 Leandro Lisboa Penz - - * test/testmemleak.cpp: checkmemoryleak: fixed and reactivated - forwhile9 and forwhile10 tests. - -2009-04-04 Reijo Tomperi - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fix ticket - #243 (boundary checking) - http://apps.sourceforge.net/trac/cppcheck/ticket/243 - -2009-04-03 Reijo Tomperi - - * test/testpreprocessor.cpp: astyle fix - -2009-04-03 Reijo Tomperi - - * src/cppcheck.cpp, src/preprocessor.cpp, src/preprocessor.h, - test/testpreprocessor.cpp: Fix ticket #242 (Preprocessor: Bail out - on failure instead of terminating the program) - http://apps.sourceforge.net/trac/cppcheck/ticket/242 - -2009-04-03 Reijo Tomperi - - * src/checksecurity.cpp: Fix some potential null pointer crashes - -2009-03-31 Daniel Marjamäki - - * src/checkclass.cpp, src/checkclass.h, test/testconstructors.cpp: - operator=: changed error message when variable is not assigned - -2009-03-31 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix ticket #239 - (missing function implementation in namespace causes crash) - http://apps.sourceforge.net/trac/cppcheck/ticket/239 - -2009-03-29 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: division with zero => - division by zero - -2009-03-29 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, test/testother.cpp: zero - division: it's an error - -2009-03-29 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: tokenizer: don't - replace sizeof when size can't be determined (#233) - -2009-03-28 Reijo Tomperi - - * src/checkautovariables.cpp: astyle fix - -2009-03-28 Gianluca Scacco - - * test/testautovariables.cpp: Added new test to autovariable - -2009-03-28 Gianluca Scacco - - * src/checkautovariables.cpp, test/testautovariables.cpp: Fixed - ticket #228: false positive with usage of an auto-variable - -2009-03-28 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Don't treat - typedefs as variable declarations (#234) - -2009-03-28 Daniel Marjamäki - - * test/testmemleak.cpp: Memory leaks: refactoring the TODO test - cases - -2009-03-28 Daniel Marjamäki - - * src/token.cpp, src/token.h, src/tokenize.cpp: performance - enhancement (patch submitted by davidmiller in ticket 231) - -2009-03-28 Nicolas Le Cam - - * test/testmemleak.cpp: Add TestMemleak::realloc4 that currently - fail. Change TestMemleak::if10, TestMemleak::forwhile8 and - TestMemleak::realloc2 as they are currently leaking memory, mark - them as TODO. Comment out TestMemleak::forwhile9 and - TestMemleak::forwhile10 as they are wrong (infinite loops). - -2009-03-28 Daniel Marjamäki - - * test/testother.cpp: removed TestOther::zeroDiv3 - it is not valid - -2009-03-28 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, test/testother.cpp: added - check for zero division. The code was written by Nguyen Duong Tuan - -2009-03-27 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, test/testother.cpp: possible - null pointer dereference after a while-loop - -2009-03-27 Daniel Marjamäki - - * src/checkother.h: moved checks back to style (where they used to - be) - -2009-03-27 Daniel Marjamäki - - * src/tokenize.cpp: tokenizer: fix segmentation fault if end of - token list is reached - -2009-03-25 Daniel Marjamäki - - * test/testclass.cpp, test/testmemleak.cpp, test/testsuite.h: - testing: new handling of todo test cases. If they use - TODO_ASSERT_EQUALS instead we can detect when they are fixed - -2009-03-25 Daniel Marjamäki - - * test/testtokenize.cpp: variable id: enabled test case for function - parameters - -2009-03-25 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: variable id: give - std::string variables an id - -2009-03-25 Daniel Marjamäki - - * src/checkautovariables.cpp: astyle formatting - -2009-03-25 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Buffer overrun: Added check to detect - when size argument to memset is a char constant (#213) - -2009-03-25 Daniel Marjamäki - - * src/tokenize.cpp, test/testmemleak.cpp, test/testtokenize.cpp: - simplify tokens (known variable values in conditions) - -2009-03-24 Gianluca Scacco - - * src/checkautovariables.cpp: Fixed Ticket #202: Return of the - address of an auto-variable - -2009-03-24 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: Fixed ticket 216 (False - positive: variable scope) - -2009-03-24 Daniel Marjamäki - - * src/checkclass.cpp: register CheckClass - -2009-03-24 Daniel Marjamäki - - * src/checkother.cpp: fixed testcase - -2009-03-24 Daniel Marjamäki - - * test/testother.cpp: added testcase - -2009-03-24 Daniel Marjamäki - - * src/checkother.cpp: Fixed ticket 197 (false positive: condition is - always true/false) - -2009-03-24 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: fixed - snprintf false positive (#210) - -2009-03-24 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h, test/testsimplifytokens.cpp: - Simplify if conditions more.. simplifyIfAssign + simplifyIfNot - -2009-03-23 Daniel Marjamäki - - * src/checkother.cpp, test/testcharvar.cpp: Fixed ticket 205 (False - positive: char variable used in bit operation) - -2009-03-23 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fixed the testcase - TestMemleak::realloc3 - -2009-03-23 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h, test/testsimplifytokens.cpp: - simplify tokens: move assignment out from condition (Ticket #201) - -2009-03-22 Daniel Marjamäki - - * test/testmemleak.cpp: added todo test case for ticket 200 - -2009-03-22 Vesa Pikki - - * gui/settingsdialog.cpp, gui/settingsdialog.h: Removed unnecessary - options from settings dialog. - -2009-03-22 Daniel Marjamäki - - * : commit a87419f59b099adc374d74a103835b66b7ee2f22 Author: Daniel - Marjamäki Date: Sun Mar 22 - 18:57:53 2009 +0100 - -2009-03-22 Vesa Pikki - - * gui/mainwindow.cpp: Added a window title. - -2009-03-22 Vesa Pikki - - * gui/common.h: Added license text. - -2009-03-22 Vesa Pikki - - * : commit 1e66d7f0e44949fc56e57b93cf1c106b736a363e Author: Vesa - Pikki Date: Sun Mar 22 19:41:32 2009 +0200 - -2009-03-22 Vesa Pikki - - * gui/mainwindow.cpp, gui/resultstree.cpp: Conflicts: gui/mainwindow.cpp gui/resultstree.cpp - -2009-03-22 Vesa Pikki - - * gui/common.h, gui/mainwindow.cpp, gui/mainwindow.h, - gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.cpp, - gui/resultsview.h: Merged gui branch to master. - -2009-03-22 Vesa Pikki - - * gui/mainwindow.cpp, gui/resultstree.cpp, gui/resultstree.h, - gui/resultsview.cpp: Astyle formatting. - -2009-03-22 Vesa Pikki - - * gui/common.h, gui/mainwindow.cpp, gui/mainwindow.h, - gui/resultstree.cpp, gui/resultstree.h, gui/resultsview.cpp, - gui/resultsview.h: Can now hide and show results based on cpp flags. - -2009-03-22 Vesa Pikki - - * gui/mainwindow.cpp, gui/mainwindow.h: Added view menu and buttons - for it. - -2009-03-22 Vesa Pikki - - * gui/mainwindow.cpp, gui/mainwindow.h, gui/resultstree.cpp, - gui/threadhandler.cpp, gui/threadhandler.h: Added recheck and clear - results buttons. - -2009-03-22 Vesa Pikki - - * gui/mainwindow.cpp, gui/threadhandler.cpp: astyle formatting. - -2009-03-22 Vesa Pikki - - * gui/mainwindow.cpp, gui/mainwindow.h, gui/resultstree.cpp, - gui/threadhandler.cpp, gui/threadhandler.h: Added recheck and clear - results buttons. - -2009-03-22 Vesa Pikki - - * gui/mainwindow.cpp, gui/resultstree.cpp, gui/settingsdialog.h, - gui/threadhandler.cpp, test/testautovariables.cpp: Astyle - formatting. - -2009-03-22 Vesa Pikki - - * : commit 5e1994068ad4d81d38cc9cbf4ff7beff58cdac25 Author: Vesa - Pikki Date: Sun Mar 22 14:32:07 2009 +0200 - -2009-03-22 Vesa Pikki - - * gui/checkdialog.cpp, gui/checkdialog.h: Removed check dialog. - Files to be checked are selected by default file open dialog with - all checking options enabled. - -2009-03-22 Daniel Marjamäki - - * Makefile: updated the Makefile - -2009-03-22 Gianluca Scacco - - * Makefile, test/testautovariables.cpp: Fixed error compiling - testautovariables - -2009-03-22 Daniel Marjamäki - - * src/checkautovariables.cpp: astyle code formatting - -2009-03-22 Daniel Marjamäki - - * : commit e017d5a07928fba2836dbcfa96d7ca42b3a4634c Author: Daniel - Marjamäki Date: Sun Mar 22 - 08:20:15 2009 +0100 - -2009-03-22 Gianluca Scacco - - * src/checkautovariables.cpp, src/checkautovariables.h: Refactoring - of CheckAutoVariables - -2009-03-21 Daniel Marjamäki - - * src/tokenize.cpp: improved the Tokenizer::setVarId to handle - function parameters better - -2009-03-21 Daniel Marjamäki - - * src/check.h, src/checkautovariables.cpp, - src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/checkmemoryleak.cpp, src/checkmemoryleak.h, src/errorlogger.h: - refactoring error messages - -2009-03-21 Daniel Marjamäki - - * Makefile: updated the MakeFile - -2009-03-21 Daniel Marjamäki - - * Makefile, src/checkautovariables.cpp: Fixed 188 (Return of auto - variable address), applied patched submitted by gscacco - -2009-03-21 Daniel Marjamäki - - * src/checkdangerousfunctions.cpp, src/checkdangerousfunctions.h, - src/checksecurity.cpp, src/checksecurity.h, src/errorlogger.h, - test/testsecurity.cpp: refactoring error messages - -2009-03-21 Daniel Marjamäki - - * src/checkclass.cpp, src/checkclass.h, src/checkmemoryleak.cpp, - src/checkmemoryleak.h, src/checkother.cpp, src/checkother.h, - src/checkstl.cpp, src/checkstl.h, src/errorlogger.h: refactoring - error messages - -2009-03-21 Daniel Marjamäki - - * cppcheck.geany: added geany project file - -2009-03-21 Daniel Marjamäki - - * src/checkstl.cpp, src/checkstl.h, test/teststl.cpp: refactoring - - handling the stlOutOfBounds error message the new way - -2009-03-21 Daniel Marjamäki - - * src/check.h, src/checkstl.h: refactoring - added a function - getErrorMessages that will be used to get a list of error messages - -2009-03-21 Daniel Marjamäki - - * src/checkautovariables.h, test/teststl.cpp: refactoring - fixed - the unit tests - -2009-03-21 Daniel Marjamäki - - * Makefile, tools/dmake.cpp, tools/errmsg.cpp: refactoring: The - errmsg is no longer supposed to generate the errorLogger code - -2009-03-21 Daniel Marjamäki - - * src/check.h, src/checkautovariables.h, src/checkbufferoverrun.h, - src/checkclass.h, src/checkdangerousfunctions.h, - src/checkmemoryleak.h, src/checkother.h, src/checkstl.h, - src/cppcheck.cpp: refactoring: there are now 2 functions for running - checks. 'runChecks' and 'runSimplifiedChecks' - -2009-03-20 Daniel Marjamäki - - * Makefile, cppcheck.cbp, src/check.h, src/checkstl.cpp: refactoring - -2009-03-20 Daniel Marjamäki - - * src/check.h, src/checkstl.cpp, src/checkstl.h: refactoring: - generate error message in the class - -2009-03-20 Daniel Marjamäki - - * src/check.h: refactoring: Added a function to the Check base class - that allows easier error reporting - -2009-03-20 Daniel Marjamäki - - * src/token.cpp: improved Token::tokAt to handle negative argument - too - -2009-03-20 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/checkdangerousfunctions.cpp, - src/checkdangerousfunctions.h, src/checkmemoryleak.cpp, - src/checkmemoryleak.h, src/checkother.cpp, src/checkother.h, - src/cppcheck.cpp, test/testcharvar.cpp, - test/testdangerousfunctions.cpp, test/testdivision.cpp, - test/testincompletestatement.cpp, test/testmemleak.cpp, - test/testmemleakmp.cpp, test/testother.cpp, - test/testredundantif.cpp, test/testunusedvar.cpp: refactoring the - rest of the classes - -2009-03-20 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/cppcheck.cpp, test/testbufferoverrun.cpp: refactoring - checkbufferoverrun - -2009-03-20 Daniel Marjamäki - - * src/checkclass.cpp, src/checkclass.h, src/cppcheck.cpp, - test/testclass.cpp, test/testconstructors.cpp, - test/testunusedprivfunc.cpp: refactoring CheckClass - -2009-03-20 Daniel Marjamäki - - * src/check.h, src/checkstl.cpp, src/checkstl.h: refactoring - -2009-03-19 Daniel Marjamäki - - * : commit 5565be0c74cbda4de3582dab1d057710de76d7ce Author: Daniel - Marjamäki Date: Thu Mar 19 - 21:20:08 2009 +0100 - -2009-03-19 Daniel Marjamäki - - * Makefile, src/checkautovariables.cpp, src/checkautovariables.h, - src/errorlogger.h, tools/errmsg.cpp: added and integrated - checkautovariables that gscacco created - -2009-03-19 Daniel Marjamäki - - * src/checkautovariables.cpp, src/checkautovariables.h, - test/teststl.cpp: astyle formatting - -2009-03-19 Daniel Marjamäki - - * Makefile, src/checkautovariables.cpp, src/checkautovariables.h, - src/errorlogger.h, tools/errmsg.cpp: added checkautovariables and - integrated it into cppcheck - -2009-03-19 Daniel Marjamäki - - * test/teststl.cpp: astyle formatting - -2009-03-19 Daniel Marjamäki - - * test/teststl.cpp: refactoring: fixed the teststl so it is runnable - again - -2009-03-19 Daniel Marjamäki - - * cppcheck.cbp, src/check.h, src/checkstl.cpp, src/checkstl.h, - src/cppcheck.cpp: refactoring: loop through all Check instances and - execute the runChecks function - -2009-03-19 Daniel Marjamäki - - * src/checkstl.cpp, src/checkstl.h: refactoring: removed the changes - to the error handling - -2009-03-18 Daniel Marjamäki - - * : commit a573c62cd532d3bdae381f8cf4696ec2e2eccd0a Author: Daniel - Marjamäki Date: Wed Mar 18 - 22:40:38 2009 +0100 - -2009-03-18 Nicolas Le Cam - - * test/testtokenize.cpp: Fix compilation on 64bit systems - -2009-03-18 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h, test/testtokenize.cpp: Fixed - ticket 184 (Tokenizer - Simplification: Split up variable - declarations) - -2009-03-18 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed tokenizer: "return - - 2 ;" --> "return -2 ;" - -2009-03-18 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #191 - (semicolon after #endif stop tokenizing of function) - http://apps.sourceforge.net/trac/cppcheck/ticket/191 - -2009-03-17 Reijo Tomperi - - * src/token.cpp: Astyle fix - -2009-03-17 Reijo Tomperi - - * Makefile, test/testmemleakmp.cpp, test/testtoken.cpp: Fixed some - memory leaks in test cases - -2009-03-17 Daniel Marjamäki - - * src/checkother.cpp, src/token.cpp, src/tokenize.cpp, - test/testtokenize.cpp: tokenize negative numbers into a single token - -2009-03-17 Reijo Tomperi - - * src/tokenize.cpp: Fix ticket #186 (runtime error when checking - code that has a namespace) - http://apps.sourceforge.net/trac/cppcheck/ticket/186 - -2009-03-17 Daniel Marjamäki - - * src/tokenize.cpp: Refactoring the code for the templates handling - -2009-03-17 Daniel Marjamäki - - * test/teststl.cpp: Added test case for detecting false positive in - the STL size handling - -2009-03-16 Reijo Tomperi - - * src/cppcheck.cpp, src/tokenize.cpp, src/tokenize.h: --debug flag - can be used to printout token list (for development purposes) - -2009-03-16 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #179 - (preprocessor issues) - http://apps.sourceforge.net/trac/cppcheck/ticket/179 - -2009-03-16 Daniel Marjamäki - - * test/testtokenize.cpp: Ticket #184 (Tokenizer - Simplification: - Split up variable declarations), added testcases - -2009-03-16 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: Fixed - Ticket #82 (detect buffer overrun; dynamic memory) - -2009-03-15 Reijo Tomperi - - * test/testpreprocessor.cpp: test case stringify3 added - -2009-03-15 Reijo Tomperi - - * src/tokenize.cpp, test/testmemleak.cpp, - test/testpreprocessor.cpp, test/testtokenize.cpp: Improved tokenizer - to handle '#' better. Previously everything after # was combined - into a single token, now # is considered more like an alphabet, with - few exceptions, e.g. "##" tokens. - -2009-03-15 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix Ticket 180 - (Templates: Expanding member functions that are not implemented - inline) - -2009-03-15 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: templates: replace - constructor/destructor names when expanding template classes - -2009-03-15 Reijo Tomperi - - * test/testpreprocessor.cpp: Test case stringify2() added. - -2009-03-15 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket #177 - (Tokenizer doesn't add braces around if-scope) - http://apps.sourceforge.net/trac/cppcheck/ticket/177 - -2009-03-15 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #181 - (#pragma causes wrong line numbers) - http://apps.sourceforge.net/trac/cppcheck/ticket/181 - -2009-03-15 Reijo Tomperi - - * src/checkmemoryleak.cpp, src/tokenize.cpp, src/tokenize.h: Improve - creation of link() for Token class. Tokenizer::simplifyTokenList() - should now return code where Token::link() actually works. - -2009-03-14 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: templates: better - handling of templates with multiple type arguments - -2009-03-14 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leak: handle - allocation in deallocation list - -2009-03-14 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: Memory leaks: Refactoring to use - Tokenizer::FindClassFunction. Enabled test case, the memory leak is - now detected - -2009-03-13 Daniel Marjamäki - - * : commit 3b29125d659c1cb4d1547cba3597b06a4b9454c9 Author: Daniel - Marjamäki Date: Fri Mar 13 - 22:38:42 2009 +0100 - -2009-03-13 Daniel Marjamäki - - * src/checkclass.cpp, src/checkclass.h, src/tokenize.cpp, - src/tokenize.h: refactoring: moved 'FindClassFunction' from - CheckClass to Tokenizer - -2009-03-13 Reijo Tomperi - - * src/token.cpp, src/token.h, src/tokenize.cpp: Fixed ticket #169 - (Add Token::link()) - http://apps.sourceforge.net/trac/cppcheck/ticket/169 - -2009-03-13 Daniel Marjamäki - - * test/testmemleak.cpp: TestMemleak: added two testcases for - checking for leaks in classes - -2009-03-13 Reijo Tomperi - - * src/token.cpp, src/token.h, src/tokenize.cpp, src/tokenize.h, - test/testsimplifytokens.cpp: Fix ticket #151 (Handling of - namespaces) http://apps.sourceforge.net/trac/cppcheck/ticket/151 - -2009-03-12 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: expanding template - classes - -2009-03-12 Daniel Marjamäki - - * src/checkclass.cpp, test/testconstructors.cpp: uninitialized const - pointer member variables - -2009-03-11 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: astyle style fixes - -2009-03-11 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: templates: simplify - template functions with 1 type argument - -2009-03-11 Reijo Tomperi - - * test/testpreprocessor.cpp: astyle fix - -2009-03-10 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: made the - Tokenizer::simplifyCasts more generic - -2009-03-10 Daniel Marjamäki - - * src/checkmemoryleak.cpp: Fixed ticket 134 (memory leak not - detected) caused by wrong checking if code is inside class function - or not - -2009-03-09 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fixed ticket 147 - (Invalid line number for error message) - -2009-03-09 Daniel Marjamäki - - * src/checksecurity.h: removed unused private function - CheckSecurity::eraseCheckLoop - -2009-03-09 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: simplify casts - -2009-03-09 Kimmo Varis - - * : commit 9698c6d96b86f608ff0473776584edb416a59d57 Author: Kimmo - Varis Date: Mon Mar 9 20:03:22 2009 +0200 - -2009-03-09 Vesa Pikki - - * : commit b3923b72ad48cc09ff4ec8355b0d406af02a580a Author: Kimmo - Varis Date: Mon Mar 9 19:58:38 2009 +0200 - -2009-03-09 Vesa Pikki - - * : commit 3d6e3d38bbc67a4742a1a775142867e0c254b07d Author: Vesa - Pikki Date: Mon Mar 9 19:35:43 2009 +0200 - -2009-03-09 Kimmo Varis - - * win_installer/cppcheck.iss: Build installer to Build directory in - project root. Currently installer is build to subdirectory of the - iss file which is not obvious place to find it. Also it is not good - practice to build executables to source directories. - -2009-03-09 Kimmo Varis - - * win_installer/cppcheck.iss: Set description for the installer - file. This description is shown in the explorer. - -2009-03-09 Kimmo Varis - - * win_installer/cppcheck.iss: Set user wiki URL as - application/support URL. The installer was setting Sf.net project - page as an URL which might be confusing for the users. Better use - the wiki page. - -2009-03-09 Kimmo Varis - - * win_installer/cppcheck.iss: Set version number for the installer - file. The installer file was missing a version number (was shown as - 0.0.0.0) in the Windows Explorer. Set the installer file version - number identical to product version number. - -2009-03-08 Reijo Tomperi - - * test/testpreprocessor.cpp: Added test case for #147 (Invalid line - number for error message) - http://apps.sourceforge.net/trac/cppcheck/ticket/147 - macro_linenumbers() in test/testpreprocessor.cpp - -2009-03-08 Reijo Tomperi - - * src/errorlogger.cpp: Fix ticket #148 (unable to compile with - g++-3.3) http://apps.sourceforge.net/trac/cppcheck/ticket/148 - -2009-03-08 Reijo Tomperi - - * man/cppcheck.1.xml: Man page copyright year changed to 2009 - -2009-03-08 Daniel Marjamäki - - * win_installer/cppcheck.iss: updated version to 1.30 in - installation script - -2009-03-08 Daniel Marjamäki - - * src/cppcheck.cpp: updated version to 1.30 - -2009-03-08 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Astyle fix - -2009-03-08 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix ticket #145 - (Line numbers are invalid if file is included inside #ifdef) - http://apps.sourceforge.net/trac/cppcheck/ticket/145 - -2009-03-07 unknown - - * gui/checkdialog.cpp, src/filelister.cpp: Windows Qt compilation - fixes. FileLister::RecursiveAddFiles failed to compile in Windows - when GUI was compiled. Since that method wasn't used in Qt build I - ifdeffed it out. Also removed vcl related code from checkdialog since that was - removed from release. - -2009-03-07 Reijo Tomperi - - * man/cppcheck.1.xml: Improve man page - -2009-03-07 Daniel Marjamäki - - * createrelease: createrelease updated to use git instead of svn - -2009-03-07 Daniel Marjamäki - - * man/cppcheck.1.xml, src/cppcheck.cpp: Fix ticket #140 (New command - line option --auto-dealloc), added documentation - -2009-03-07 Reijo Tomperi - - * Makefile, tools/dmake.cpp: Fix ticket #141 (changed the makefile), - changing compiler is now easier in the makefile. - http://apps.sourceforge.net/trac/cppcheck/ticket/141 - -2009-03-06 Reijo Tomperi - - * man/cppcheck.1.xml, src/cppcheck.cpp: Fix ticket #137 (--version - would be nice) and also do some cleanup for help texts - http://apps.sourceforge.net/trac/cppcheck/ticket/137 - -2009-03-06 Reijo Tomperi - - * src/threadexecutor.cpp: Fix ticket #139 (Compilation error on - building cppcheck version 1.29 with gcc-4.3.2 on Ubuntu 8.10) - http://apps.sourceforge.net/trac/cppcheck/ticket/139 - -2009-03-06 Daniel Marjamäki - - * src/cppcheck.cpp, src/settings.cpp, src/settings.h, - test/testmemleak.cpp: astyle formatting - -2009-03-06 Daniel Marjamäki - - * src/cppcheck.cpp: auto-deallocated classes: added command line - option for specifying .lst file - (http://apps.sourceforge.net/trac/cppcheck/ticket/120) - -2009-03-06 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/settings.cpp, src/settings.h, - test/testmemleak.cpp: added internal support for handling list of - classes that are automaticly deallocated - -2009-03-06 Reijo Tomperi - - * man/cppcheck.1.xml, src/checkstl.cpp, src/cppcheck.cpp, - src/cppcheckexecutor.cpp, src/cppcheckexecutor.h, src/main.cpp, - src/settings.cpp, src/settings.h: Fix ticket #135 (Add option to - control main() exit value) - -2009-03-05 Reijo Tomperi - - * src/checkstl.cpp, test/teststl.cpp: Fix segmentation fault that - happens with invalid code. - -2009-03-05 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix ticket #133 - (Segmentation fault when static_cast is in for loop) - -2009-03-05 Daniel Marjamäki - - * src/checkbufferoverrun.cpp: checkbufferoverrun: fixed bug - skip - some checks when variable id is unknown (Ticket: 138) - -2009-03-04 Daniel Marjamäki - - * src/cppcheck.cpp: reverted accidental changes committed in [1330] - -2009-03-04 Daniel Marjamäki - - * src/cppcheck.cpp, src/tokenize.cpp: fixed tokenizer problem when - reading char constants - -2009-03-04 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h: simplify calculations better - -2009-03-04 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: known variables: better - handling of ++ and -- - -2009-03-03 Reijo Tomperi - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Fix #132 (False - positive returning memcpy()) - -2009-03-03 Reijo Tomperi - - * src/token.cpp, test/testsimplifytokens.cpp, test/testtokenize.cpp: - Fix ticket Add/Change #125 (the printout of the token list is wrong) - -2009-03-03 Reijo Tomperi - - * src/token.cpp, src/token.h: Refactoring: Combined printOut() and - stringifyList() in Token class - -2009-03-03 Kimmo Varis - - * createrelease: Use svn export to export sources without SVN - folders. - -2009-03-03 Kimmo Varis - - * createrelease: Use variable for relase folder and version in - release script. - -2009-03-02 Daniel Marjamäki - - * src/checkclass.cpp, test/testunusedprivfunc.cpp: unused private - function: better handling of initialization lists in constructors - -2009-03-02 Vesa Pikki - - * gui/resultsview.cpp, gui/threadhandler.cpp, gui/threadresult.cpp: - Removed some unnecessary debug prints. - -2009-03-02 Vesa Pikki - - * gui/checkdialog.cpp, gui/checkdialog.h, gui/checkthread.cpp, - gui/checkthread.h, gui/resultstree.cpp, gui/resultsview.cpp, - gui/resultsview.h, gui/threadhandler.cpp, gui/threadhandler.h, - gui/threadresult.cpp, gui/threadresult.h, src/filelister.h: Now adds - directory contents to list of files to check. Only adds proper - (.cpp,.c,.cpp,...) files to the list of files to check. Modified - checkthread to clear results after each file. - -2009-03-02 Daniel Marjamäki - - * createrelease: createrelease: The script for creating the 1.29 - source packages - -2009-03-02 Daniel Marjamäki - - * src/checkclass.cpp, test/testunusedprivfunc.cpp: unused private - function: fixed false positive (ticket: 129) - -2009-03-01 Vesa Pikki - - * gui/checkdialog.cpp, gui/checkdialog.h, gui/checkthread.cpp, - gui/checkthread.h, gui/gui.pro, gui/mainwindow.cpp, - gui/mainwindow.h, gui/resultstree.cpp, gui/resultstree.h, - gui/resultsview.cpp, gui/resultsview.h, gui/threadhandler.cpp, - gui/threadhandler.h, gui/threadresult.cpp, gui/threadresult.h: Began - implementing ThreadExecutor with Qt threads. Still a work in - progress. Added tr to all strings. - -2009-03-01 Reijo Tomperi - - * man/cppcheck.1.xml: Copyright fix for the man page - -2009-03-01 Reijo Tomperi - - * man/cppcheck.1.xml: Copyright for the man page - -2009-03-01 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: memory leak: fixed issue with reporting wrong - location - -2009-03-01 Reijo Tomperi - - * src/threadexecutor.cpp: Fixed some compiling warnings by adding - more error checking. - -2009-03-01 Daniel Marjamäki - - * src/tokenize.cpp: removed deprecated flag 'firstMatch' - -2009-03-01 Reijo Tomperi - - * src/errorlogger.h, tools/errmsg.cpp: Copyright fixes - -2009-03-01 Reijo Tomperi - - * src/errorlogger.h, src/threadexecutor.cpp: Fixing compile problem - with new gcc - -2009-03-01 Reijo Tomperi - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/checkclass.cpp, src/checkclass.h, - src/checkdangerousfunctions.cpp, src/checkdangerousfunctions.h, - src/checkfunctionusage.cpp, src/checkfunctionusage.h, - src/checkheaders.cpp, src/checkheaders.h, src/checkmemoryleak.cpp, - src/checkmemoryleak.h, src/checkother.cpp, src/checkother.h, - src/checksecurity.cpp, src/checksecurity.h, src/checkstl.cpp, - src/checkstl.h, src/cppcheck.cpp, src/cppcheck.h, - src/cppcheckexecutor.cpp, src/cppcheckexecutor.h, - src/errorlogger.cpp, src/errorlogger.h, src/filelister.cpp, - src/filelister.h, src/main.cpp, src/preprocessor.cpp, - src/preprocessor.h, src/settings.cpp, src/settings.h, - src/threadexecutor.cpp, src/threadexecutor.h, src/token.cpp, - src/token.h, src/tokenize.cpp, src/tokenize.h, - test/testbufferoverrun.cpp, test/testcharvar.cpp, - test/testclass.cpp, test/testconstructors.cpp, - test/testcppcheck.cpp, test/testdangerousfunctions.cpp, - test/testdivision.cpp, test/testfilelister.cpp, - test/testfunctionusage.cpp, test/testincompletestatement.cpp, - test/testmemleak.cpp, test/testmemleakmp.cpp, test/testother.cpp, - test/testpreprocessor.cpp, test/testredundantif.cpp, - test/testrunner.cpp, test/testsecurity.cpp, - test/testsimplifytokens.cpp, test/teststl.cpp, test/testsuite.cpp, - test/testsuite.h, test/testtoken.cpp, test/testtokenize.cpp, - test/testunusedprivfunc.cpp, test/testunusedvar.cpp, - tools/dmake.cpp, tools/errmsg.cpp: Copyrights updated - -2009-03-01 Reijo Tomperi - - * cppcheck.cbp: Added GUI to codeblocks project file - -2009-03-01 Reijo Tomperi - - * src/errorlogger.h, tools/errmsg.cpp: Fixed another --style problem - with our code - -2009-03-01 Reijo Tomperi - - * src/threadexecutor.cpp, src/threadexecutor.h: Fixed bug, -j option - produced duplicate error messages. - -2009-03-01 Reijo Tomperi - - * src/errorlogger.cpp, src/errorlogger.h, tools/errmsg.cpp: Use - reference instead of string copy (fixes some --style warnings from - our code) - -2009-03-01 Daniel Marjamäki - - * src/cppcheck.cpp: removed the '--vcl' flag from the console app - -2009-03-01 Reijo Tomperi - - * man/cppcheck.1.xml: Removed --vcl fromt he man page - -2009-03-01 Reijo Tomperi - - * man/cppcheck.1.xml: Updated man page for --vcl - -2009-03-01 Daniel Marjamäki - - * src/tokenize.cpp, test/testother.cpp, test/testtokenize.cpp: - variable id: fixed so that the variable ids are assigned correctly - (ticket:126) - -2009-03-01 Vesa Pikki - - * gui/checkdialog.cpp, gui/checkdialog.h, gui/checkthread.cpp, - gui/checkthread.h, gui/gui.pro, gui/main.cpp, gui/mainwindow.cpp, - gui/mainwindow.h, gui/resultstree.cpp, gui/resultstree.h, - gui/resultsview.cpp, gui/resultsview.h, gui/settingsdialog.cpp, - gui/settingsdialog.h, runastyle, runastyle.bat: Began implementing a - simple Qt based GUI. Also modified astyle scripts to format gui - code aswell. - -2009-02-28 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: variable - declarations: don't simplify when declaring and assigning array in - the same statement - -2009-02-28 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: variable id: handling - 'return' and 'else' better - -2009-02-28 Daniel Marjamäki - - * test/testsimplifytokens.cpp, test/testtokenize.cpp: moved sizeof - tests to the TestSimplifyTokens class - -2009-02-28 Daniel Marjamäki - - * test/testtokenize.cpp: refactoring unit tests - -2009-02-28 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: sizeof: fixed a problem - with 'sizeof(varname)' but there are more to fix with it - -2009-02-27 Reijo Tomperi - - * src/cppcheck.cpp, src/cppcheck.h: Added Cppcheck::clearFiles() - function. - -2009-02-27 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: simplify known variable: - don't simplify this ';i++;' - -2009-02-27 Daniel Marjamäki - - * src/checkfunctionusage.cpp: unused functions: fixed false - positives - -2009-02-27 Daniel Marjamäki - - * test/testbufferoverrun.cpp: Reverted changes made in [1289] - -2009-02-27 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: simplify tokens: - fixed bug when removing redundant parantheses around variable - -2009-02-26 Daniel Marjamäki - - * test/testbufferoverrun.cpp: array index out of bounds: Added todo - test case TestBufferOverrun::array_index_13 for ticket #118 - -2009-02-26 Kimmo Varis - - * win_installer/cppcheck.iss: Use 'folder' instead of 'directory' in - Windows installer. - -2009-02-25 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: simplify tokens: - remove redundant parantheses around variable.. 'p = (q);' - -2009-02-25 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leak: Fixed - a false positive when all is given - -2009-02-25 Daniel Marjamäki - - * src/checkclass.cpp, test/testunusedprivfunc.cpp: unused private - function: Handle 'embedded' function implementations better - -2009-02-24 Daniel Marjamäki - - * src/checkclass.cpp: checkclass: refactoring - -2009-02-24 Daniel Marjamäki - - * src/checkclass.cpp, test/testunusedprivfunc.cpp: reverted [1282] - because some changes were committed by mistake - -2009-02-24 Daniel Marjamäki - - * src/checkclass.cpp, test/testunusedprivfunc.cpp: checkclass: - refactoring - -2009-02-24 Daniel Marjamäki - - * src/tokenize.cpp: sizeof fix. classes and structs are always given - the size 100. This removes false positives about mismatching size - -2009-02-24 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: simplify tokens: simplify - known variable value handles ++ and -- better - -2009-02-24 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leak: fixed - false positive when using 'return strcpy' - -2009-02-23 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leaks: - improved handling of --vcl - -2009-02-22 Reijo Tomperi - - * man/cppcheck.1.xml, src/cppcheck.cpp, src/cppcheckexecutor.cpp, - src/settings.cpp, src/settings.h, src/threadexecutor.cpp: Change -w - to -j to make it similar with make and scons. - -2009-02-22 Kimmo Varis - - * src/cppcheck.rc: Windows RC file is ANSI file, storing as UTF-8 - messes it up. - -2009-02-22 Reijo Tomperi - - * src/errorlogger.h, tools/errmsg.cpp: Members of - ErrorLogger::ErrorMessage made public for better access to them. - -2009-02-22 Reijo Tomperi - - * src/cppcheck.cpp, src/cppcheck.h: CppCheck::addFile() accepts - paths also now. - -2009-02-21 Daniel Marjamäki - - * cppcheck.cbp: codeblocks: Updated the project file with the new - security check - -2009-02-21 Daniel Marjamäki - - * src/checkclass.cpp, src/tokenize.cpp, test/testclass.cpp: - constructors: don't warn about missing constructor if class only has - static variable members - -2009-02-21 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: buffer - overrun: catch cases when using cin to read to a char array - -2009-02-21 Daniel Marjamäki - - * Makefile, src/checksecurity.cpp, src/checksecurity.h, - test/testsecurity.cpp: security: renamed classes - -2009-02-21 Daniel Marjamäki - - * Makefile, src/checksecurity.cpp, src/checksecurity.h, - src/checkvalidate.cpp, src/checkvalidate.h, test/testsecurity.cpp, - test/testvalidate.cpp: security: Renamed files - -2009-02-21 Daniel Marjamäki - - * src/checkclass.cpp, test/testclass.cpp: TestClass: Added test for - uninitialized "mutable int i" - -2009-02-21 Daniel Marjamäki - - * cppcheck.vcproj: Visual C++: Updated the project file to include - the thread execution - -2009-02-20 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: buffer - overrun: dangerous usage of strncpy+strncat - -2009-02-20 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/errorlogger.h, - test/testbufferoverrun.cpp, tools/errmsg.cpp: buffer overrun: Added - checking of strncat - -2009-02-20 Daniel Marjamäki - - * test/testbufferoverrun.cpp: added todo testcases for strncat - checking - -2009-02-20 Daniel Marjamäki - - * src/threadexecutor.cpp: g++: fixed compiler errors - -2009-02-20 Reijo Tomperi - - * man/cppcheck.1.xml, src/cppcheck.cpp, src/cppcheckexecutor.cpp, - src/settings.cpp, src/settings.h, src/threadexecutor.cpp, - src/threadexecutor.h, tools/errmsg.cpp: Fix ticket #113 (Add support - for multi core CPUs and -w parameter to specifify amount of worker - threads) - -2009-02-20 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: simplify known variables: - variable used as array index - -2009-02-20 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/cppcheck.cpp, src/errorlogger.h, - src/settings.cpp, src/settings.h, test/testmemleak.cpp: memory leak: - Added command line flag '--vcl' that is used to suppress error - messages for VCL code - -2009-02-19 Reijo Tomperi - - * Makefile, cppcheck.cbp, src/cppcheck.cpp, src/cppcheck.h, - src/cppcheckexecutor.cpp, src/cppcheckexecutor.h, - src/errorlogger.cpp, src/errorlogger.h, src/threadexecutor.cpp, - src/threadexecutor.h, test/testsuite.h, tools/errmsg.cpp: Multicore - cpu support for Linux (currently disabled and compiling produces - warnings) "no errors" output removed. - -2009-02-19 Daniel Marjamäki - - * src/checkvalidate.cpp, src/checkvalidate.h, src/errorlogger.h, - src/settings.cpp, src/settings.h, test/testvalidate.cpp, - tools/errmsg.cpp: security: added simple gui checking - -2009-02-19 Daniel Marjamäki - - * Makefile, src/checkvalidate.cpp, src/checkvalidate.h, - src/errorlogger.h, test/testvalidate.cpp, testrunner.vcproj, - tools/errmsg.cpp: input validation: added checking - -2009-02-18 Daniel Marjamäki - - * test/testsimplifytokens.cpp: fixed failed tests - -2009-02-18 Daniel Marjamäki - - * test/testsimplifytokens.cpp: reverted [1254] it was made by - mistake - -2009-02-18 Daniel Marjamäki - - * test/testsimplifytokens.cpp: stl push_back: Added check (invalid - iterator) - -2009-02-18 Daniel Marjamäki - - * src/checkstl.cpp, src/checkstl.h, src/cppcheck.cpp, - src/errorlogger.h, test/teststl.cpp, tools/errmsg.cpp: stl - push_back: Added check (invalid iterator) - -2009-02-17 Daniel Marjamäki - - * src/tokenize.cpp: activated the Tokenizer::elseif functionality - -2009-02-17 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h, test/testsimplifytokens.cpp: - Added Tokenizer::elseif for breaking up 'else if' into 'else { if - ..' - -2009-02-16 Daniel Marjamäki - - * test/testtokenize.cpp: varid: Added a todo test case for giving - function parameters varid - -2009-02-16 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: tokenizer: fixed issues - related to variable ids * use setVarId in simplifyTokenList * make sure function parameters and variables declared in for - example for loops get variable ids - -2009-02-15 Reijo Tomperi - - * src/tokenize.cpp: astyle fix - -2009-02-15 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: tokenizer: improved the - simplification of '*(var+num)' => 'var[num]' - -2009-02-15 Daniel Marjamäki - - * src/tokenize.cpp, test/testsimplifytokens.cpp: tokenizer: Remove - redundant parantheses around number. Ticket: #105 - -2009-02-15 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: Tokenizer: Fixed bug in - tokenizer that removed '\' from preprocessor lines Ticket: #106 - -2009-02-15 Daniel Marjamäki - - * src/filelister.cpp: FileLister: handle '\\' path separator the - same way '/' is handled - -2009-02-15 Daniel Marjamäki - - * src/filelister.cpp: filelister: use '\\' instead of '/' in windows - paths - -2009-02-14 Reijo Tomperi - - * src/preprocessor.cpp: Code comments updated - -2009-02-14 Reijo Tomperi - - * src/errorlogger.h, tools/errmsg.cpp: Code comments updated - -2009-02-14 Reijo Tomperi - - * test/testtokenize.cpp: Added test case TestTokenizer::sizeof5 - -2009-02-14 Reijo Tomperi - - * src/token.cpp, src/tokenize.cpp, test/testtokenize.cpp: Constant - variable converting converted struct members (foo.a => foo.45) also, - fixed that. - -2009-02-14 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Fix ticket #107 - (Convert + + into + and + - into -) and add test case for it - -2009-02-14 Reijo Tomperi - - * test/testsimplifytokens.cpp: Fixed typos in test case and enabled - it. - -2009-02-14 Reijo Tomperi - - * src/tokenize.cpp: astyle fix - -2009-02-14 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: tokenizer: tokenize '++', - '--' and '>>' correctly - -2009-02-14 Reijo Tomperi - - * src/cppcheck.cpp, src/errorlogger.h, test/testclass.cpp, - test/testconstructors.cpp, tools/errmsg.cpp: Fix ticket #104 (Change - (error) Uninitialized member variable -> (style) Member variable not - initialized in the constructor) - -2009-02-14 Daniel Marjamäki - - * src/cppcheck.cpp: debug output: commented out the code for writing - token listing - -2009-02-14 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leak: handle - 'delete (p)' and 'delete [] (p)'. Fixes ticket 102 - -2009-02-14 Daniel Marjamäki - - * src/cppcheck.cpp, src/tokenize.cpp: simplify known value: insert - known variable value into calculations - -2009-02-13 Daniel Marjamäki - - * test/testtokenize.cpp: simplify tokens: added todo test case, the - varid is lost when simplifying variable declarations - -2009-02-13 Daniel Marjamäki - - * test/testtokenize.cpp: simplify token list: Added a TODO test - case. variable id is lost - -2009-02-13 Leandro Penz - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - support for ##-comma-eating in variadic macros; passing now fmt2 - test. - -2009-02-13 Leandro Penz - - * src/tokenize.cpp, test/testtokenize.cpp: Tokenizer: fixed ## - tokenization. - -2009-02-13 Leandro Penz - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Preprocessor: - initial variadic macro support; passing now on fmt1 case. - -2009-02-13 Daniel Marjamäki - - * src/token.cpp, src/token.h, test/testtokenize.cpp: - Token::stringifyList: Added function that stringifies a token list - -2009-02-12 Reijo Tomperi - - * test/testsimplifytokens.cpp: Improved test case "double_plus" - -2009-02-12 Reijo Tomperi - - * src/token.cpp, test/testsimplifytokens.cpp: Added test case - double_plus and improved Token::printOut - -2009-02-12 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket #100 (Simplify - constants simplifies leaks out from variable scope and simplifies - whole file) - -2009-02-12 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, test/testbufferoverrun.cpp: buffer - overruns: added simple support for initialized array - -2009-02-12 Leandro Penz - - * src/checkother.cpp, test/testincompletestatement.cpp: Incomplete - statements: removed false positive when setting array of structures - or multi-dimensional arrays. - -2009-02-11 Reijo Tomperi - - * test/testtokenize.cpp: Test case TestTokenizer::simplify_constants - added (commented out) - -2009-02-11 Daniel Marjamäki - - * src/checkstl.cpp, test/teststl.cpp: stl dangerous usage of erase: - Added test cases about using return and goto - -2009-02-11 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - test/testbufferoverrun.cpp: buffer overrun: improved checking of - global variables - -2009-02-11 Leandro Penz - - * src/checkother.cpp, test/testincompletestatement.cpp: Incomplete - statement: fixed and enabled intarray test case. - -2009-02-11 Leandro Penz - - * test/testincompletestatement.cpp: Incomplete statement: test case - for statement that begins with numeric constant. - -2009-02-11 Daniel Marjamäki - - * Makefile, src/checkbufferoverrun.cpp, src/checkbufferoverrun.h: - checkbufferoverrun: cleaned up the header includes - -2009-02-11 Daniel Marjamäki - - * Makefile: updated the Makefile - -2009-02-11 Daniel Marjamäki - - * src/checkstl.cpp, src/checkstl.h, src/cppcheck.cpp, - src/errorlogger.h, test/teststl.cpp, tools/errmsg.cpp: dangerous - usage of erase: added check - -2009-02-10 Kimmo Varis - - * cppcheck.vcproj, testrunner.vcproj: Update Visual Studio project - files. - -2009-02-10 Reijo Tomperi - - * src/checkheaders.cpp, src/cppcheck.cpp, src/cppcheck.h, - src/cppcheckexecutor.cpp, src/cppcheckexecutor.h, - src/errorlogger.cpp, src/errorlogger.h, test/testsuite.cpp, - test/testsuite.h, tools/errmsg.cpp: Refactoring: reportErr takes now - only one parameter, ErrorLogger::ErrorMessage, which contains all - required information and also some help functions for formatting it - for output. - -2009-02-10 Daniel Marjamäki - - * src/checkstl.cpp, test/teststl.cpp: stl: added testcase for bad - iterator usage - -2009-02-10 Reijo Tomperi - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/checkstl.cpp, src/checkstl.h, src/cppcheck.cpp, - test/testbufferoverrun.cpp, test/teststl.cpp: Moved stloutofbounds - check to CheckStl class. - -2009-02-10 Daniel Marjamäki - - * cppcheck.cbp: codeblocks: updated the project file - -2009-02-10 Daniel Marjamäki - - * src/checkstl.cpp: astyle coding style update - -2009-02-10 Daniel Marjamäki - - * Makefile, src/checkstl.cpp, src/checkstl.h, src/cppcheck.cpp, - src/errorlogger.h, test/teststl.cpp, tools/errmsg.cpp: STL: added - check for iterator usage - -2009-02-10 Reijo Tomperi - - * src/checkbufferoverrun.cpp, src/errorlogger.h, tools/errmsg.cpp: - stlOutOfBounds error message created - -2009-02-09 Reijo Tomperi - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - test/testbufferoverrun.cpp: Fix ticket #94 (STL container overrun). - Check is currently behind --all - -2009-02-09 Reijo Tomperi - - * man/cppcheck.1.xml, src/checkdangerousfunctions.cpp, - src/checkheaders.cpp, src/cppcheck.cpp, src/cppcheck.h, - src/cppcheckexecutor.cpp, src/cppcheckexecutor.h, - src/errorlogger.cpp, src/errorlogger.h, src/tokenize.cpp, - src/tokenize.h, test/testdangerousfunctions.cpp, - test/testsuite.cpp, test/testsuite.h, tools/errmsg.cpp: Fix ticket - #93 (Write xml results into error stream instead of results.xml - file.) and also refactor the code to use ErrorLogger::reportErr() - for all errors, for both xml and plain text. And move xml formatting - from Cppcheck to CppcheckExecutor. - -2009-02-09 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: memory leak: keep track of --all better - -2009-02-09 Daniel Marjamäki - - * test/testincompletestatement.cpp: incomplete statement: added a - testcase for a false positive - -2009-02-09 Kimmo Varis - - * cppcheck.vcproj: Update Visual Studio project file. - -2009-02-09 Daniel Marjamäki - - * src/checkclass.cpp, test/testclass.cpp: uninitialized variables: - added testcases and made a fix - -2009-02-08 Reijo Tomperi - - * cppcheck.cbp: Update to codeblocks project file - -2009-02-08 Reijo Tomperi - - * Makefile, cppcheck.cbp, src/checkbufferoverrun.cpp, - src/checkclass.cpp, src/checkdangerousfunctions.cpp, - src/checkfunctionusage.cpp, src/checkmemoryleak.cpp, - src/checkother.cpp, src/cppcheck.cpp, src/errorlogger.cpp, - src/errorlogger.h, src/errormessage.cpp, src/errormessage.h, - tools/dmake.cpp, tools/errmsg.cpp: Fix ticket #80 (refactoring: - classes ErrorMessage and ErrorLogger), note that errormessage and - errorlogger were merged, errormessage.* is no more. - -2009-02-08 Daniel Marjamäki - - * test/testmemleak.cpp: Memory leak: Test code was supposed to call - unknown function - -2009-02-08 Daniel Marjamäki - - * src/errormessage.h, test/testmemleak.cpp, tools/errmsg.cpp: - mismatching allocation size: moved to error suite - -2009-02-08 Daniel Marjamäki - - * test/testmemleak.cpp: Memory leaks: Make sure leak is found even - when using unknown functions - -2009-02-08 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leak: find - memory leak in TestMemleak::unknownFunction2 - -2009-02-08 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leak: - Handling function that can't be traced into - -2009-02-08 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed issue about 4+5 - being made a single token, problem appeared in recent commits. - -2009-02-08 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fix ticket #89 (False - positive, (style) Redundant code - begins with numeric constant - (e-value)) - -2009-02-08 Reijo Tomperi - - * src/tokenize.cpp, test/testincompletestatement.cpp, - test/testtokenize.cpp: Improve fix made for Ticket #85 to handle - strings that are in 3 parts also. - -2009-02-08 Reijo Tomperi - - * src/tokenize.cpp, test/testincompletestatement.cpp, - test/testtokenize.cpp: Fixed ticket #88 (False positive, (style) - Redundant code - begins with numeric constant) - -2009-02-08 Reijo Tomperi - - * src/tokenize.cpp, test/testincompletestatement.cpp, - test/testsimplifytokens.cpp: Fix ticket #85 (False positive (style) - Redundant code, begins with string) - -2009-02-08 Daniel Marjamäki - - * test/testmemleak.cpp: Memory leaks: Added todo testcase - handle - function calls that can't be followed - -2009-02-07 Reijo Tomperi - - * src/token.cpp, src/token.h: Fixed compiler warning ( #81 ) and - optimized the speed a little. Removed _cstr from Token class, use - _str.c_str() instead. - -2009-02-07 Reijo Tomperi - - * src/cppcheck.cpp, src/tokenize.cpp, test/testpreprocessor.cpp: - Fixed more of ticket #81 (getting rid of compiler warnings) - -2009-02-07 Reijo Tomperi - - * src/checkmemoryleak.h, src/checkother.h, src/preprocessor.h, - src/tokenize.h, test/testbufferoverrun.cpp, test/testcharvar.cpp, - test/testclass.cpp, test/testconstructors.cpp, - test/testdangerousfunctions.cpp, test/testdivision.cpp, - test/testfunctionusage.cpp, test/testincompletestatement.cpp, - test/testmemleak.cpp, test/testmemleakmp.cpp, - test/testpreprocessor.cpp, test/testredundantif.cpp, - test/testtokenize.cpp, test/testunusedprivfunc.cpp, - test/testunusedvar.cpp: Fix ticket #84 (unit testing: use - "protected" instead of preprocessor) - -2009-02-07 Reijo Tomperi - - * src/checkmemoryleak.cpp, src/tokenize.cpp, test/testtokenize.cpp: - Fix ticket #83 (cppcheck hangs) and add a test case for it - -2009-02-07 Daniel Marjamäki - - * src/checkmemoryleak.cpp: Borland C++: Fix to make it compile - -2009-02-07 Reijo Tomperi - - * src/cppcheck.cpp: Fixed partially ticket #81 (getting rid of - compiler warnings) - -2009-02-07 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - src/errormessage.h, src/tokenize.cpp, test/testmemleak.cpp, - tools/errmsg.cpp: memory allocation: check for mismatching size - -2009-02-07 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: TestMemleak: fixed - problems with wrong linenumbers. This fixes ticket 79 - -2009-02-07 Daniel Marjamäki - - * cppcheck.cbproj: Borland C++: Added CheckDangerousFunctions.* to - the project - -2009-02-07 Daniel Marjamäki - - * src/filelister.cpp: FileLister: Added code that I received from - Jeffrey Walton to handle directories and files better - -2009-02-06 Daniel Marjamäki - - * test/testmemleak.cpp: TestMemleak: Fixed tests - -2009-02-06 Daniel Marjamäki - - * src/cppcheck.cpp, src/errormessage.h, tools/errmsg.cpp: mismathing - allocation and deallocation: moved to error checks - -2009-02-06 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testcppcheck.cpp, - test/testmemleak.cpp: errmsg: use the error message dealloc-use - -2009-02-06 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: memleak: removed false positives for - mismatching allocation and deallocation - -2009-02-05 Reijo Tomperi - - * src/errormessage.h, test/testbufferoverrun.cpp, - test/testclass.cpp, test/testconstructors.cpp, - test/testcppcheck.cpp, test/testdivision.cpp, test/testmemleak.cpp, - test/testother.cpp, tools/errmsg.cpp: Fixed: Ticket #78 Change - (always) into (error) in error messages - -2009-02-05 Reijo Tomperi - - * test/testcppcheck.cpp: Added test case linenumbers2 - -2009-02-05 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/cppcheck.cpp, test/testmemleak.cpp: - memleak: corrected the wrong line number (#77) - -2009-02-05 Reijo Tomperi - - * Makefile, cppcheck.cbp, test/testcppcheck.cpp: testcppcheck.cpp - file added, test case "linenumbers" added, codeblocks project file - updated - -2009-02-05 Daniel Marjamäki - - * src/checkother.cpp, test/testincompletestatement.cpp: incomplete - statement: minor update - -2009-02-04 Daniel Marjamäki - - * test/testclass.cpp: activated TestClass:function - -2009-02-04 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: remove casts: Added test - case to ensure that function declarations are not reduced - -2009-02-04 Daniel Marjamäki - - * test/testclass.cpp, test/testtokenize.cpp: testclass: added todo - testcase for #74 - -2009-02-04 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, src/errormessage.h, - test/testother.cpp, tools/errmsg.cpp: returning pointer to local - array - -2009-02-04 Daniel Marjamäki - - * src/checkother.cpp, test/testcharvar.cpp: charvar: fixed todo - testcase - -2009-02-04 Daniel Marjamäki - - * test/testbufferoverrun.cpp: testbufferoverrun: activated test - -2009-02-04 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: memory leak: fixed ticket #9 - -2009-02-03 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed varid is 0 bug - which happened with sizeof(var[0]) and added testcase for it - -2009-02-02 Reijo Tomperi - - * testrunner.vcproj: Updated testrunner.vcproj files - -2009-02-02 Daniel Marjamäki - - * testrunner.vcproj: visual c++: added checkdangerousfunctions - -2009-02-02 Daniel Marjamäki - - * createrelease: added createrelease script - -2009-02-02 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: tokenizer: setvarid - handle variable declaration at start of token list - -2009-02-02 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: Tokenizer: sizeof - handling of 'sizeof(var[0])' - -2009-02-02 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: Tokenizer: setVarId - improved to handle declaration at the first token - -2009-02-02 Daniel Marjamäki - - * src/tokenize.cpp, test/testbufferoverrun.cpp, - test/testtokenize.cpp: tokenizer: improved sizeof handling - -2009-02-02 Daniel Marjamäki - - * test/testtokenize.cpp: TestTokenize: Added testcase sizeof2 (TODO) - -2009-02-02 Daniel Marjamäki - - * test/testtokenize.cpp: testtokenize: sizeof handling - -2009-02-02 Daniel Marjamäki - - * test/testmemleak.cpp: testmemleak: fixed a test case - -2009-02-02 Daniel Marjamäki - - * src/checkmemoryleak.cpp: memory leaks: Minor fix to output correct - severity - -2009-02-02 Daniel Marjamäki - - * test/testmemleak.cpp: TestMemleak: Added test cases - -2009-02-01 Daniel Marjamäki - - * src/cppcheck.cpp, src/cppcheck.h, src/cppcheckexecutor.cpp, - src/cppcheckexecutor.h, src/errorlogger.h, src/errormessage.cpp, - src/errormessage.h, src/settings.cpp, src/settings.h, - test/testsuite.cpp, test/testsuite.h, tools/errmsg.cpp: xml: - generating better xml output - -2009-02-01 Daniel Marjamäki - - * tools/errmsg.cpp: astyle formatting - -2009-02-01 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/checkclass.cpp, src/checkfunctionusage.cpp, - src/checkmemoryleak.cpp, src/checkother.cpp, src/errormessage.cpp, - src/errormessage.h, tools/errmsg.cpp: errmsg: refactoring the error - messages - -2009-02-01 Daniel Marjamäki - - * src/cppcheck.cpp, src/cppcheck.rc, win_installer/cppcheck.iss: - changed version to 1.28 - -2009-01-31 Reijo Tomperi - - * src/checkdangerousfunctions.cpp, src/checkdangerousfunctions.h, - src/checkmemoryleak.cpp, src/checkmemoryleak.h: Removed some dead - code and improved one function to use reference instead of a copy. - -2009-01-31 Reijo Tomperi - - * man/cppcheck.1.xml: Fixed man page, previous version had - while < and > should be used. - -2009-01-31 Reijo Tomperi - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/checkdangerousfunctions.cpp, src/checkdangerousfunctions.h, - src/checkother.h, src/preprocessor.h: Fixing files using dos-style - line change to use unix-style line change. - -2009-01-31 Reijo Tomperi - - * cppcheck.cbp: Updated codeblocks projectfile - -2009-01-31 Daniel Marjamäki - - * tools/errmsg.cpp: removed unused function definition for - stringifySeverity - -2009-01-31 Kimmo Varis - - * cppcheck.vcproj: Add new files (Src/checkdangerousfunctions.cpp - and .h) to Visual Studio project. - -2009-01-31 Reijo Tomperi - - * src/checkdangerousfunctions.cpp, test/testdangerousfunctions.cpp: - Running astyle for the previous commits - -2009-01-31 Leandro Penz - - * Makefile, src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/checkdangerousfunctions.cpp, src/checkdangerousfunctions.h, - src/cppcheck.cpp, test/testdangerousfunctions.cpp: - dangerousfunctions: added check for mktemp (ticket #69), and - refatored gets and scanf check from bufferoverrun into - dangerousfunctions. - -2009-01-31 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/cppcheck.cpp, src/errormessage.h, - test/testmemleak.cpp, tools/errmsg.cpp: mismatching allocation / - deallocation: moved to --all - -2009-01-31 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - src/errormessage.h, test/testmemleak.cpp, tools/errmsg.cpp: errmsg: - output severity in messages. a fix to track severity in the memory - leaks check - -2009-01-31 Daniel Marjamäki - - * test/testmemleak.cpp: mismatching allocation and deallocation: - added test case that currently generates false positives - -2009-01-31 Daniel Marjamäki - - * src/errormessage.h, test/testbufferoverrun.cpp, - test/testcharvar.cpp, test/testclass.cpp, - test/testconstructors.cpp, test/testdivision.cpp, - test/testincompletestatement.cpp, test/testmemleak.cpp, - test/testother.cpp, test/testredundantif.cpp, - test/testunusedprivfunc.cpp, test/testunusedvar.cpp, - tools/errmsg.cpp: errmsg: write severity in the message - -2009-01-30 Daniel Marjamäki - - * test/testbufferoverrun.cpp: added test case - TestBufferOverrun::sizeof2 - -2009-01-30 Daniel Marjamäki - - * test/testcharvar.cpp: added todo testcase - -2009-01-28 Reijo Tomperi - - * man/cppcheck.1.xml: Updated man page for --unused-functions and - --xml-results - -2009-01-28 Daniel Marjamäki - - * test/testpreprocessor.cpp: preprocessor: Added testcase fmt2 that - is commented out because it doesn't work yet - -2009-01-28 Kimmo Varis - - * cppcheck.vcproj: Visual Studio: Remove incremental linking from - release target due to other option disabling it and causing warning: - Linking... LINK : warning LNK4075: ignoring '/INCREMENTAL' due to - '/OPT:ICF' specification - -2009-01-28 Daniel Marjamäki - - * src/tokenize.cpp, test/testbufferoverrun.cpp: tokenizer: fixed - TestTokenizer::sizeof1 - -2009-01-28 Daniel Marjamäki - - * src/cppcheck.cpp, src/settings.cpp, src/settings.h: unused - functions: Created command line parameter --unused-functions - -2009-01-28 Daniel Marjamäki - - * src/cppcheck.cpp, src/settings.cpp, src/settings.h: xml results: - added a command line switch for generating simple results.xml file - -2009-01-28 Daniel Marjamäki - - * test/testbufferoverrun.cpp: bad sizeof handling - -2009-01-28 Leandro Penz - - * src/checkmemoryleak.cpp: MatchFunctionsThatReturnArg: calling - Match only once. - -2009-01-27 Reijo Tomperi - - * src/tokenize.cpp, test/testsimplifytokens.cpp: Partial support for - sizeof x, by converting it into sizeof(x). Does not handle complex - structures. Closing ticket #65 - -2009-01-27 Reijo Tomperi - - * src/token.cpp, src/token.h, test/testtokenize.cpp: Fixed bug in - multiCompare, which fixes ticket #66 ([False positive] "Buffer - overrun" with "--all") - -2009-01-27 Daniel Marjamäki - - * test/testclass.cpp: uninitialized member: don't check private - constructors - -2009-01-27 Daniel Marjamäki - - * src/tokenize.cpp: function parameters: fixed segmentation fault - (derefence null) - -2009-01-27 Daniel Marjamäki - - * src/checkother.cpp: sprintf overlapping data - -2009-01-26 Reijo Tomperi - - * src/token.cpp, src/token.h, src/tokenize.cpp, src/tokenize.h, - test/testtokenize.cpp: Fix ticket #25 (simplify "void f(x) int x; {" - into "void f(int x) {") - -2009-01-26 Daniel Marjamäki - - * src/checkother.cpp, src/errormessage.h, tools/errmsg.cpp: sprintf - overlapping data: added extra text that is shown if --verbose is - given - -2009-01-26 Daniel Marjamäki - - * src/cppcheck.cpp, src/errormessage.h, tools/errmsg.cpp: errmsg: - Moved 'function parameter parname is passed by value' to the style - checks - -2009-01-26 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memleak: class - function usage (fixing #63) - -2009-01-26 Daniel Marjamäki - - * src/tokenize.cpp, src/tokenize.h, test/testtokenize.cpp: - tokenizer: simplify redundant paranthesis - -2009-01-25 Leandro Penz - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: memleak: strcat_result_assignment fixed by - checking some functions for "x = func(x[),]". - -2009-01-25 Daniel Marjamäki - - * test/testmemleak.cpp: testmemleak: removed the test case that was - added in [1105]. It has been moved to the TestTokenizer instead - -2009-01-25 Daniel Marjamäki - - * test/testtokenize.cpp: testtokenize: Added test case for - simplifying '((x))' to '(x)' - -2009-01-25 Daniel Marjamäki - - * test/testpreprocessor.cpp: testpreprocessor: removed unused test - case - -2009-01-25 Reijo Tomperi - - * test/testmemleak.cpp: Added test case complex_free - -2009-01-25 Reijo Tomperi - - * test/testmemleak.cpp: Test case added: strcat_result_assignment - -2009-01-25 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - stringify macros - -2009-01-25 Reijo Tomperi - - * src/cppcheck.h: Updated comments in code - -2009-01-25 Reijo Tomperi - - * src/cppcheck.cpp: Fix ticket #58 (If given path is empty it is - assumed that it wasn't given) - -2009-01-24 Reijo Tomperi - - * src/tokenize.cpp: Fix ticket #57 (wrong path in error message) - -2009-01-24 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - insert space. '#if(' => '#if (' - -2009-01-24 Leandro Penz - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memleak: - *x=malloc(); func(&x) is no longer reported as a leak (eliminated - &use2). - -2009-01-24 Leandro Penz - - * test/testbufferoverrun.cpp: snprintf: more tests. - -2009-01-24 Reijo Tomperi - - * src/tokenize.cpp, test/testpreprocessor.cpp: Added test case - preprocessor_and_operation for ticket #55 (also fixed style from - previous commit) - -2009-01-24 Kimmo Varis - - * src/cppcheck.cpp: Fix two overly long lines in command line help. - -2009-01-24 Daniel Marjamäki - - * test/testtokenize.cpp: testtokenize: updated - 'TestTokenize::simplify_function_parameters' - -2009-01-24 Kimmo Varis - - * cppcheck.vcproj: Visual Studio: add resource.h into VS project. - -2009-01-24 Kimmo Varis - - * win_installer/cppcheck.iss, win_installer/modpath.iss: Ticket #34: - Windows installer: Add cppcheck folder to system path. - -2009-01-24 Daniel Marjamäki - - * src/tokenize.cpp: tokenizer: Added guard in case the preprocessor - is mismatching - -2009-01-24 Daniel Marjamäki - - * src/cppcheck.cpp: cppcheck: printing preprocessed file to - 'temp.txt' - -2009-01-24 Reijo Tomperi - - * src/cppcheck.cpp: Fixed ticket #54 (Make cppcheck print status - e.g. 4/20 files checked) - -2009-01-24 Reijo Tomperi - - * test/testtokenize.cpp: Added test case - simplify_function_parameters - -2009-01-23 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/checkother.cpp, src/checkother.h, src/preprocessor.cpp, - src/preprocessor.h, src/tokenize.cpp, src/tokenize.h: removed - windows encodings - -2009-01-23 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/checkother.cpp, src/checkother.h, src/preprocessor.cpp, - src/preprocessor.h, src/tokenize.cpp, src/tokenize.h: borland and - visual c++ fixes - -2009-01-23 Daniel Marjamäki - - * src/checkbufferoverrun.cpp: reverted [1084] it can be fixed better - -2009-01-23 Daniel Marjamäki - - * src/checkbufferoverrun.cpp: borland: the strtol is found in - - -2009-01-23 Daniel Marjamäki - - * src/checkclass.cpp, src/checkmemoryleak.cpp, src/filelister.cpp: - include: Had to include in a few places to be able to - compile cppcheck - -2009-01-23 Reijo Tomperi - - * src/preprocessor.cpp: Add additional checking to avoid ethernal - loops when someone is using incorrect different case for the same - file. It should be unlikely that anyone would actually use - different files in the same project and separate them only by casing - of some letters. - -2009-01-23 Reijo Tomperi - - * src/checkbufferoverrun.cpp, src/checkclass.cpp, src/checkclass.h, - src/checkheaders.cpp, src/checkmemoryleak.cpp, src/checkother.cpp, - src/filelister.cpp, src/filelister.h, src/preprocessor.cpp, - src/token.cpp, src/tokenize.cpp: Fixing ticket #35 (Get rid of - #ifdefs in our code where possible) - -2009-01-23 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leak: don't - give false positive when deallocating member variable this->i (#53) - -2009-01-23 Daniel Marjamäki - - * test/testsuite.cpp: removed compiler warning - -2009-01-23 Daniel Marjamäki - - * src/cppcheck.cpp: better fix to get rid of compiler warning is to - comment the function parameter - -2009-01-23 Reijo Tomperi - - * src/cppcheck.cpp, src/preprocessor.cpp: Fixed Ticket #52, Cppcheck - hangs when checking VLC's source code - -2009-01-23 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - fixed bug with mixed macros ABC and ABCD - -2009-01-23 Daniel Marjamäki - - * src/preprocessor.cpp: removed bam coding - -2009-01-23 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: The stdlib.h is needed for the - exit function - -2009-01-22 Daniel Marjamäki - - * src/cppcheck.cpp: cppcheck: The '&&' should be '||' when checking - if a check should be called - -2009-01-22 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: Build: Enabled the Wextra flag when - building cppcheck - -2009-01-22 Reijo Tomperi - - * man/cppcheck.1.xml, src/cppcheck.cpp: Fix Ticket #46, invalid - commandline. (Also added -h and --help parameters) - -2009-01-22 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - handle redefinition of macro - -2009-01-22 Reijo Tomperi - - * man/cppcheck.1.xml, src/cppcheck.cpp, src/cppcheck.h, - src/preprocessor.cpp, src/preprocessor.h: Fix Ticket #30, Need a way - to specify include file folders (-I parameter was added) - -2009-01-22 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - handle include guards by not checking for configurations in header - files - -2009-01-21 Nicolas Le Cam - - * src/preprocessor.cpp: Code cleanup. - -2009-01-21 Reijo Tomperi - - * src/errormessage.h, src/preprocessor.cpp: Fixed style - -2009-01-21 Nicolas Le Cam - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Fix - Preprocessor::read to handle char constant of more than one char, - fixing issue #45; Fix the test that handle the case. - -2009-01-21 Nicolas Le Cam - - * src/checkother.cpp, src/checkother.h, src/cppcheck.cpp, - src/errormessage.h, test/testunusedvar.cpp, tools/errmsg.cpp: Remove - checks that are already covered well by most compilers (Unreachable - Code; Assignment in Condition; Unused Variable). - -2009-01-21 Reijo Tomperi - - * src/cppcheck.cpp, src/preprocessor.cpp, src/preprocessor.h, - test/testpreprocessor.cpp: Fix Ticket #43, preprocessor: include - file doesn't work so good in subfolders (note, because of other - issues, checking will be very slow now that this is fixed) - -2009-01-21 Reijo Tomperi - - * man/cppcheck.1.xml, src/checkbufferoverrun.cpp, - src/checkbufferoverrun.h, src/checkclass.cpp, src/checkclass.h, - src/checkfunctionusage.cpp, src/checkfunctionusage.h, - src/checkheaders.cpp, src/checkheaders.h, src/checkmemoryleak.cpp, - src/checkmemoryleak.h, src/checkother.cpp, src/checkother.h, - src/cppcheck.cpp, src/cppcheck.h, src/cppcheckexecutor.cpp, - src/cppcheckexecutor.h, src/errorlogger.h, src/errormessage.cpp, - src/errormessage.h, src/filelister.cpp, src/filelister.h, - src/main.cpp, src/preprocessor.cpp, src/preprocessor.h, - src/settings.cpp, src/settings.h, src/token.cpp, src/token.h, - src/tokenize.cpp, src/tokenize.h, test/testbufferoverrun.cpp, - test/testcharvar.cpp, test/testclass.cpp, - test/testconstructors.cpp, test/testdivision.cpp, - test/testfilelister.cpp, test/testfunctionusage.cpp, - test/testincompletestatement.cpp, test/testmemleak.cpp, - test/testmemleakmp.cpp, test/testother.cpp, - test/testpreprocessor.cpp, test/testredundantif.cpp, - test/testrunner.cpp, test/testsimplifytokens.cpp, - test/testsuite.cpp, test/testsuite.h, test/testtoken.cpp, - test/testtokenize.cpp, test/testunusedprivfunc.cpp, - test/testunusedvar.cpp, tools/dmake.cpp, tools/errmsg.cpp: Fixed - Ticket #40, Check copyright texts in files, now that we have new - developers. - -2009-01-21 Reijo Tomperi - - * test/testpreprocessor.cpp: Added test case - multi_character_character - -2009-01-21 Daniel Marjamäki - - * src/checkclass.cpp, src/cppcheck.cpp: uninitialized variables: run - always - -2009-01-21 Nicolas Le Cam - - * src/checkother.cpp: Fix CheckOther::functionVariableUsage, passing - a variable to a function also means reading it. - -2009-01-21 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - handled problem with parsing strings when expanding macros - -2009-01-21 Daniel Marjamäki - - * src/tokenize.cpp: code style - -2009-01-21 Daniel Marjamäki - - * test/testpreprocessor.cpp: preprocessor: Added todo test. It - crashes when it's used - -2009-01-20 Nicolas Le Cam - - * src/tokenize.cpp: Fix Tokenizer::setVarId for pointers and two - types variable declaration - -2009-01-20 Nicolas Le Cam - - * src/checkother.cpp: CheckOther::functionVariableUsage: minor - optimization. - -2009-01-20 Nicolas Le Cam - - * src/token.cpp: Token::Match: Allow pattern like '*|' - -2009-01-20 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fixes test case "file2", - fixes bug with include file handling - -2009-01-20 Nicolas Le Cam - - * src/checkmemoryleak.cpp, src/tokenize.cpp: Tokenizer: Remove - 'unlikely' keyword in simplifyTokenList; Don't check for it in - CheckMemoryLeak. - -2009-01-20 Daniel Marjamäki - - * using_gcov.txt: doc: how to use gcov - -2009-01-20 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - Handle ## - -2009-01-20 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: tokenizer: tokenize ## - better - -2009-01-20 Daniel Marjamäki - - * test/testtokenize.cpp: tokenizer: added testcase with include - files. It should be fixed. - -2009-01-20 Daniel Marjamäki - - * src/token.cpp, src/token.h, src/tokenize.cpp, src/tokenize.h: code - cleanup - -2009-01-19 Reijo Tomperi - - * src/errormessage.h, test/testpreprocessor.cpp: Added test case - preprocessor_doublesharp, executed ./runastyle for errormessage.h - -2009-01-19 Nicolas Le Cam - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h: Update - errormessage.h and code using it. - -2009-01-19 Nicolas Le Cam - - * tools/errmsg.cpp: errmsg: Don't create unused parameters - -2009-01-19 Reijo Tomperi - - * cppcheck.cbp: codeblocks project file changed to use make target - testrunner, instead of test - -2009-01-19 Reijo Tomperi - - * src/preprocessor.cpp, test/testpreprocessor.cpp: Added a test case - and fixed bug. If #include was inside a string, cppcheck hanged in - preprocessor. - -2009-01-19 Reijo Tomperi - - * src/cppcheck.cpp: Changed output of the program to print out the - file name before preprocessor. - -2009-01-19 Reijo Tomperi - - * src/tokenize.cpp, test/testtokenize.cpp: Fixed bug in line numbers - and enabled test case that spots it. - -2009-01-19 Daniel Marjamäki - - * test/testtokenize.cpp: testtokenize: Added test "file1". It - currently fails. - -2009-01-19 Daniel Marjamäki - - * src/tokenize.cpp: tokenizer: activated the handling of #file and - #endfile - -2009-01-19 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: Activated the include handling - -2009-01-19 Daniel Marjamäki - - * test/testtokenize.cpp: testtokenize: Removed unneeded test case - "define1" - -2009-01-19 Daniel Marjamäki - - * test/testpreprocessor.cpp: testpreprocessor: Removed test that - doesn't work now that the preprocessor handles includes - -2009-01-19 Kimmo Varis - - * src/cppcheck.rc: Visual Studio: Fix building resource file with - Visual Studio Express. - -2009-01-18 Nicolas Le Cam - - * : Add bugtraq:url and bugtraq:logregex properties - -2009-01-18 Reijo Tomperi - - * src/preprocessor.cpp: Fixing crash, not sure about side effects. - Ticket #37 - -2009-01-18 Reijo Tomperi - - * src/checkother.cpp, src/preprocessor.cpp: Added temporary bailout - code, cppcheck crashes when string checking leaks out. This needs a - better fix, this is just to see the problem more easily. - -2009-01-18 Nicolas Le Cam - - * src/checkother.cpp, test/testother.cpp: unreachableCode: Moved - warning of a break statement following a return in --style; Added a - test case; Minor optimization. - -2009-01-18 Leandro Penz - - * src/checkother.cpp, test/testunusedvar.cpp: functionVariableUsage: - no longer SIGSEGVs on unfinished struct. Fixes Ticket #31. - -2009-01-18 Reijo Tomperi - - * src/preprocessor.cpp, src/tokenize.cpp, src/tokenize.h: More work - for includes, still commented out. Uncomment from tokenize.cpp and - preprocessor.cpp to take into use. - -2009-01-18 Reijo Tomperi - - * src/preprocessor.cpp, src/preprocessor.h: More work for includes, - still commented out. Tokenizer needs #file handling - -2009-01-18 Daniel Marjamäki - - * src/preprocessor.cpp: code style fix - -2009-01-18 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: strPlusChar: Fixed false - positives - -2009-01-18 Reijo Tomperi - - * src/preprocessor.cpp, src/preprocessor.h: Some work for the - include support (commented out for now) - -2009-01-18 Daniel Marjamäki - - * test/testpreprocessor.cpp: preprocessor: make sure macros are not - expanded when they are found in strings - -2009-01-18 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - Make sure that "#define ABC (a+b+c)" is expanded correctly - -2009-01-18 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: Reactivated the expandMacros. - This time it's done after the #if #else #endif has been processed - -2009-01-18 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - fixed so the TestPreprocessor::preprocessor_undef succeeds - -2009-01-18 Kimmo Varis - - * win_installer/readme.txt: Improve the Windows installer readme - text. - -2009-01-18 Daniel Marjamäki - - * src/preprocessor.cpp: style updated - -2009-01-18 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: Refactoring. Broke out some - functionality of expandMacros into a class Macro - -2009-01-18 Reijo Tomperi - - * test/testtokenize.cpp: Fix compile warning signed-unsigned - -2009-01-18 Reijo Tomperi - - * test/testtokenize.cpp: Refactoring: Style applied - -2009-01-18 Daniel Marjamäki - - * src/preprocessor.cpp, src/preprocessor.h, - test/testpreprocessor.cpp: Preprocessor: Reverted [1008] - The old - expandMacros was readded - -2009-01-18 Kimmo Varis - - * src/cppcheck.rc, src/resource.h: Fix VS build broken due to - tripled version resource info. - -2009-01-18 Daniel Marjamäki - - * test/testtokenize.cpp: Tokenizer: Added unit test to check that - define is tokenized correctly - -2009-01-18 Daniel Marjamäki - - * src/tokenize.cpp, test/testtokenize.cpp: tokenizer: The tokenizer - shouldn't handle comments nor preprocessor directives. The - preprocessor will take care of that - -2009-01-18 Daniel Marjamäki - - * src/preprocessor.cpp, src/preprocessor.h, - test/testpreprocessor.cpp: Preprocessor: Removed - "Preprocessor::expandMacros" and commented all its tests - -2009-01-18 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: Don't use the "expandMacros" - from cppcheck - -2009-01-17 Reijo Tomperi - - * src/checkclass.cpp, test/testclass.cpp: Fix Ticket #32 False - positive with --style: Uninitialized member variable (when stream is - used) - -2009-01-17 Kimmo Varis - - * src/filelister.cpp: Does not understand . as current folder (Trac - #4) - -2009-01-17 Reijo Tomperi - - * test/testclass.cpp: Test case for Ticket #32 - -2009-01-17 Daniel Marjamäki - - * src/checkother.cpp, test/testunusedvar.cpp: unused var: fixed - false positives when using shift operator - -2009-01-17 Reijo Tomperi - - * tasks.txt: Removed tasks.txt, most of it is moved to Track, some - general issues were not - -2009-01-17 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/errormessage.h, src/resource.h, - test/testbufferoverrun.cpp, tools/errmsg.cpp: bounds checking: Added - error message "snprintf size is out of bounds" - -2009-01-17 Reijo Tomperi - - * cppcheck.vcproj, src/cppcheck.rc, src/resource.h: Patch [ 2508549 - ] Add Windows version resource - -2009-01-17 Reijo Tomperi - - * win_installer/cppcheck.iss, win_installer/readme.txt: patch [ - 2508523 ] Windows installer (with readme.txt based on patch - comments) - -2009-01-17 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/errormessage.h, - test/testmemleak.cpp, tools/errmsg.cpp: errmsg: added varname to the - message "deallocating a deallocated pointer" - -2009-01-17 Daniel Marjamäki - - * src/checkother.cpp, test/testunusedvar.cpp: unused variable: - reading the value of variable in a for loop.. "for(;a;)" see ticket - #18 - -2009-01-17 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: memory leak: detect - memory leak (#6) - -2009-01-16 Reijo Tomperi - - * src/cppcheck.cpp: Added .c++ to help texts also. - -2009-01-16 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: bail out code in expandMacros - -2009-01-16 Reijo Tomperi - - * src/filelister.cpp: Add support for .c++ files ( Debian - Bug#512060: cppcheck: refuses to check .c++ files ) - -2009-01-16 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: Fixed a null pointer - dereference - -2009-01-16 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leak: Fixed - false positives about deallocating pointer that has already been - deallocated - -2009-01-16 Daniel Marjamäki - - * src/checkfunctionusage.cpp: function usage: don't report "main" - and "if" as unused - -2009-01-16 Daniel Marjamäki - - * src/checkmemoryleak.cpp: memory leak: don't show debug info - -2009-01-16 Kimmo Varis - - * testrunner.vcproj: Visual Studio: fix testrunner project file by - adding subfolders to paths. Disable 'warnings as errors' as there - are lots of warnings. - -2009-01-15 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/errormessage.h, - test/testmemleak.cpp, tools/errmsg.cpp: memory leaks: Added checking - of deallocate to see that the pointer isn't deallocated already - -2009-01-15 Daniel Marjamäki - - * src/checkother.cpp: code style - -2009-01-15 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: str plus char: added - simple variable handling - -2009-01-15 Daniel Marjamäki - - * src/checkother.cpp: code style fixing - -2009-01-15 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, src/cppcheck.cpp, - src/errormessage.h, test/testother.cpp, tools/errmsg.cpp: str plus - char: Added check and error message for str + ch - -2009-01-14 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: Bail out the expandMacros if - it finds "#undef". The previous handling can cause cppcheck to hang - -2009-01-14 Daniel Marjamäki - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h, - test/testclass.cpp, tools/errmsg.cpp: errmsg: Added 'condition is - always true/false' - -2009-01-14 Daniel Marjamäki - - * src/checkclass.cpp, test/testclass.cpp: Uninitialized member - variables: Checking enum variables - -2009-01-14 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: a segmentation fault fix. - Check if tokens is null. - -2009-01-14 Daniel Marjamäki - - * src/checkmemoryleak.cpp: dos2unix fixing - -2009-01-14 Daniel Marjamäki - - * test/testmemleak.cpp: memory leak: Added test case - -2009-01-14 Daniel Marjamäki - - * src/checkmemoryleak.cpp: memory leak: fixed false positive about - using variable after it is released - -2009-01-14 Daniel Marjamäki - - * src/cppcheck.cpp: cppcheck: added function call to the variable - scope check. - -2009-01-14 Daniel Marjamäki - - * cppcheck.vcproj: Visual C++: Added "src/errormessage.*" to the - project file - -2009-01-14 Daniel Marjamäki - - * src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - test/testbufferoverrun.cpp: buffer overruns: added sprintf checking - -2009-01-14 Daniel Marjamäki - - * src/checkbufferoverrun.h: doxygen: Added comments in - checkbufferoverrun.h - -2009-01-14 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, - test/testmemleak.cpp: Memory leak: Readded some checking to classes - -2009-01-14 Leandro Penz - - * src/checkother.cpp: unreachableCode: avoid SIGSEGV when there is - no "}" after return. - -2009-01-14 Leandro Penz - - * src/checkother.cpp, test/testunusedvar.cpp: functionVariableUsage: - support for nested struct/union declaration. - -2009-01-13 Daniel Marjamäki - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: Memory leak: Fixed - a false positive - -2009-01-13 Daniel Marjamäki - - * src/checkfunctionusage.cpp, src/checkother.cpp, src/cppcheck.cpp, - src/errormessage.h, tools/errmsg.cpp: errmsg: Added 'assignment in - if-condition' - -2009-01-13 Daniel Marjamäki - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: refactoring - -2009-01-12 Daniel Marjamäki - - * test/testpreprocessor.cpp: testpreprocessor: commented the "undef" - test that doesn't work - -2009-01-12 Daniel Marjamäki - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: added message about bad usage of char - variable - -2009-01-12 Reijo Tomperi - - * test/testpreprocessor.cpp: Added test case which currently fails, - #undef is not handled - -2009-01-12 Daniel Marjamäki - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: Added message for 'incomplete statement' - -2009-01-12 Daniel Marjamäki - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: Added messages for 'variable is not used / - not read / not assigned' - -2009-01-12 Daniel Marjamäki - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: Added message 'function parameter is - passed by value' - -2009-01-12 Daniel Marjamäki - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: added message 'unreachable code below - return' - -2009-01-12 Daniel Marjamäki - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: Added 'unused struct member' - -2009-01-12 Daniel Marjamäki - - * test/testdivision.cpp: testdivision: The 'unsigned division' is a - style check - -2009-01-12 Daniel Marjamäki - - * src/errormessage.h, tools/errmsg.cpp: errmsg: Made the 'unsigned - division' a style error - -2009-01-12 Daniel Marjamäki - - * src/checkother.cpp, src/checkother.h, src/cppcheck.cpp, - src/errormessage.h, test/testcharvar.cpp, test/testdivision.cpp, - test/testincompletestatement.cpp, test/testother.cpp, - test/testredundantif.cpp, test/testunusedvar.cpp, tools/errmsg.cpp: - errmsg: Added 'unsigned division' - -2009-01-12 Daniel Marjamäki - - * src/checkclass.cpp: refactoring: cleanup old code - -2009-01-12 Daniel Marjamäki - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: Added message 'Overlapping data buffer' - -2009-01-12 Daniel Marjamäki - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: Added "found redundant if - 'if - (condition);' - -2009-01-12 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - Style updates - -2009-01-12 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - Handle newlines better - -2009-01-11 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - fixed a small bug when expanding macro without parameter - -2009-01-11 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - Fixed bug when expanding macros without parameters - -2009-01-11 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - expand macro without parameters - -2009-01-11 Daniel Marjamäki - - * src/checkother.cpp, test/testunusedvar.cpp: struct member usage: - bail out the check if the struct contain any functions - -2009-01-11 Daniel Marjamäki - - * src/tokenize.cpp, test/testother.cpp: setVarId: Fixed bug - (variable id for struct member not correctly set) - -2009-01-11 Daniel Marjamäki - - * test/testpreprocessor.cpp: preprocessor: Added a test to see that - "" is handled correctly inside strings - -2009-01-11 Daniel Marjamäki - - * src/checkfunctionusage.cpp, src/errormessage.h, - src/preprocessor.cpp, tools/errmsg.cpp: errmsg: the "unused - function" message shall not take any Tokenizer nor Token parameters - -2009-01-11 Daniel Marjamäki - - * src/preprocessor.cpp, test/testpreprocessor.cpp: preprocessor: - Handle "" better - -2009-01-11 Daniel Marjamäki - - * Makefile, src/checkfunctionusage.cpp, src/cppcheck.cpp, - src/errormessage.h, src/settings.cpp, src/settings.h, - tools/errmsg.cpp: errmsg: added "unused function" - -2009-01-11 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: dmake: Minor updates. Moved target - "all" a little. Handle the change 937 where "make test" also - executes testrunner - -2009-01-10 Leandro Penz - - * Makefile: make test now builds everything and runs all tests. - -2009-01-10 Leandro Penz - - * src/token.cpp, test/testtokenize.cpp: match: skip initial !! - patterns if on first token. - -2009-01-10 Leandro Penz - - * src/token.cpp: match: optimisation - -2009-01-10 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: added "mismatching allocation and - deallocation" - -2009-01-10 Daniel Marjamäki - - * src/cppcheck.cpp: cppcheck: Minor bug fix - -2009-01-10 Daniel Marjamäki - - * Makefile, src/checkbufferoverrun.cpp, src/checkbufferoverrun.h, - src/cppcheck.cpp, src/errormessage.h, tools/errmsg.cpp: errmsg: - Added error messages for "Array index out of bounds" and "Buffer - overrun" - -2009-01-10 Daniel Marjamäki - - * src/checkclass.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: added error message about virtual - destructors - -2009-01-10 Daniel Marjamäki - - * src/checkclass.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: Added "operator= should return something - -2009-01-10 Daniel Marjamäki - - * src/checkclass.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errmsg: Added "Using 'memset' on class" - -2009-01-10 Daniel Marjamäki - - * src/checkclass.cpp, src/cppcheck.cpp, src/errormessage.h, - test/testunusedprivfunc.cpp, tools/errmsg.cpp: errmsg: Added "Unused - private function ..." - -2009-01-10 Daniel Marjamäki - - * src/checkclass.cpp, src/cppcheck.cpp, src/errormessage.h, - test/testconstructors.cpp, tools/errmsg.cpp: errmsg: Added - "uninitialized member variable" - -2009-01-10 Leandro Penz - - * src/checkmemoryleak.cpp, test/testmemleak.cpp: checkmemoryleak: no - longer flag "dealloc ; alloc ; if continue ;" as a leak, even with - --all - -2009-01-10 Daniel Marjamäki - - * src/checkother.cpp, test/testunusedvar.cpp: unused struct member: - fixed false positive for member "const int a;" - -2009-01-10 Daniel Marjamäki - - * src/checkclass.cpp, test/testother.cpp, tools/errmsg.cpp: astyle: - updated the code style - -2009-01-10 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: sprintf: fixed bug "false - positive when variable is used again after snprintf" - -2009-01-10 Daniel Marjamäki - - * Makefile, src/checkclass.cpp, src/cppcheck.cpp, - src/errormessage.h, test/testconstructors.cpp, tools/errmsg.cpp: - errmsg: Added errormessage for 'the class 'classname' doesn't have a - constructor' - -2009-01-10 Daniel Marjamäki - - * src/errormessage.h, tools/errmsg.cpp: errmsg: bug fix - -2009-01-10 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: sprintf: fixed false - positives with "sprintf(buf, "%i", sizeof(buf)); - -2009-01-10 Daniel Marjamäki - - * tools/errmsg.cpp: errmsg: reformatted with astyle - -2009-01-10 Daniel Marjamäki - - * tools/errmsg.cpp: errmsg: The generated code is compliant with the - astyle formatting - -2009-01-10 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: dmake: minor fixes. The tools binaries - will be put in the tools folder - -2009-01-10 Daniel Marjamäki - - * src/token.cpp: match: optimisation - -2009-01-10 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: code style fixing - -2009-01-10 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: handle the \newline in strings - -2009-01-10 Leandro Penz - - * src/token.cpp, test/testtokenize.cpp: token: when Token::Match - reached the end of input, it returned true if the next pattern was - !!. It now returns true only if all remaining patterns are !!. - -2009-01-09 Reijo Tomperi - - * tasks.txt: tasks updated, parseArgs refactoring idea was rejected - -2009-01-09 Daniel Marjamäki - - * tasks.txt: tasks: removed the "new checks" sections because these - are better reported in the tracker - -2009-01-09 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: make: updated the make so that the - tools are built with "make all". And added the errormessage.h - generator to the makefile also - -2009-01-09 Daniel Marjamäki - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h, - tools/errmsg.cpp: errormessage: added error message - ErrorMessage::dangerousUsageStrtol - -2009-01-09 Daniel Marjamäki - - * src/errormessage.cpp: errormessage: added header - -2009-01-09 Daniel Marjamäki - - * tools/dmake.cpp: dmake: don't generate Makefile if there are no - src files - -2009-01-09 Daniel Marjamäki - - * src/tokenize.cpp: tokenize: avoid "terminate called after throwing - an instance of 'std::out_of_range'" - -2009-01-08 Reijo Tomperi - - * cppcheck.cbp, test/testpreprocessor.cpp: Added test case for - preprocessor which currently fails. codeblocks project file updated, - tools-files added. - -2009-01-08 Reijo Tomperi - - * src/cppcheck.cpp, src/cppcheck.h, src/cppcheckexecutor.cpp, - src/cppcheckexecutor.h, src/main.cpp: Main returns now EXIT_SUCCESS - or EXIT_FAILURE instead of 0. Feature request fixed: [ 2489787 ] - Return value of cppcheck is always 0 - -2009-01-08 Reijo Tomperi - - * src/checkother.cpp, src/cppcheck.cpp, src/errormessage.h, - test/testother.cpp: astyle changes, missed from previous commits - -2009-01-08 Reijo Tomperi - - * Makefile, tools/dmake.cpp: Fixed make install from the generated - makefile - -2009-01-08 Daniel Marjamäki - - * Makefile, src/checkother.cpp, src/cppcheck.cpp, - src/errormessage.h, test/testredundantif.cpp, tools/errmsg.cpp: - errormessage: Added a few more messages for checkother.cpp - -2009-01-08 Reijo Tomperi - - * src/errormessage.h, tools/errmsg.cpp: Added license text to - errormessage.h (via code tha generates it) and also mention that it - is generated by machine - -2009-01-08 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/cppcheck.cpp, tasks.txt: - errormessage: Added the new errormessage handling to cppcheck - -2009-01-08 Daniel Marjamäki - - * src/errormessage.cpp, src/errormessage.h: errormessage: updated - the files. the errormessage.h is automaticly generated by the - tools/errmsg program - -2009-01-08 Daniel Marjamäki - - * tools/errmsg.cpp: tools/errmsg: some refactoring - -2009-01-08 Daniel Marjamäki - - * src/checkother.cpp, test/testother.cpp: sprintf: check for - dangerous usage with sprintf|snprintf with overlapping data - -2009-01-08 Daniel Marjamäki - - * runastyle: runastyle : also set the code style in the tools - -2009-01-08 Daniel Marjamäki - - * tools/dmake.cpp, tools/errmsg.cpp: tools: Added headers to source - files - -2009-01-07 Daniel Marjamäki - - * src/checkmemoryleak.cpp, src/checkmemoryleak.h, src/tokenize.cpp, - test/testmemleak.cpp: Simplify tokens: add a ";" after case and - default - -2009-01-07 Daniel Marjamäki - - * src/preprocessor.cpp: preprocessor: applied patch submitted by - kimmov - -2009-01-07 Daniel Marjamäki - - * src/checkclass.cpp, src/checkmemoryleak.cpp, - src/preprocessor.cpp, src/token.cpp, src/tokenize.cpp: Reverted - [890] it cause more problems with Visual C++ - -2009-01-07 Daniel Marjamäki - - * cppcheck.vcproj: Visual C++: Applied patch "fix_vs_project.patch" - that kimmov submitted - -2009-01-07 Daniel Marjamäki - - * tools/dmake.cpp, tools/errmsg.cpp: tools: updated the code style - -2009-01-07 Daniel Marjamäki - - * src/checkclass.cpp, src/checkmemoryleak.cpp, - src/preprocessor.cpp, src/token.cpp, src/tokenize.cpp: Borland C++: - Removed unneeded ifdefs - -2009-01-07 Daniel Marjamäki - - * runastyle.bat: windows: Added runastyle.bat - -2009-01-07 Daniel Marjamäki - - * cppcheck.cbproj, testrunner.cbproj: Borland C++: Updated the - project files - -2009-01-06 Reijo Tomperi - - * src/checkmemoryleak.cpp: Optimization: 6,2 s -> 5,6 s - -2009-01-06 Reijo Tomperi - - * cppcheck.cbp: Changed codeblocks project file to reflect new build - targets - -2009-01-06 Daniel Marjamäki - - * Makefile, tools/dmake.cpp: tools/dmake: A few simple fixes. - Commited the new Makefile - -2009-01-06 Daniel Marjamäki - - * tools/Makefile, tools/dmake.cpp: tools: dmake added a tool for - maintaining the Makefile - -2009-01-06 Reijo Tomperi - - * doxyfile, tasks.txt: Doxyfile added - -2009-01-06 Daniel Marjamäki - - * tools/errmsg.cpp: tools/errmsg: minor fixes - -2009-01-06 Daniel Marjamäki - - * tools/errmsg.cpp: tools/errmsg: code correction - -2009-01-06 Daniel Marjamäki - - * tools/errmsg.cpp: tools/errmsg: generate documentation - -2009-01-06 Daniel Marjamäki - - * tools/errmsg.cpp: tools/errmsg: generate the function to use when - determining if a check should be done or not - -2009-01-06 Daniel Marjamäki - - * tools/errmsg.cpp: tools: Added a folder where we can keep small - usable utilities - -2009-01-06 Reijo Tomperi - - * Makefile, checkbufferoverrun.cpp, checkbufferoverrun.h, - checkclass.cpp, checkclass.h, checkfunctionusage.cpp, - checkfunctionusage.h, checkheaders.cpp, checkheaders.h, - checkmemoryleak.cpp, checkmemoryleak.h, checkother.cpp, - checkother.h, cppcheck.cbp, cppcheck.cpp, cppcheck.h, - cppcheckexecutor.cpp, cppcheckexecutor.h, errorlogger.h, - errormessage.cpp, errormessage.h, filelister.cpp, filelister.h, - main.cpp, preprocessor.cpp, preprocessor.h, runastyle, - settings.cpp, settings.h, src/checkbufferoverrun.cpp, - src/checkbufferoverrun.h, src/checkclass.cpp, src/checkclass.h, - src/checkfunctionusage.cpp, src/checkfunctionusage.h, - src/checkheaders.cpp, src/checkheaders.h, src/checkmemoryleak.cpp, - src/checkmemoryleak.h, src/checkother.cpp, src/checkother.h, - src/cppcheck.cpp, src/cppcheck.h, src/cppcheckexecutor.cpp, - src/cppcheckexecutor.h, src/errorlogger.h, src/errormessage.cpp, - src/errormessage.h, src/filelister.cpp, src/filelister.h, - src/main.cpp, src/preprocessor.cpp, src/preprocessor.h, - src/settings.cpp, src/settings.h, src/token.cpp, src/token.h, - src/tokenize.cpp, src/tokenize.h, test/testbufferoverrun.cpp, - test/testcharvar.cpp, test/testclass.cpp, - test/testconstructors.cpp, test/testdivision.cpp, - test/testfilelister.cpp, test/testfunctionusage.cpp, - test/testincompletestatement.cpp, test/testmemleak.cpp, - test/testmemleakmp.cpp, test/testother.cpp, - test/testpreprocessor.cpp, test/testredundantif.cpp, - test/testrunner.cpp, test/testsimplifytokens.cpp, - test/testsuite.cpp, test/testsuite.h, test/testtoken.cpp, - test/testtokenize.cpp, test/testunusedprivfunc.cpp, - test/testunusedvar.cpp, testbufferoverrun.cpp, testcharvar.cpp, - testclass.cpp, testconstructors.cpp, testdivision.cpp, - testfilelister.cpp, testfunctionusage.cpp, - testincompletestatement.cpp, testmemleak.cpp, testmemleakmp.cpp, - testother.cpp, testpreprocessor.cpp, testredundantif.cpp, - testrunner.cpp, testsimplifytokens.cpp, testsuite.cpp, testsuite.h, - testtoken.cpp, testtokenize.cpp, testunusedprivfunc.cpp, - testunusedvar.cpp, token.cpp, token.h, tokenize.cpp, tokenize.h: - Refactoring: Added src/ and test/ folders. Moved source files to - those folders, updated makefile and codeblocks project file. - -2009-01-06 Daniel Marjamäki - - * tasks.txt: tasks : Added tasks to create a doxygen project file - -2009-01-06 Daniel Marjamäki - - * tasks.txt: tasks: rewrote the tasks file - -2009-01-06 Daniel Marjamäki - - * preprocessor.cpp, testpreprocessor.cpp: Preprocessor: Refactoring - the unit testing. And enabled the macro expansion - -2009-01-06 Daniel Marjamäki - - * preprocessor.cpp, testpreprocessor.cpp: Preprocessor: Improved - handling of multiline macros - -2009-01-06 Daniel Marjamäki - - * Makefile: Makefile: Fixed the preprocessor dependencies - -2009-01-05 Reijo Tomperi - - * tasks.txt: tasks.txt updated, %var1% task is done - -2009-01-05 Reijo Tomperi - - * checkmemoryleak.cpp, token.cpp, token.h: Refactoring: %var1% - complitely removed. Execution time increased from 4,7 to 6,2 - seconds. - -2009-01-05 Reijo Tomperi - - * checkmemoryleak.cpp: Refactoring: Getting rid of %var1% - -2009-01-05 Reijo Tomperi - - * checkmemoryleak.cpp: Refactoring: Getting rid of %var1% - -2009-01-05 Daniel Marjamäki - - * testpreprocessor.cpp: Preprocessor : Added a few more testcases - for the macro expansion - -2009-01-05 Daniel Marjamäki - - * preprocessor.cpp, testpreprocessor.cpp: Preprocessor: Added simple - handling for expanding preprocessor macros - -2009-01-05 Daniel Marjamäki - - * runastyle: runastyle: Added script for running "astyle" with the - options I have chosen against all cpp and h files - -2009-01-05 Daniel Marjamäki - - * checkbufferoverrun.cpp, checkbufferoverrun.h, checkclass.cpp, - checkclass.h, checkfunctionusage.cpp, checkfunctionusage.h, - checkheaders.cpp, checkheaders.h, checkmemoryleak.cpp, - checkmemoryleak.h, checkother.cpp, checkother.h, cppcheck.cpp, - cppcheck.h, cppcheckexecutor.cpp, cppcheckexecutor.h, - errorlogger.h, errormessage.h, filelister.cpp, filelister.h, - main.cpp, preprocessor.cpp, preprocessor.h, testbufferoverrun.cpp, - testcharvar.cpp, testclass.cpp, testconstructors.cpp, - testdivision.cpp, testfilelister.cpp, testfunctionusage.cpp, - testincompletestatement.cpp, testmemleak.cpp, testmemleakmp.cpp, - testother.cpp, testpreprocessor.cpp, testredundantif.cpp, - testrunner.cpp, testsimplifytokens.cpp, testsuite.cpp, testsuite.h, - testtoken.cpp, testtokenize.cpp, testunusedprivfunc.cpp, - testunusedvar.cpp, token.cpp, token.h, tokenize.cpp, tokenize.h: - Style: Updated the coding style with "astyle" - -2009-01-05 Daniel Marjamäki - - * preprocessor.cpp, preprocessor.h, testpreprocessor.cpp: - Preprocessor: Began work on the macro handling - -2009-01-05 Daniel Marjamäki - - * checkclass.cpp: Refactoring: Simplified a condition - -2009-01-04 Reijo Tomperi - - * checkclass.cpp: Refactoring: Getting rid of %var1% - -2009-01-04 Reijo Tomperi - - * checkbufferoverrun.cpp: Refactoring: Getting rid of %var1% - -2009-01-04 Reijo Tomperi - - * checkclass.cpp, checkother.cpp, token.cpp: Fixed several bugs from - previous commits and added check code that will print errors if - varid is 0 when %varid% is given in Match(). - -2009-01-04 Reijo Tomperi - - * checkclass.cpp, token.cpp, token.h: Refactoring: findMatch() that - supports varId added. %var1% -> %varid% changed - -2009-01-04 Daniel Marjamäki - - * filelister.cpp: MinGW: Applied the patch submitted by kidkat that - makes cppcheck compilable with MinGW - -2009-01-04 Daniel Marjamäki - - * checkother.cpp, testunusedvar.cpp: variable usage: fixed false - positive when using operator '^' - -2009-01-04 Reijo Tomperi - - * filelister.cpp: Made previous feature request fix more portable - -2009-01-04 Daniel Marjamäki - - * cppcheck.cpp: variable usage: The check must be made before - simplifyTokenList to avoid false positives - -2009-01-04 Reijo Tomperi - - * filelister.cpp: Fix for feature request: [ 2485706 ] Add support - to *.C file extension - -2009-01-04 Daniel Marjamäki - - * checkother.cpp: Variable usage: Addon to previous commit. Also - handle "&=" and "^=" - -2009-01-04 Daniel Marjamäki - - * checkother.cpp, testunusedvar.cpp: unused variable: Fixed false - positive when using '|=' assignment - -2009-01-04 Daniel Marjamäki - - * checkother.cpp, testunusedvar.cpp: Variable usage : Fixed false - positives for struct/union member variables - -2009-01-04 Daniel Marjamäki - - * checkother.cpp, testunusedvar.cpp: Variable usage: Fixed false - positive with operators ~ and ! - -2009-01-04 Daniel Marjamäki - - * checkother.cpp, testunusedvar.cpp: Variable usage: Fixed false - positives (tmp1 ? tmp2 : tmp3) - -2009-01-04 Daniel Marjamäki - - * testunusedvar.cpp: variable usage: added a test case to make sure - usage in a if is seen - -2009-01-04 Daniel Marjamäki - - * checkother.cpp, testunusedvar.cpp: Variable usage : Fixed false - positive with modulo - -2009-01-04 Daniel Marjamäki - - * checkother.cpp: Variable usage: Fixed a segmentation fault - -2009-01-04 Daniel Marjamäki - - * checkother.cpp, testunusedvar.cpp: Struct member usage : Check - union member variables at the same time - -2009-01-04 Daniel Marjamäki - - * checkother.cpp: Variable usage: fixed false positives for union - member variables - -2009-01-04 Daniel Marjamäki - - * checkother.cpp, testunusedvar.cpp: struct member usage: fixed - false positives - -2009-01-04 Reijo Tomperi - - * checkother.cpp: Refactoring var1 -> varid - -2009-01-04 Daniel Marjamäki - - * checkother.cpp, testunusedvar.cpp: Function usage : Fixed false - positives for inline structs - -2009-01-04 Daniel Marjamäki - - * checkother.cpp, testunusedvar.cpp: Variable usage : Fixed a false - positive for ("b = (int)a;" => a is read) - -2009-01-04 Daniel Marjamäki - - * tokenize.cpp: tokenize : Removed unneeded variable - -2009-01-04 Daniel Marjamäki - - * checkother.cpp: Refactoring : Changed a 'strcmp' to a - 'simpleMatch' - -2009-01-03 Reijo Tomperi - - * checkother.cpp: Possibly bug fix, changed %var% into %var1% as - name was also given as a parameter to Match(). Not sure which was - intended here. - -2009-01-03 Reijo Tomperi - - * checkbufferoverrun.cpp, checkclass.cpp, checkmemoryleak.cpp, - checkother.cpp, token.cpp, token.h, tokenize.cpp: Refactoring: - Changed order of parameters in Match() and findMatch() (deprecated - parameter moved to last) - -2009-01-03 Reijo Tomperi - - * checkother.cpp, testcharvar.cpp: Refactoring: %var1% -> %varid% - -2009-01-03 Reijo Tomperi - - * checkbufferoverrun.cpp, checkbufferoverrun.h, checkclass.cpp, - checkclass.h, checkfunctionusage.cpp, checkheaders.cpp, - checkmemoryleak.cpp, checkmemoryleak.h, checkother.cpp, - checkother.h, tasks.txt, testmemleak.cpp, testmemleakmp.cpp, - testsimplifytokens.cpp, testsuite.h, testtoken.cpp, - testtokenize.cpp, token.cpp, token.h, tokenize.cpp, tokenize.h: - Refactoring: Rename class "TOKEN" to "Token" - -2009-01-03 Daniel Marjamäki - - * cppcheck.cpp: Buffer overrun: Moved the "buffer overrun" and - "array index out of bounds" to "--all" because there were false - positives - -2009-01-03 Reijo Tomperi - - * Makefile, cppcheck.cbp, errormessage.cpp, errormessage.h: - ErrorMessage class added (not used yet and it is still unfinished) - -2009-01-03 Daniel Marjamäki - - * checkmemoryleak.cpp: Refactoring : Removed a short commented code - that I never use anyway - -2009-01-03 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Using freed memory : Fixed - false positive when usage is something like: printf("free %x",p); - -2009-01-03 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak : Fixed a - regression and added a test case - -2009-01-02 Reijo Tomperi - - * checkbufferoverrun.cpp, checkbufferoverrun.h, checkclass.cpp, - checkclass.h, checkfunctionusage.cpp, checkfunctionusage.h, - checkheaders.cpp, checkheaders.h, checkmemoryleak.cpp, - checkmemoryleak.h, checkother.cpp, checkother.h, cppcheck.cpp, - cppcheck.h, cppcheckexecutor.cpp, cppcheckexecutor.h, - errorlogger.h, filelister.cpp, filelister.h, main.cpp, - preprocessor.cpp, preprocessor.h, settings.cpp, settings.h, - testbufferoverrun.cpp, testcharvar.cpp, testclass.cpp, - testconstructors.cpp, testdivision.cpp, testfilelister.cpp, - testfunctionusage.cpp, testincompletestatement.cpp, - testmemleak.cpp, testmemleakmp.cpp, testother.cpp, - testpreprocessor.cpp, testredundantif.cpp, testrunner.cpp, - testsimplifytokens.cpp, testsuite.cpp, testsuite.h, testtoken.cpp, - testtokenize.cpp, testunusedprivfunc.cpp, testunusedvar.cpp, - token.cpp, token.h, tokenize.cpp, tokenize.h: Copyright 2007-2008 -> - 2007-2009 - -2009-01-02 Reijo Tomperi - - * token.cpp: Refactoring: Constructor of TOKEN changed to use - initialization list instead of assignment. - -2009-01-02 Daniel Marjamäki - - * preprocessor.cpp, preprocessor.h, testpreprocessor.cpp: - Preprocessor : Replace "#if defined(.." with "ifdef .." where - possible - -2009-01-02 Daniel Marjamäki - - * testmemleak.cpp: Memory leak : Added test case "if10" which is - similar to "if9" - -2009-01-02 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak: Improved the - checking of usage after free (if str is freed then "char c = - str[0];" is illegal) - -2009-01-02 Daniel Marjamäki - - * testmemleak.cpp: Memory leak: Renamed the test case "func12" to - "if9" - -2009-01-02 Nicolas Le Cam - - * testmemleak.cpp: Memory leak : Add a new test that currently fail - to highlight a regression - -2009-01-02 Nicolas Le Cam - - * cppcheck.cpp: Preprocessor: Get rid of an unused parameter - -2009-01-02 Nicolas Le Cam - - * preprocessor.cpp, preprocessor.h, testpreprocessor.cpp: - Preprocessor: Get rid of an unused parameter - -2009-01-02 Nicolas Le Cam - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak : Completly fix - false positive when using callbacks (Bug 2458510) - -2009-01-01 Reijo Tomperi - - * checkother.cpp: Refactoring: i++; changed to ++i; - -2009-01-01 Reijo Tomperi - - * checkbufferoverrun.cpp, checkclass.cpp, checkheaders.cpp, - checkmemoryleak.cpp, checkother.cpp, cppcheck.cpp, - preprocessor.cpp, testmemleak.cpp, testsuite.cpp, token.cpp, - tokenize.cpp: Refactoring: Prefer ++i; over i++; - -2009-01-01 Daniel Marjamäki - - * checkmemoryleak.cpp: Memory leak : Changed the handling of - "realloc" a little. The "getcode" will return "realloc" instead. And - this will be converted to "dealloc;alloc;" before simplifycode - -2009-01-01 Daniel Marjamäki - - * checkmemoryleak.cpp: Memory leak : a little different handling - when the callstack gets too big - -2009-01-01 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak : fixed false - positive when there are recursive calls. (using memory after it has - been freed) - -2009-01-01 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak : Fixed false - positives for "memory is used after it has been freed" - -2009-01-01 Daniel Marjamäki - - * checkmemoryleak.cpp: Memory leak : Fixed a bug in getcode - (assignment) - -2009-01-01 Daniel Marjamäki - - * checkmemoryleak.cpp, testtoken.cpp, token.cpp, token.h, - tokenize.cpp: TOKEN: Renamed TOKEN::setstr to TOKEN::str - -2009-01-01 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak : Fix to avoid - false positives - -2008-12-31 Daniel Marjamäki - - * checkmemoryleak.cpp: memory leak: removed 'if(true)' and - 'if(false)' as these are handled in the tokenizer instead - -2008-12-31 Daniel Marjamäki - - * releasenotes.txt: releasenotes : removed this file - -2008-12-31 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak : Added check - "Using resource after it has been released" - -2008-12-31 Daniel Marjamäki - - * checkother.cpp: if checking : fixed bug in previous commit - -2008-12-31 Daniel Marjamäki - - * checkother.cpp: if statements : bug fix and refactorings in the - checking for "if (condition);" - -2008-12-30 Daniel Marjamäki - - * cppcheck.cpp: help : minor updates to help text that cppcheck - shows when no parameters are given - -2008-12-30 Daniel Marjamäki - - * readme.txt: readme : minor updates - -2008-12-30 Reijo Tomperi - - * cppcheck.cpp: c++check -> cppcheck - -2008-12-30 Daniel Marjamäki - - * releasenotes.txt: releasenotes : edit - -2008-12-30 Daniel Marjamäki - - * cppcheck.cpp: cppcheck : updated version to 1.27 in help text - -2008-12-29 Daniel Marjamäki - - * checkmemoryleak.cpp: Memory leak : Reverted 796 and 797. I didn't - see definite improvements - -2008-12-29 Daniel Marjamäki - - * checkmemoryleak.cpp: Memory leak : Removed checking of 'if(true)' - and 'if(false)' as these are handled in the Tokenizer - -2008-12-29 Daniel Marjamäki - - * checkmemoryleak.cpp: Memory leak : Optimising the - 'CheckMemoryLeakClass::simplifycode' - -2008-12-28 Daniel Marjamäki - - * checkmemoryleak.cpp: Memory leak : Remove false positive for "if - (cond1) str=strdup(); if (cond2) str=strdup();" - -2008-12-28 Daniel Marjamäki - - * checkmemoryleak.cpp: memory leak : fixed false positive for "list - << data" - -2008-12-28 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak : Fixed false - positive for "list += data" - -2008-12-28 Reijo Tomperi - - * cppcheck.cpp: Bail out text is now not printed with --quiet option - -2008-12-28 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak : Fixed a - problem with a fclose inside an if condition - -2008-12-28 Reijo Tomperi - - * releasenotes.txt: releasenotes updated command line options made - more accurate - -2008-12-28 Daniel Marjamäki - - * releasenotes.txt: releasenotes : Added release notes for the - coming 1.27 release - -2008-12-28 Daniel Marjamäki - - * tokenize.cpp: Tokenizer::setVarId : Minor bug fix - -2008-12-27 Reijo Tomperi - - * tokenize.cpp: Optimizing setVarId() - -2008-12-27 Reijo Tomperi - - * preprocessor.cpp, preprocessor.h: preprocessor optimized to handle - faster removal of spaces near newline - -2008-12-27 Daniel Marjamäki - - * testrunner.vcproj: Visual C++ : Updated the project file - -2008-12-27 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak: Added check - "TestMemoryLeak::throw2" (no false positive upon throw) - -2008-12-27 Reijo Tomperi - - * cppcheck.cpp, man/cppcheck.1.xml, readme.txt, settings.cpp, - settings.h: Bailing out if too many (over 12) configurations found - froma file. --force parameter added to prevent this from happening. - -2008-12-27 Reijo Tomperi - - * preprocessor.cpp: Change one while loop to use stl algorithms and - added TODO about slow part of code - -2008-12-26 Reijo Tomperi - - * cppcheck.cpp, preprocessor.cpp, preprocessor.h: Added preprocessor - a way to retrieve configurations and file content one configuration - at time, because large files could consume 500 MB or even more - memory. - -2008-12-26 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leaks : Fixed false - positive for "p" when there is a line such as "p2 = p + 1;" - -2008-12-26 Daniel Marjamäki - - * testsimplifytokens.cpp: removeRedundantConditions : Added a simple - test case for "else if (false)" - -2008-12-26 Daniel Marjamäki - - * testsimplifytokens.cpp: removeRedundantConditions : Fixed the test - case added in [777] - -2008-12-26 Daniel Marjamäki - - * testsimplifytokens.cpp: removeReduntantConditions : Added test - case - -2008-12-26 Reijo Tomperi - - * testsimplifytokens.cpp, tokenize.cpp, tokenize.h: - removeReduntantConditions() can now handle if( true ) else if () - conditions also. - -2008-12-26 Daniel Marjamäki - - * testmemleak.cpp: Memory leak : Added TODO test case "class3". It - currently fails - -2008-12-25 Daniel Marjamäki - - * tokenize.cpp: refactoring : Removed unread variable 'staticfunc' - -2008-12-25 Daniel Marjamäki - - * checkbufferoverrun.cpp, token.cpp, token.h, tokenize.cpp: - TOKEN::Match : Removed the parameter varnames2 because it's unused - and deprecated - -2008-12-25 Daniel Marjamäki - - * token.cpp: uniformize files - -2008-12-25 Daniel Marjamäki - - * Makefile, Makefile.gprof: Makefile : Removed the .gprof makefile - and added a CGLAGS variable so the normal Makefile can easily be - changed - -2008-12-25 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leaks : Fixed false - positive with return (Bug 2458436) - -2008-12-25 Daniel Marjamäki - - * Makefile: Makefile : Reverted the Makefile changes in [763] - because they were committed by mistake - -2008-12-25 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak : Fixed false - positive when using callbacks (Bug 2458510) - -2008-12-24 Reijo Tomperi - - * tokenize.cpp: Cleanup to removeReduntantConditions() - -2008-12-24 Daniel Marjamäki - - * Makefile.gprof: added Makefile that can be used when profiling - cppcheck with gprof - -2008-12-24 Reijo Tomperi - - * tokenize.cpp: Minor improvement to removeReduntantConditions() - -2008-12-24 Daniel Marjamäki - - * tokenize.cpp: tokenize : optimising "simplifyConditions" - -2008-12-24 Daniel Marjamäki - - * Makefile, tokenize.cpp: Tokenizer::setVarId : small optimisations - -2008-12-24 Daniel Marjamäki - - * checkmemoryleak.cpp: memory leaks : optimising 'simplifycode' - -2008-12-24 Daniel Marjamäki - - * checkclass.cpp: checkclass : simple refactorings. Use Match - pattern better. Use str() and simpleMatch instead of Match when - possible - -2008-12-23 Reijo Tomperi - - * token.h: Some comments added - -2008-12-23 Nicolas Le Cam - - * token.cpp: Formatting: demux simpleMatch for readability - -2008-12-23 Reijo Tomperi - - * token.cpp, token.h: Optimization: isNotPattern() removed - -2008-12-23 Daniel Marjamäki - - * tokenize.cpp: tokenize : small optimisations. Use simpleMatch and - direct std::string comparisons instead of Match - -2008-12-23 Reijo Tomperi - - * token.cpp: Optimization, improved Match(). The str[0] == '%' - improvement - -2008-12-23 Nicolas Le Cam - - * token.cpp: Fix comparison between signed and unsigned integer - expressions warning - -2008-12-23 Daniel Marjamäki - - * tokenize.cpp: simplifyKnownVariables : optimisation - -2008-12-23 Daniel Marjamäki - - * checkmemoryleak.cpp: memory leaks : bug fix - -2008-12-23 Daniel Marjamäki - - * testsimplifytokens.cpp, testtokenize.cpp, tokenize.cpp: - simplifyIfAddBraces : Further fixes so that braces will be added to - an "else" statement too - -2008-12-23 Daniel Marjamäki - - * checkbufferoverrun.cpp: checkbufferoverrun : a bug fix and a - better use of Match - -2008-12-22 Nicolas Le Cam - - * checkbufferoverrun.cpp: Minor optimizations: introduce use of - simpleMatch, don't use [simple]Match on one word patterns; Minor - style formattings - -2008-12-22 Nicolas Le Cam - - * filelister.cpp: Fix FileLister::RecursiveAddFiles on files without - a base path. - -2008-12-22 Daniel Marjamäki - - * testsimplifytokens.cpp, testtokenize.cpp, tokenize.cpp: - simplifyIfAddBraces : Added check to cppcheck as it seems to work - pretty good now - -2008-12-22 Daniel Marjamäki - - * tokenize.cpp: simplifyIfAddBraces : Fixed a segmentation fault - -2008-12-22 Daniel Marjamäki - - * testtokenize.cpp, tokenize.cpp: simplifyIfAddBraces : Fixed minor - bug that caused the closing brace to be put on the wrong place - -2008-12-22 Daniel Marjamäki - - * testtokenize.cpp: TestTokenizer : Split the test - TestTokenizer::simplifyKnownVariables into 5 separate tests - -2008-12-22 Daniel Marjamäki - - * testtokenize.cpp: TestTokenizer : Broke up - TestTokenizer::ifAddBraces into a few separate tests - -2008-12-22 Daniel Marjamäki - - * tokenize.cpp: simplifyIfAddBraces : Fixed segmentation fault - -2008-12-22 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leaks : Reduce "if { - dealloc ; return ; } if return ;" to "if return ;". Related with bug - 2458532 - -2008-12-22 Daniel Marjamäki - - * testtokenize.cpp, tokenize.cpp, tokenize.h: Tokenizer : Added - function 'simplifyIfAddBraces' - -2008-12-22 Nicolas Le Cam - - * token.cpp: Fix simpleMatch when pattern only contain one word - -2008-12-21 Nicolas Le Cam - - * token.cpp, token.h: Implement simpleMatch that should be use when - pattern contains no flags - -2008-12-21 Reijo Tomperi - - * testsimplifytokens.cpp, tokenize.cpp, tokenize.h: More improvement - to removeReduntantConditions() and few tests for it also - -2008-12-21 Reijo Tomperi - - * testtokenize.cpp, tokenize.cpp, tokenize.h: Remove reduntant if - sentences that are never executed. - -2008-12-21 Nicolas Le Cam - - * tokenize.cpp: Optimization: Speed up typedef simplification. - -2008-12-21 Nicolas Le Cam - - * tokenize.cpp: Fix signed/unsigned warning (thanks Aggro) - -2008-12-21 Nicolas Le Cam - - * checkmemoryleak.cpp, token.cpp, tokenize.cpp: Refactoring: strdup - also exists in MSVS - -2008-12-21 Nicolas Le Cam - - * token.cpp, token.h, tokenize.cpp: Opimization: Remove - combineWithNext Member, use an array instead - -2008-12-21 Reijo Tomperi - - * testsimplifytokens.cpp: Few tests added for checking simplify of - if sentences - -2008-12-21 Reijo Tomperi - - * tokenize.cpp: Fixed bug, varid was not assigned properly when bool - use = false; was splitted into two statements in simplify code. - -2008-12-21 Reijo Tomperi - - * token.cpp, token.h, tokenize.cpp: Improving - simplifyKnownVariables() to simplify bool variables used inside if() - like int values are simplified. - -2008-12-21 Reijo Tomperi - - * checkbufferoverrun.cpp: Fixed one compiler (gcc) warning. - -2008-12-21 Nicolas Le Cam - - * checkbufferoverrun.cpp: Fix bug I introduced in rv727 - -2008-12-21 Nicolas Le Cam - - * checkbufferoverrun.cpp, checkmemoryleak.cpp, tokenize.cpp: Minor - optimizations and fixes - -2008-12-21 Daniel Marjamäki - - * tokenize.cpp: simplifyKnownVariables: fixed a segmentation fault - -2008-12-20 Reijo Tomperi - - * checkother.cpp, testother.cpp: Fixed bug with redundant condition: - - http://sourceforge.net/forum/forum.php?thread_id=2711792&forum_id=693501 - -2008-12-20 Daniel Marjamäki - - * checkmemoryleak.cpp, checkmemoryleak.h, testmemleakmp.cpp: Memory - leak : Updated the multipass checking a little - -2008-12-20 Reijo Tomperi - - * testclass.cpp: Updated the test to reflect change in previous - commit - -2008-12-20 Reijo Tomperi - - * checkclass.cpp: Improved the error message related to virtual - destructors - -2008-12-20 Daniel Marjamäki - - * checkclass.cpp: refactoring : Replaced "aaaa" with "str" - -2008-12-20 Daniel Marjamäki - - * cppcheck.cbp, testmemleakmp.cpp: codeblocks : added testmemleakmp - -2008-12-20 Daniel Marjamäki - - * Makefile, checkclass.cpp, checkmemoryleak.cpp, checkmemoryleak.h: - memory leak : Added experimental functionality for multipass - checking of memory leaks. Only added in the unit tests yet. - -2008-12-20 Daniel Marjamäki - - * token.cpp, token.h: Refactoring : Removed the function 'findtoken' - -2008-12-20 Daniel Marjamäki - - * checkclass.cpp: Refactoring : Replaced findtoken with findmatch - -2008-12-20 Daniel Marjamäki - - * checkother.cpp: refactoring : Replaced 'findtoken' with - 'findmatch' - -2008-12-20 Daniel Marjamäki - - * checkbufferoverrun.cpp: buffer overrun : Refactoring - -2008-12-20 Daniel Marjamäki - - * checkbufferoverrun.cpp, checkbufferoverrun.h, cppcheck.cpp, - testbufferoverrun.cpp: buffer overruns : renamed functions + minor - simplification - -2008-12-20 Daniel Marjamäki - - * checkclass.cpp, checkclass.h, cppcheck.cpp, testconstructors.cpp, - testunusedprivfunc.cpp: Class checking : Renamed the check functions - -2008-12-19 Reijo Tomperi - - * man/cppcheck.1.xml: Man page updated - -2008-12-19 Reijo Tomperi - - * cppcheck.cbp: Project file updated - -2008-12-19 Reijo Tomperi - - * testother.cpp: Updated app name and copyright to this new file - also - -2008-12-19 Reijo Tomperi - - * man/cppcheck.1.xml: Updated author names to man page - -2008-12-19 Daniel Marjamäki - - * Makefile, testother.cpp: Redundant condition: Added a test case - when a condition is not redundant - -2008-12-19 Reijo Tomperi - - * checkbufferoverrun.cpp, checkbufferoverrun.h, checkclass.cpp, - checkclass.h, checkfunctionusage.cpp, checkfunctionusage.h, - checkheaders.cpp, checkheaders.h, checkmemoryleak.cpp, - checkmemoryleak.h, checkother.cpp, checkother.h, cppcheck.cpp, - cppcheck.h, cppcheckexecutor.cpp, cppcheckexecutor.h, - errorlogger.h, filelister.cpp, filelister.h, main.cpp, - preprocessor.cpp, preprocessor.h, settings.cpp, settings.h, - testbufferoverrun.cpp, testcharvar.cpp, testclass.cpp, - testconstructors.cpp, testdivision.cpp, testfilelister.cpp, - testfunctionusage.cpp, testincompletestatement.cpp, - testmemleak.cpp, testpreprocessor.cpp, testredundantif.cpp, - testrunner.cpp, testsimplifytokens.cpp, testsuite.cpp, testsuite.h, - testtoken.cpp, testtokenize.cpp, testunusedprivfunc.cpp, - testunusedvar.cpp, token.cpp, token.h, tokenize.cpp, tokenize.h: - Copyright and app name changed in each file - -2008-12-19 Reijo Tomperi - - * filelister.cpp, testclass.cpp: Fixed bug, checking single file was - not possible. Few new tests added also - -2008-12-19 Reijo Tomperi - - * checkfunctionusage.cpp, checkfunctionusage.h, cppcheck.cpp: Don't - use keyword "this" in constructor - -2008-12-19 Reijo Tomperi - - * man/cppcheck.1.xml, readme.txt: Update man page and readme to - reflect the new syntax - -2008-12-19 Reijo Tomperi - - * cppcheck.cpp: Interface: Tags -a, -q, -s and -v added. - -2008-12-19 Reijo Tomperi - - * cppcheck.cpp: Interface: New version of interface and help texts, - --errorsonly changed to --quiet - -2008-12-19 Reijo Tomperi - - * cppcheck.cpp: Interface: Removed --recursive option, made it - default. Changed help texts. - -2008-12-19 Daniel Marjamäki - - * cppcheck.vcproj: visual c++: updated the project file - -2008-12-18 Nicolas Le Cam - - * checkbufferoverrun.cpp, checkbufferoverrun.h, checkclass.cpp, - checkclass.h, checkfunctionusage.cpp, checkfunctionusage.h, - checkheaders.cpp, checkheaders.h, checkmemoryleak.cpp, - checkmemoryleak.h, checkother.cpp, checkother.h, cppcheck.cpp, - cppcheck.h, cppcheckexecutor.cpp, cppcheckexecutor.h, - errorlogger.h, filelister.cpp, filelister.h, main.cpp, - preprocessor.cpp, preprocessor.h, settings.cpp, settings.h, - testbufferoverrun.cpp, testcharvar.cpp, testclass.cpp, - testconstructors.cpp, testdivision.cpp, testfilelister.cpp, - testfunctionusage.cpp, testincompletestatement.cpp, - testmemleak.cpp, testpreprocessor.cpp, testredundantif.cpp, - testrunner.cpp, testsimplifytokens.cpp, testsuite.cpp, testsuite.h, - testtoken.cpp, testtokenize.cpp, testunusedprivfunc.cpp, - testunusedvar.cpp, token.cpp, token.h, tokenize.cpp, tokenize.h: - Formatting: uniformize end of lines. - -2008-12-18 Daniel Marjamäki - - * testtokenize.cpp, tokenize.cpp: variable id : set variable ids for - struct members - -2008-12-18 Daniel Marjamäki - - * token.cpp: token : if setstr is used clear the variable id - -2008-12-18 Daniel Marjamäki - - * checkmemoryleak.cpp: Memory leaks : Remove "if break|continue ;" - that may otherwise cause false positives - -2008-12-18 Daniel Marjamäki - - * tokenize.cpp: tokenizer : using the simplifyKnownVariables - -2008-12-17 Daniel Marjamäki - - * checkclass.cpp, testclass.cpp: virtual destructors : no - errormessage if the derived class has no destructor or empty - destructor - -2008-12-17 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: memory leak : fixed 2 bugs - related to the testcases TestMemleak::if7 and TestMemleak::simple9 - -2008-12-17 Daniel Marjamäki - - * token.cpp, token.h, tokenize.cpp: token : fixed so that - TOKEN::_previous is updated when deleting tokens - -2008-12-17 Daniel Marjamäki - - * testsuite.cpp, testsuite.h: testsuite : make it possible to run a - specific testcase - -2008-12-16 Daniel Marjamäki - - * testmemleak.cpp: Memory leak : Added a test case for future - checking of struct members - -2008-12-16 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak : Fixed issue - 2429936 - false positive reported on the break in the code "loop { - dealloc ; alloc ; if break ; }" - -2008-12-16 Daniel Marjamäki - - * testmemleak.cpp: Memory leaks : Added test case for bug 2429936 - -2008-12-16 Daniel Marjamäki - - * checkmemoryleak.cpp, testmemleak.cpp: Memory leak : Fixed bug - described in issue 2432631. False positive on something like this.. - "alloc ; if(!var) alloc;" - -2008-12-16 Daniel Marjamäki - - * token.cpp, token.h: token : minor refactoring to - TOKEN::insertToken. Give the linenr and fileIndex the same values as - this token. It's better than nothing - -2008-12-15 Nicolas Le Cam - - * checkother.cpp, checkother.h, cppcheck.cpp: Removes - WarningIs(Alpha|Digit) checks as this can introduce more problems - than fixes. - -2008-12-15 Daniel Marjamäki - - * tasks.txt: tasks : Added task for optimising TOKEN::Match - -2008-12-15 Daniel Marjamäki - - * checkother.cpp, testredundantif.cpp: Redundant condition : fixed - the checking - -2008-12-15 Daniel Marjamäki - - * Makefile, checkother.cpp, checkother.h, testredundantif.cpp: - Redundant condition : Added a check - -2008-12-14 Nicolas Le Cam - - * tokenize.cpp: Fix compilation - -2008-12-14 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h, CheckClass.cpp, - CheckClass.h, CheckFunctionUsage.cpp, CheckFunctionUsage.h, - CheckHeaders.cpp, CheckHeaders.h, CheckMemoryLeak.cpp, - CheckMemoryLeak.h, CheckOther.cpp, CheckOther.h, FileLister.cpp, - FileLister.h, checkbufferoverrun.cpp, checkbufferoverrun.h, - checkclass.cpp, checkclass.h, checkfunctionusage.cpp, - checkfunctionusage.h, checkheaders.cpp, checkheaders.h, - checkmemoryleak.cpp, checkmemoryleak.h, checkother.cpp, - checkother.h, filelister.cpp, filelister.h, testfilelister.cpp: - Refactoring and fix to previous commits by me, forgot to actually - rename the files before ... - -2008-12-14 Nicolas Le Cam - - * FileLister.cpp, tokenize.cpp: Formatting: uniformize end of lines. - -2008-12-14 Reijo Tomperi - - * Makefile, cppcheck.cbp, cppcheck.cpp, cppcheck.h, - testbufferoverrun.cpp, testcharvar.cpp, testclass.cpp, - testconstructors.cpp, testdivision.cpp, testfilelister.cpp, - testfunctionusage.cpp, testincompletestatement.cpp, - testmemleak.cpp, testunusedprivfunc.cpp, testunusedvar.cpp, - tokenize.cpp: Refactoring: Renamed all files to lower case. Also - added testfilelister.cpp which was forgotted from previous commit. - -2008-12-14 Reijo Tomperi - - * FileLister.cpp, FileLister.h, Makefile, tokenize.cpp: Fixed bug, - paths like "/path/../index.h" created duplicate warnings with files - like "/index.h". Relative paths are now simplified to look a like. - Test cases added. - -2008-12-14 Nicolas Le Cam - - * CheckMemoryLeak.cpp, testtoken.cpp, testtokenize.cpp, - tokenize.cpp, tokenize.h: Formatting: uniformize end of lines. - -2008-12-14 Nicolas Le Cam - - * tasks.txt: Add something I want to work on - -2008-12-14 Nicolas Le Cam - - * tokenize.cpp: Add the last c++ cast operator - -2008-12-14 Daniel Marjamäki - - * tasks.txt: tasks : things that can be done - -2008-12-13 Reijo Tomperi - - * testtokenize.cpp: Old TODO comment removed - -2008-12-13 Reijo Tomperi - - * testtokenize.cpp: More tests added for simplifyKnownVariables() - -2008-12-13 Daniel Marjamäki - - * testtokenize.cpp, tokenize.cpp: tokenizer : updated - simplifyKnownVariables - -2008-12-13 Reijo Tomperi - - * testtokenize.cpp, tokenize.cpp, tokenize.h: Started making - simplifyKnownVariables(), but it is very much unfinished. Two test - cases added for it. - -2008-12-13 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leak : added standard functions that - are safe and doesn't need to be checked - -2008-12-13 Reijo Tomperi - - * tokenize.cpp, tokenize.h: Refactoring, simplifyConditions(), - simplifyCasts() and simplifyFunctionReturn() now return the opposite - of their boolean return value. - -2008-12-13 Daniel Marjamäki - - * testmemleak.cpp, tokenize.cpp, tokenize.h: Tokenizer : Simplify - function calls for functions that only returns a constant value - -2008-12-13 Daniel Marjamäki - - * testmemleak.cpp, tokenize.cpp, tokenize.h: Tokenizer : Added - function for simplifying casts - -2008-12-13 Nicolas Le Cam - - * CheckFunctionUsage.cpp, testsimplifytokens.cpp: Refactoring: - changed "aaaa" to "str" - -2008-12-13 Nicolas Le Cam - - * CheckBufferOverrun.cpp, CheckMemoryLeak.cpp, cppcheck.cpp, - preprocessor.cpp, preprocessor.h, testbufferoverrun.cpp, - testmemleak.cpp, testtokenize.cpp, token.cpp, token.h, tokenize.cpp: - Formatting: uniformize end of lines. - -2008-12-13 Nicolas Le Cam - - * testmemleak.cpp: Add three memoryleak tests involving pointer - casting that currently 'fail' - -2008-12-13 Daniel Marjamäki - - * testmemleak.cpp: Memory leak : Added a test case for false - positive when using function call - -2008-12-13 Daniel Marjamäki - - * CheckBufferOverrun.cpp, testbufferoverrun.cpp: Buffer overrun : - Use variable id if available in check of memset etc - -2008-12-13 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leak : Fixed a test where pointer is - reassigned - -2008-12-12 Reijo Tomperi - - * testmemleak.cpp: Slightly improved test case - -2008-12-12 Reijo Tomperi - - * testmemleak.cpp: Added test case for false positive, fails - currently - -2008-12-12 Reijo Tomperi - - * CheckMemoryLeak.cpp: Refactoring, some !Match() calls chanded into - using !!else syntax - -2008-12-12 Reijo Tomperi - - * testtokenize.cpp, token.cpp, token.h: TOKEN: Patterns like "if ; - !!else" are now possible - -2008-12-12 Daniel Marjamäki - - * tokenize.cpp: Tokenizer::SetVarId : Fixed segmentation fault - -2008-12-12 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h, - testbufferoverrun.cpp: CheckBufferOverrun : Using variable id to - check local array variables - -2008-12-12 Reijo Tomperi - - * testmemleak.cpp: testmemleak: Added 2 tests, fopen() and popen() - should return resource leak, instead of memory leak - -2008-12-12 Daniel Marjamäki - - * testbufferoverrun.cpp: testbufferoverrun : Added a testcase where - variable id is needed to avoid false positive - -2008-12-12 Reijo Tomperi - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h: Memoryleak: fopen and - popen report now "Resource leak" instead of "Memory leak" - -2008-12-12 Nicolas Le Cam - - * token.cpp: Fix a crash in eraseToken - -2008-12-11 Nicolas Le Cam - - * CheckOther.cpp: Fix compilation under VS2003 - -2008-12-11 Reijo Tomperi - - * cppcheck.cpp: Minor bug fix, CppCheck::Check didn't reset error - list after all checking was done. - -2008-12-11 Daniel Marjamäki - - * cppcheck.cpp, preprocessor.cpp, preprocessor.h, - testpreprocessor.cpp: preprocessing : Skip special characters. - Refactoring. - -2008-12-11 Daniel Marjamäki - - * todo.txt: todo : deleted this deprecated file - -2008-12-11 Daniel Marjamäki - - * readme.txt: readme : fixed the readme file - -2008-12-11 Daniel Marjamäki - - * CheckMemoryLeak.cpp: memory leak : Minor fixes to make the unit - tests work - -2008-12-10 Daniel Marjamäki - - * CheckClass.cpp, CheckMemoryLeak.cpp, CheckOther.cpp, - FileLister.cpp, FileLister.h, testmemleak.cpp: code cleanups - -2008-12-10 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leaks : Minor updates - and refactoring - -2008-12-10 Daniel Marjamäki - - * CheckOther.cpp: Borland C++ : minor update to make the code - compilable with borland c++ - -2008-12-10 Daniel Marjamäki - - * CheckClass.cpp: Virtual destructor : minor fix to avoid false - positives when more modifiers are used - -2008-12-10 Daniel Marjamäki - - * FileLister.cpp, FileLister.h: FileLister: Borland can use windows - api for file searching - -2008-12-09 Reijo Tomperi - - * cppcheck.cbp, token.cpp, token.h: Project file updated - (testtoken.cpp was missing), added TOKEN::printOut() function to - help with debugging. - -2008-12-09 Reijo Tomperi - - * Makefile, testtoken.cpp: Added test file for TOKEN class - -2008-12-09 Reijo Tomperi - - * CheckMemoryLeak.cpp, token.cpp, token.h, tokenize.cpp: - Refactoring: Moved token creation and token deletion into TOKEN - class. Added previous() (not tested yet) - -2008-12-09 Daniel Marjamäki - - * cppcheck.cpp: cppcheck : Set variable ids - -2008-12-09 Daniel Marjamäki - - * testmemleak.cpp: testmemleak : added a unit test that ensures that - the variable id handling works correctly. But it's currently not - working, and therefore it's commented out - -2008-12-09 Daniel Marjamäki - - * token.cpp, token.h: token : Updated the "Match" function so it can - check the variable id - -2008-12-09 Daniel Marjamäki - - * CheckOther.cpp: Variable usage : 2 more fixes - -2008-12-09 Nicolas Le Cam - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h, CheckClass.cpp, - CheckClass.h, CheckFunctionUsage.cpp, CheckMemoryLeak.cpp, - CheckMemoryLeak.h, CheckOther.cpp, CheckOther.h, FileLister.cpp, - FileLister.h, cppcheck.cpp, cppcheck.h, cppcheckexecutor.cpp, - cppcheckexecutor.h, errorlogger.h, main.cpp, preprocessor.cpp, - preprocessor.h, settings.cpp, settings.h, testbufferoverrun.cpp, - testconstructors.cpp, testfunctionusage.cpp, testmemleak.cpp, - testpreprocessor.cpp, testrunner.cpp, testsimplifytokens.cpp, - testsuite.cpp, testsuite.h, testtokenize.cpp, testunusedvar.cpp, - token.cpp, token.h, tokenize.cpp, tokenize.h: Formatting: uniformize - end of lines. - -2008-12-08 Nicolas Le Cam - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h, CheckClass.cpp, - CheckClass.h, CheckFunctionUsage.cpp, CheckMemoryLeak.cpp, - CheckMemoryLeak.h, CheckOther.cpp, CheckOther.h, FileLister.cpp, - FileLister.h, cppcheck.cpp, cppcheck.h, cppcheckexecutor.cpp, - cppcheckexecutor.h, errorlogger.h, main.cpp, preprocessor.cpp, - preprocessor.h, settings.cpp, settings.h, testbufferoverrun.cpp, - testconstructors.cpp, testfunctionusage.cpp, testmemleak.cpp, - testpreprocessor.cpp, testrunner.cpp, testsimplifytokens.cpp, - testsuite.cpp, testsuite.h, testtokenize.cpp, testunusedvar.cpp, - token.cpp, token.h, tokenize.cpp, tokenize.h: Revert revisions 627 - and 628 - -2008-12-08 Nicolas Le Cam - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckClass.h, - CheckMemoryLeak.cpp, CheckMemoryLeak.h, CheckOther.cpp, - CheckOther.h, FileLister.h, cppcheck.cpp, cppcheck.h, - cppcheckexecutor.cpp, cppcheckexecutor.h, errorlogger.h, - preprocessor.cpp, preprocessor.h, settings.cpp, settings.h, - testconstructors.cpp, testfunctionusage.cpp, testmemleak.cpp, - testpreprocessor.cpp, testsimplifytokens.cpp, testsuite.h, - testtokenize.cpp, testunusedvar.cpp, token.cpp, token.h, - tokenize.cpp, tokenize.h: Formatting: uniformize end of lines (part - 2) - -2008-12-08 Nicolas Le Cam - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h, CheckClass.cpp, - CheckClass.h, CheckFunctionUsage.cpp, CheckMemoryLeak.cpp, - CheckMemoryLeak.h, CheckOther.cpp, CheckOther.h, FileLister.cpp, - FileLister.h, cppcheck.cpp, cppcheck.h, cppcheckexecutor.cpp, - cppcheckexecutor.h, errorlogger.h, main.cpp, preprocessor.cpp, - preprocessor.h, settings.cpp, settings.h, testbufferoverrun.cpp, - testconstructors.cpp, testfunctionusage.cpp, testmemleak.cpp, - testpreprocessor.cpp, testrunner.cpp, testsimplifytokens.cpp, - testsuite.cpp, testsuite.h, testtokenize.cpp, testunusedvar.cpp, - token.cpp, token.h, tokenize.cpp, tokenize.h: Formatting: uniformize - end of lines. - -2008-12-08 Nicolas Le Cam - - * token.cpp: TOKEN::Match minor optimization - -2008-12-08 Reijo Tomperi - - * CheckFunctionUsage.cpp, CheckHeaders.cpp, CheckMemoryLeak.cpp, - CheckOther.cpp, token.cpp, token.h, tokenize.cpp: Refactoring: Rest - of the public variables in TOKEN moved to private area. - -2008-12-08 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckFunctionUsage.cpp, - CheckHeaders.cpp, CheckMemoryLeak.cpp, CheckOther.cpp, - errorlogger.h, testbufferoverrun.cpp, testsimplifytokens.cpp, - testtokenize.cpp, token.cpp, token.h, tokenize.cpp: Refactoring: - TOKEN::next renamed to _next, getter and setter functions for it - added next() and next(TOKEN*). - -2008-12-08 Daniel Marjamäki - - * CheckOther.cpp: Variable usage : A few small fixes to reduce false - positives - -2008-12-08 Reijo Tomperi - - * testtokenize.cpp, token.cpp, token.h, tokenize.cpp: Refactoring: - TOKEN::varId was moved from public to private - -2008-12-08 Daniel Marjamäki - - * testtokenize.cpp, token.h, tokenize.cpp, tokenize.h: Variable Id : - First simple implementation - -2008-12-08 Daniel Marjamäki - - * testsuite.h: testing : Minor fix for ASSERT_EQUALS macro - -2008-12-08 Nicolas Le Cam - - * testtokenize.cpp: Fix two warnings - -2008-12-08 Nicolas Le Cam - - * CheckClass.cpp: Virtual Destructor : Minor optimization - -2008-12-08 Daniel Marjamäki - - * cppcheck.cbproj, testrunner.cbproj: Borland C++ : Updated project - files cppcheck and testrunner - -2008-12-07 Nicolas Le Cam - - * testunusedvar.cpp: Fix compilation - -2008-12-07 Daniel Marjamäki - - * CheckOther.cpp, cppcheck.cpp, testunusedvar.cpp: function variable - usage : various fixes. but probably more fixes are needed. - -2008-12-07 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, testunusedvar.cpp: function variable - usage : Added a simple check - -2008-12-07 Reijo Tomperi - - * testtokenize.cpp, token.cpp: Fixed bug in TOKEN::multiCompare. - "abc" and "a" were matched. - -2008-12-07 Nicolas Le Cam - - * CheckMemoryLeak.cpp: Minor optimization. Reuse findmatch result - instead of recalling it - -2008-12-07 Daniel Marjamäki - - * testtokenize.cpp: tokenizer : The token "a" shouldn't match the - pattern "abc|def", added assertion to a test but it's currently - commented because it fails - -2008-12-07 Nicolas Le Cam - - * CheckClass.cpp, testconstructors.cpp: Constructors: Fix checking - of 'operator=' with test - -2008-12-07 Daniel Marjamäki - - * cppcheck.cbp: cppcheck.cbp : Added testclass.cpp - -2008-12-07 Daniel Marjamäki - - * CheckClass.cpp, testclass.cpp: Virtual destructors : Don't check - base classes when inheritance is non-public - -2008-12-07 Daniel Marjamäki - - * CheckClass.cpp, CheckClass.h, testconstructors.cpp: Constructors : - Refactoring + Added checking of 'operator=' - -2008-12-07 Daniel Marjamäki - - * tokenize.cpp: Fixed a bug in Tokenizer::simplifyTokenList. The - keyword operator is never used in a variable declaration - -2008-12-07 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leaks : Handle - assignments better - bug 2395524 - -2008-12-07 Daniel Marjamäki - - * CheckClass.cpp: Check constructors: Minor optimisation - -2008-12-07 Daniel Marjamäki - - * CheckClass.cpp, testconstructors.cpp: Constructors : Fixed so the - test that kush_eplus added works - -2008-12-07 Daniel Marjamäki - - * CheckClass.cpp: Refactoring. Use "str" instead of "aaaa0" - -2008-12-07 Daniel Marjamäki - - * CheckClass.cpp: Refactoring: use "findmatch" instead of - "findtoken" - -2008-12-07 Daniel Marjamäki - - * CheckClass.cpp, testclass.cpp: Virtual destructors : Handle - inheritance where "private|protected|public" is not defined - -2008-12-07 Nicolas Le Cam - - * testconstructors.cpp: Add a test case that currently fail - -2008-12-07 Nicolas Le Cam - - * FileLister.cpp: Fix bug when calling cppcheck without --recursive - flag - -2008-12-06 Daniel Marjamäki - - * testclass.cpp: Virtual destructors : Minor fix to a test to handle - a private inheritance - -2008-12-06 Daniel Marjamäki - - * CheckClass.cpp: Virtual Destructors : pattern for declaring a - derived class... "class %var% : public|protected|private %var% .." - -2008-12-06 Daniel Marjamäki - - * CheckClass.cpp, testclass.cpp: virtual destructor : iterate - through base classes for a derived class to check that the - destructor in each base class i virtual - -2008-12-06 Daniel Marjamäki - - * CheckClass.cpp, testconstructors.cpp: Uninitialized member - variables : Don't give false positives for private constructors - -2008-12-06 Daniel Marjamäki - - * Makefile, testclass.cpp: testclass : Added a new unit testing file - -2008-12-06 Daniel Marjamäki - - * CheckClass.cpp: Minor optimisation. Don't do redundant checking - -2008-12-06 Daniel Marjamäki - - * tokenize.cpp: tokenize: "~Base" should generate two tokens. "~" - and "Base" - -2008-12-06 Daniel Marjamäki - - * CheckClass.cpp, CheckClass.h, cppcheck.cpp: Class checking : Check - that base class destructors are virtual. Experimental - -2008-12-06 Daniel Marjamäki - - * CheckClass.cpp, CheckClass.h: CheckClass : Refactoring - Removed - include and moved struct VAR into the class - -2008-12-06 Daniel Marjamäki - - * CheckOther.cpp: Unreachable code : minor bug fixes - -2008-12-06 Daniel Marjamäki - - * CheckOther.cpp: Unreachable code : Fixed false positives for label - -2008-12-06 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, cppcheck.cpp: Added check that - detects unreachable code below a 'return' statement - -2008-12-06 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h, testmemleak.cpp: Memory - leaks: Better handling of "realloc". Fixing bug [ 2395262 ] - -2008-12-06 Daniel Marjamäki - - * token.cpp: TODO: Added a todo for refactoring TOKEN::Match - -2008-12-06 Daniel Marjamäki - - * tokenize.cpp: Tokenizer: Remove "volatile" keyword to simplify - checking - -2008-12-06 Daniel Marjamäki - - * testtokenize.cpp: Fixed so that the expected and actual values in - asserts are not mixed - -2008-12-06 Daniel Marjamäki - - * testtokenize.cpp: testtokenize: Added TestTokenize::match1 that - makes sure the old matching of "|" and "||" still works - -2008-12-06 Reijo Tomperi - - * CheckMemoryLeak.cpp: CheckMemoryLeak.cpp, g_renew and g_try_renew - also removed - -2008-12-06 Reijo Tomperi - - * CheckMemoryLeak.cpp: Memory leak: False positive with g_realloc(). - Removed g_realloc() and g_try_realloc() for now. See feature request - [ 2395262 ] Check leaks with realloc, g_realloc and g_try_realloc() - -2008-12-06 Reijo Tomperi - - * cppcheck.cpp, cppcheck.h, cppcheckexecutor.cpp, - cppcheckexecutor.h: cppcheck and executor, fixed compiling error - -2008-12-06 Daniel Marjamäki - - * cppcheck.cpp, cppcheck.h, cppcheckexecutor.cpp, - cppcheckexecutor.h: refactoring: Increased constness of function - parameters - -2008-12-05 Reijo Tomperi - - * preprocessor.cpp: Preprocessor: Fixed bug, read() didn't handle - correctly string constants like this: "\"" - -2008-12-05 Reijo Tomperi - - * CheckBufferOverrun.cpp, token.cpp: Token: Fixed bug in match - function, simplified CheckBufferOverrun code - -2008-12-05 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leak: refactoring - changed "aaaa" to - "str" - -2008-12-05 Daniel Marjamäki - - * tokenize.cpp: tokenize: Replace a complicated condition with a - "Match" - -2008-12-05 Daniel Marjamäki - - * tokenize.cpp: tokenize: Replace "aaaa" and "strcmp" with "str" and - "Match" - -2008-12-05 Daniel Marjamäki - - * CheckHeaders.cpp: CheckHeaders: Refactoring so str and Match is - used instead of aaaa and strcmp etc - -2008-12-05 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leak: Replaced a few "strcmp" with - "==" - -2008-12-05 Daniel Marjamäki - - * CheckBufferOverrun.cpp: Buffer overrun: Minor refactoring. Use the - Match function better. - -2008-12-05 Daniel Marjamäki - - * tokenize.cpp: tokenize: Minor refactorings - -2008-12-05 Daniel Marjamäki - - * CheckOther.cpp: CheckOther: Fixed a compiler warning - -2008-12-04 Reijo Tomperi - - * testtokenize.cpp, token.cpp: Bug fix: Minor bug in previous - commit, test added to catch that bug also. - -2008-12-04 Reijo Tomperi - - * testtokenize.cpp, token.cpp, token.h, tokenize.cpp: TOKEN: Match() - function improved, %any% and const|volatile kind of patterns are now - accepted. Simplified comparing on tokenize.cpp. - -2008-12-04 Daniel Marjamäki - - * testtokenize.cpp, tokenize.cpp: Tokenizer: Simplify numeric - comparisons - -2008-12-04 Daniel Marjamäki - - * testsuite.cpp: testsuite: show diffing strings better when they - are not equal - -2008-12-04 Daniel Marjamäki - - * testtokenize.cpp: TestTokenize: Use TOKEN::str() instead of - TOKEN::aaaa() where possible - -2008-12-04 Daniel Marjamäki - - * preprocessor.cpp, preprocessor.h, testpreprocessor.cpp: - Preprocessor: Minor refactoring and improved testing - -2008-12-03 Reijo Tomperi - - * testtokenize.cpp, tokenize.cpp: Tokenizer: Fixed bug, const and - volatile functions were not recogniced by fillFunctionList() - -2008-12-03 Daniel Marjamäki - - * preprocessor.cpp, testpreprocessor.cpp: preprocessor: fixed - handling of tabs and spaces - -2008-12-02 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leaks: Various improvements in - "simplifycode" - -2008-12-02 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leak: Further improvements of - "simplifycode" - -2008-12-02 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leak: Changed a comment - -2008-12-02 Daniel Marjamäki - - * cppcheck.cbproj: updated the borland project file - -2008-12-01 Reijo Tomperi - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h: Minor improvement to code - comments. - -2008-12-01 Nicolas Le Cam - - * CheckOther.cpp: Warning If minor optimizations - -2008-12-01 Reijo Tomperi - - * CheckOther.h: Patch: [ 2371330 ] Removed - CheckOther::WarningDangerousFunctions() declaration - -2008-12-01 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Refactoring and - improvements of simplifycode etc - -2008-12-01 Daniel Marjamäki - - * testsuite.cpp, testsuite.h: testing: minor refactoring so better - error messages are shown - -2008-12-01 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h, testmemleak.cpp: Memory - leaks: When "--debug" is given the checking will be different to - highlight problems in "getcode" and "simplifycode" - -2008-11-30 Daniel Marjamäki - - * cppcheck.cpp: added comment about "--debug" flag. This is used for - various debugging purposes so the behaviour of c++check is undefined - if it's given - -2008-11-30 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: The "do" must - be handled differently. Made a first fix for it - -2008-11-30 Reijo Tomperi - - * cppcheck.cpp, man/cppcheck.1.xml: Verbose: Added line change to - help text printing and updated man page - -2008-11-30 Daniel Marjamäki - - * cppcheck.cpp, cppcheck.h, settings.cpp, settings.h: Verbose error - message output through '--verbose' - -2008-11-29 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Fixed the test - 'CheckMemoryLeak::func8' - -2008-11-29 Daniel Marjamäki - - * testmemleak.cpp: Test Memory leak: Added a test case, currently a - false positive is generated - -2008-11-29 Daniel Marjamäki - - * cppcheck.cpp: cppcheck: Write version number etc - -2008-11-28 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Moved the class - member checking to the "--all" - -2008-11-27 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h, cppcheck.cpp, - testbufferoverrun.cpp: Array index : No recursive checking unless - the "--all" has been given - -2008-11-27 Reijo Tomperi - - * FileLister.cpp, cppcheck.cpp, man/cppcheck.1.xml: Recursive file - listing, .cxx added to file list - -2008-11-27 Reijo Tomperi - - * CheckMemoryLeak.cpp: Removed debug output - -2008-11-27 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leaks: Reverted the - sensitive checking in r536. And improved the simplifycode function. - -2008-11-26 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leaks: Made the - checking a lot more sensitive - -2008-11-26 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h: CheckMemoryLeak: - Refactoring. Use TOKEN::isStandardType instead of rewriting its - functionality - -2008-11-26 Daniel Marjamäki - - * token.cpp, token.h: token: refactoring the 'isStandardType' a - little - -2008-11-26 Daniel Marjamäki - - * testmemleak.cpp: testmemleak: Added 'func7' test case. Not working - yet - -2008-11-25 Reijo Tomperi - - * cppcheck.cpp, cppcheck.h: Feature added: CppCheck class has now - function addFile(string,string) which allows checking of unreal - files, by giving just filename and file content as a parameter. - -2008-11-25 Daniel Marjamäki - - * cppcheck.cpp, testbufferoverrun.cpp, testcharvar.cpp, - testmemleak.cpp, tokenize.cpp, tokenize.h: Refactoring: Removed - _settings member from the Tokenizer - -2008-11-25 Daniel Marjamäki - - * cppcheck.cpp, testbufferoverrun.cpp, testcharvar.cpp, - testconstructors.cpp, testdivision.cpp, testfunctionusage.cpp, - testincompletestatement.cpp, testmemleak.cpp, - testsimplifytokens.cpp, testtokenize.cpp, testunusedprivfunc.cpp, - testunusedvar.cpp, tokenize.cpp, tokenize.h: Refactoring: Tokenizer - - renaming functions, moved the 'tokenizeCode' to the private - section - -2008-11-25 Daniel Marjamäki - - * CheckFunctionUsage.cpp, tokenize.cpp: TODO: added a todo to add an - error message. and removed an "invalid" todo - -2008-11-25 Daniel Marjamäki - - * CheckFunctionUsage.cpp: Function usage: Report which file the - missing function is implemented in - -2008-11-24 Reijo Tomperi - - * cppcheck.h, cppcheckexecutor.cpp, cppcheckexecutor.h, - errorlogger.h: Refactoring: Added missing license texts and some - comments - -2008-11-24 Reijo Tomperi - - * cppcheck.cbp: Refactoring: Updated project file for Code::Blocks - -2008-11-24 Reijo Tomperi - - * Makefile, cppcheck.cpp, cppcheck.h, cppcheckexecutor.cpp, - cppcheckexecutor.h, errorlogger.h, main.cpp, testsuite.cpp, - testsuite.h: Refactoring: CppCheckExecutor class added - -2008-11-24 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckFunctionUsage.cpp, - CheckHeaders.cpp, CheckMemoryLeak.cpp, CheckOther.cpp, - testsimplifytokens.cpp, testtokenize.cpp, token.cpp, token.h, - tokenize.cpp: TOKEN: Refactoring the 'str' member variable - -2008-11-24 Daniel Marjamäki - - * FileLister.cpp: Visual C++: Updated the FileLister (applied patch - FileLister_ReworkRecursiveAddFiles submitted by kush_eplus) - -2008-11-24 Reijo Tomperi - - * token.cpp: bug fix, didn't compile on Linux (3 utf characters on - top of file again) - -2008-11-24 Daniel Marjamäki - - * cppcheck.vcproj: Visual C++: Updated the project file * removed 'commoncheck' * added 'checkfunctionusage' * added 'token' - -2008-11-24 Daniel Marjamäki - - * cppcheck.cbproj, token.cpp: Borland C++: Minor updates so cppcheck - compiles with Borland C++ - -2008-11-23 Reijo Tomperi - - * cppcheck.cpp, cppcheck.h, main.cpp, settings.cpp, settings.h: - Refactoring: Started making CppCheck class more generally usable - (e.g. as a part of IDE). - -2008-11-23 Reijo Tomperi - - * Makefile: Refactoring: Updated makefile to be more up-to-date - after big refactoring changes. - -2008-11-23 Daniel Marjamäki - - * CheckFunctionUsage.cpp: Function usage: Better handling of - '!foo()' - -2008-11-23 Reijo Tomperi - - * cppcheck.cbp, testrunner.cbp: Project files: Changed both targets - to same file, using custom makefile - -2008-11-23 Daniel Marjamäki - - * CheckFunctionUsage.cpp: Function usage: Minor update in the - pattern for using function - -2008-11-23 Daniel Marjamäki - - * CheckFunctionUsage.cpp, testfunctionusage.cpp: Function Usage: - Handling '.. else foo()' - -2008-11-23 Daniel Marjamäki - - * CheckFunctionUsage.cpp, testfunctionusage.cpp: Function usage: - Handling callbacks better: 'void (*f)() = cond ? foo : NULL' - -2008-11-23 Daniel Marjamäki - - * CheckFunctionUsage.cpp, testfunctionusage.cpp: Function usage: - handling 'return foo();' better - -2008-11-23 Daniel Marjamäki - - * cppcheck.cbp: codeblocks: Added project file for cppcheck - -2008-11-23 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckHeaders.cpp, - CheckMemoryLeak.cpp, token.cpp, token.h, tokenize.cpp: Refactoring: - IsName() and IsNumber() are no longer static and they don't take a - parameter. - -2008-11-23 Daniel Marjamäki - - * testfunctionusage.cpp: Added test file for function usage - -2008-11-23 Daniel Marjamäki - - * CheckFunctionUsage.cpp, Makefile, testrunner.cbp: Function Usage: - Make sure it's detected that func is used in code such as 'if ( - func() ) { ..' - -2008-11-23 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h, - CheckFunctionUsage.cpp, CheckFunctionUsage.h, CheckMemoryLeak.cpp, - CheckMemoryLeak.h, FileLister.h, cppcheck.cpp, cppcheck.h, - testbufferoverrun.cpp, testcharvar.cpp, testconstructors.cpp, - testdivision.cpp, testincompletestatement.cpp, testmemleak.cpp, - testtokenize.cpp, testunusedprivfunc.cpp, testunusedvar.cpp, - tokenize.cpp, tokenize.h: Refactoring: Renamed some member - variables: variable -> _variable - -2008-11-23 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckFunctionUsage.cpp, - CheckHeaders.cpp, CheckMemoryLeak.cpp, CheckOther.cpp, token.cpp, - token.h, tokenize.cpp: Refactoring: at() changed to tokAt() and - getstr() changed to strAt() - -2008-11-23 Daniel Marjamäki - - * CheckFunctionUsage.cpp: Function usage: Fixes in the check - -2008-11-23 Daniel Marjamäki - - * CheckFunctionUsage.cpp, CheckFunctionUsage.h, cppcheck.cpp, - cppcheck.h, testbufferoverrun.cpp, testcharvar.cpp, - testmemleak.cpp, testrunner.cbp, testsuite.cpp, testtokenize.cpp, - tokenize.cpp, tokenize.h: Refactoring: The - Tokenizer::FillFunctionList has no use of its parameter. Enabled the - CheckFunctionUsage - -2008-11-22 Reijo Tomperi - - * testtokenize.cpp: Bug fix: Didn't compile on Debian, missing - #include - -2008-11-22 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckFunctionUsage.cpp, - CheckHeaders.cpp, CheckMemoryLeak.cpp, CheckOther.cpp, Makefile, - token.cpp, token.h, tokenize.cpp, tokenize.h: Refactoring: token.* - files added, Some functions from Tokenizer moved under TOKEN. - Renamed few functions, like gettok() -> at(), combineWithNext() and - deleteNext() are also new names for old functions. Usage was gettok( - tok, 2 ), but now it is tok->at( 2 ). - -2008-11-22 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leak: Added checking for 'kcalloc' - -2008-11-22 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leak: The 'realloc' shouldn't be - treated exactly like 'malloc' - -2008-11-22 Daniel Marjamäki - - * CheckClass.cpp, CheckClass.h, CheckHeaders.cpp, CheckHeaders.h, - CheckMemoryLeak.cpp, CheckMemoryLeak.h, CheckOther.cpp, - CheckOther.h, testbufferoverrun.cpp, testcharvar.cpp, - testconstructors.cpp, testdivision.cpp, - testincompletestatement.cpp, testmemleak.cpp, testtokenize.cpp, - testunusedprivfunc.cpp, testunusedvar.cpp, tokenize.cpp, tokenize.h: - increased constness of member variable _tokenizer in the Check* - classes - -2008-11-22 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h, tokenize.cpp, - tokenize.h: CheckBufferOverrun: increased constness of _tokenizer - member - -2008-11-22 Daniel Marjamäki - - * cppcheck.cpp, cppcheck.h, testbufferoverrun.cpp, testcharvar.cpp, - testconstructors.cpp, testdivision.cpp, - testincompletestatement.cpp, testmemleak.cpp, testrunner.cbp, - testsimplifytokens.cpp, testtokenize.cpp, testunusedprivfunc.cpp, - testunusedvar.cpp, tokenize.cpp, tokenize.h: Check Function Usage: - Removed much of the old checking and made some refactoring - -2008-11-22 Daniel Marjamäki - - * CheckFunctionUsage.cpp, CheckFunctionUsage.h, Makefile: Function - Usage: Added a new class for checking function usage - -2008-11-22 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testtokenize.cpp, tokenize.cpp, tokenize.h: - tokenizer: simplifyConditions tries to simplify conditions.. those - that are always true to '( true )' and those that are always false - to '( false )' - -2008-11-22 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Handle - conditions that are always true / false - -2008-11-22 Daniel Marjamäki - - * testbufferoverrun.cpp, testcharvar.cpp, testconstructors.cpp, - testdivision.cpp, testincompletestatement.cpp, testmemleak.cpp, - testtokenize.cpp, testunusedprivfunc.cpp, testunusedvar.cpp, - tokenize.cpp: tokenizer: Added DeallocateTokens to the destructor so - it's not necessary to cleanup manually - -2008-11-22 Daniel Marjamäki - - * testtokenize.cpp, tokenize.cpp, tokenize.h: tokenizer: Added - functions "alwaysTrue" and "alwaysFalse" to check if a condition is - always true / false - -2008-11-21 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckHeaders.cpp, - CheckMemoryLeak.cpp, CheckOther.cpp, CommonCheck.cpp, - CommonCheck.h, Makefile, cppcheck.cpp, preprocessor.cpp, - testbufferoverrun.cpp, testcharvar.cpp, testmemleak.cpp, - tokenize.cpp, tokenize.h: Refactoring: CommonCheck.* files are - removed. Rest of the global functions from there were moved to - Tokenizer class - -2008-11-21 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h: Memory leak: Added - checking for 'fopen' and 'popen' - -2008-11-21 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Better handling - when calling functions - -2008-11-21 Daniel Marjamäki - - * cppcheck.cpp: unsigned division and char variable usage - moved - checks to "--style" - -2008-11-20 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h, CheckClass.cpp, - CheckClass.h, CheckHeaders.cpp, CheckHeaders.h, - CheckMemoryLeak.cpp, CheckMemoryLeak.h, CheckOther.cpp, - CheckOther.h, CommonCheck.cpp, CommonCheck.h, cppcheck.cpp, - cppcheck.h, errorlogger.h, preprocessor.cpp, preprocessor.h, - testbufferoverrun.cpp, testcharvar.cpp, testconstructors.cpp, - testdivision.cpp, testincompletestatement.cpp, testmemleak.cpp, - testpreprocessor.cpp, testrunner.cpp, testsimplifytokens.cpp, - testsuite.cpp, testsuite.h, testtokenize.cpp, - testunusedprivfunc.cpp, testunusedvar.cpp, tokenize.cpp, tokenize.h: - Refactoring: Errors are no longer logged via global functions to a - global stream. Instead callback function is used via interface. - ErrorLogger interface was added and taken into use. - -2008-11-20 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckHeaders.cpp, - CheckMemoryLeak.cpp, CheckOther.cpp, CommonCheck.cpp, - CommonCheck.h, tokenize.cpp, tokenize.h: Refactoring: Some global - functions moved to Tokenizer class - -2008-11-20 Daniel Marjamäki - - * testtokenize.cpp, tokenize.cpp, tokenize.h: cleanup - -2008-11-20 Daniel Marjamäki - - * testtokenize.cpp, tokenize.cpp, tokenize.h: Function list: Remove - functions with duplicate names to prevent false positives - -2008-11-19 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leak: Minor update to make the - checking stronger - -2008-11-19 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Readded some - checks that were removed in r481 - -2008-11-19 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Moved false - positive to "--all" upon some special case conditions (bug 2313129) - -2008-11-18 Daniel Marjamäki - - * CheckBufferOverrun.cpp: Buffer overrun: Fixed a segmentation fault - -2008-11-18 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leak: limit the max call depth to 2 - -2008-11-17 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leak: Minor fix to prevent hang - -2008-11-17 Daniel Marjamäki - - * cppcheck.cpp: minor update to startup message - -2008-11-17 Daniel Marjamäki - - * preprocessor.cpp: preprocessor: Better warning when illegal - character found - -2008-11-17 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: moved - simplifyTokens rule to '--all' - -2008-11-17 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Better handling - of 'if (0 != p)' - -2008-11-16 Daniel Marjamäki - - * CheckBufferOverrun.cpp, testbufferoverrun.cpp: Array index - overrun: Improved the checking of class variables - -2008-11-16 Daniel Marjamäki - - * testmemleak.cpp: testmemleak: Removed old TODO - -2008-11-16 Reijo Tomperi - - * CheckHeaders.cpp, CheckOther.cpp, tokenize.cpp, tokenize.h: - Refactoring: tokens() changed to const and to return const pointer. - -2008-11-16 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckHeaders.cpp, - CheckMemoryLeak.cpp, CheckOther.cpp, testsimplifytokens.cpp, - testtokenize.cpp, tokenize.cpp, tokenize.h: Refactoring: Global - variable tokenes is no more. - -2008-11-16 Reijo Tomperi - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h: Refactoring: static - variable in CheckMemoryLeak is now a private member of the class. - -2008-11-16 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h, CheckClass.cpp, - CheckClass.h, CheckMemoryLeak.cpp, CheckMemoryLeak.h, cppcheck.cpp, - testbufferoverrun.cpp, testcharvar.cpp, testconstructors.cpp, - testdivision.cpp, testmemleak.cpp, testrunner.cpp, - testunusedprivfunc.cpp, tokenize.cpp, tokenize.h: Few static - variables are now private members. ShowAll etc. global variables are - now members of Settings class and given as a parameter to the - classes that need them. - -2008-11-16 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h, testmemleak.cpp: Memory - leak: Mismatching allocation and deallocation in subfunction - -2008-11-16 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Added a simple - test case - -2008-11-16 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h, testmemleak.cpp: Memory - leak: reverted most of change 461. - -2008-11-16 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Added test case - that failed. And fixed it. - -2008-11-15 Reijo Tomperi - - * tokenize.cpp: Bug fix: Missing include from previous commit, - didn't compile on Debian. - -2008-11-15 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckMemoryLeak.cpp, CommonCheck.cpp, - CommonCheck.h, cppcheck.cpp, cppcheck.h, testbufferoverrun.cpp, - testcharvar.cpp, testmemleak.cpp, tokenize.cpp, tokenize.h: - Refactoring: Global/Static variables, FunctionList, GlobalFunctions - and UsedGlobalFunctions are now private members of Tokenizer class. - Class GlobalFunction is now private subclass of Tokenizer. Global - functions CheckGlobalFunctionUsage, FillFunctionList and - GetFunctionTokenByName are now member functions of Tokenizer. - -2008-11-15 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h, testmemleak.cpp: Memory - Leak: Handling Linux lists better => Detect more leaks - -2008-11-15 Daniel Marjamäki - - * testrunner.cbp: codeblocks: Added project file 'testrunner.cbp' - -2008-11-15 Daniel Marjamäki - - * testmemleak.cpp, testsimplifytokens.cpp, tokenize.cpp: - SimplifyTokens: Replace 'sizeof(*abc)' with '100'. This prevents - false positives in checks - -2008-11-15 Daniel Marjamäki - - * Makefile, testsimplifytokens.cpp, tokenize.cpp: Simplify Tokens: - Replace NULL with 0 and '(char *)0' with '0' - -2008-11-15 Daniel Marjamäki - - * CheckClass.cpp, testconstructors.cpp: Uninitialized Member - Variables: Fixed bug 'false positive on multi constructors' - -2008-11-15 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, testconstructors.cpp: cleanup files - -2008-11-15 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, testconstructors.cpp: Uninitialized - member variable: Added unit test that currently fails for bug - 2270353 - Uninitialized variable false positive on multi - constructors - -2008-11-15 Daniel Marjamäki - - * cppcheck.vcproj, testrunner.sln, testrunner.vcproj: Visual C++ - Express 2008: Added project 'testrunner' and updated the project - 'cppcheck' - -2008-11-15 Daniel Marjamäki - - * cppcheck.cbproj, testrunner.cbproj: Borland C++: Added files - "cppcheck" and "settings" to the projects - -2008-11-15 Daniel Marjamäki - - * man/cppcheck.1.xml: Applied patch "errors_only_man" that adds - description for "--errorsonly" to the man page. This was submitted - by kimmov in bug 2277848 - -2008-11-14 Reijo Tomperi - - * Makefile, cppcheck.cpp, cppcheck.h, main.cpp, settings.cpp, - settings.h, testrunner.cpp: Refactoring: New classes CppCheck and - Settings. Code from main.cpp was moved to cppcheck.cpp - -2008-11-13 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckHeaders.cpp, - CheckMemoryLeak.cpp, CheckOther.cpp, CommonCheck.cpp, - CommonCheck.h, main.cpp, testbufferoverrun.cpp, testcharvar.cpp, - testconstructors.cpp, testdivision.cpp, - testincompletestatement.cpp, testmemleak.cpp, testrunner.cpp, - testtokenize.cpp, testunusedprivfunc.cpp, testunusedvar.cpp, - tokenize.cpp, tokenize.h: Refactoring: Global variable Files is no - more. Use tokenizer->getFiles() to get a pointer to it. - -2008-11-13 Reijo Tomperi - - * Makefile: Make: New improved makefile - -2008-11-13 Daniel Marjamäki - - * CheckClass.cpp, testconstructors.cpp: Uninitialized variable: - chained assignments - -2008-11-13 Daniel Marjamäki - - * main.cpp: Added command line option "--errorsonly" - -2008-11-12 Reijo Tomperi - - * CheckBufferOverrun.cpp, main.cpp, testbufferoverrun.cpp, - testcharvar.cpp, testconstructors.cpp, testdivision.cpp, - testincompletestatement.cpp, testmemleak.cpp, testtokenize.cpp, - testunusedprivfunc.cpp, testunusedvar.cpp, tokenize.cpp, tokenize.h: - Refactoring: tokens_back and TypeSize are no longer global variables - -2008-11-12 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h, CheckClass.cpp, - CheckClass.h, CheckHeaders.cpp, CheckHeaders.h, - CheckMemoryLeak.cpp, CheckMemoryLeak.h, CheckOther.cpp, - CheckOther.h, main.cpp, testbufferoverrun.cpp, testcharvar.cpp, - testconstructors.cpp, testdivision.cpp, - testincompletestatement.cpp, testmemleak.cpp, - testunusedprivfunc.cpp, testunusedvar.cpp, tokenize.h: Refactoring: - Tokenizer object given as a parameter to most of the classes - -2008-11-11 Daniel Marjamäki - - * CheckClass.cpp, testunusedprivfunc.cpp: Unused private function: - return pointer to private function - -2008-11-11 Daniel Marjamäki - - * testmemleak.cpp: Memory leak: Added TODO test. Mismatching - allocation and deallocation in subfunction - -2008-11-11 Daniel Marjamäki - - * testunusedprivfunc.cpp: unused private function: Added test1 - (assert that error message is given for simple case) - -2008-11-11 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Fixed one more - unit test - -2008-11-11 Daniel Marjamäki - - * CheckOther.cpp: Refactoring: Don't use the TOKEN::str directly - -2008-11-11 Daniel Marjamäki - - * CheckBufferOverrun.cpp: Refactoring: Use 'Match' instead of direct - comparisons - -2008-11-11 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h, CheckClass.cpp, - CheckClass.h, CheckHeaders.cpp, CheckHeaders.h, - CheckMemoryLeak.cpp, CheckMemoryLeak.h, CheckOther.cpp, - CheckOther.h, Makefile, main.cpp, preprocessor.cpp, preprocessor.h, - testbufferoverrun.cpp, testcharvar.cpp, testconstructors.cpp, - testdivision.cpp, testincompletestatement.cpp, testmemleak.cpp, - testpreprocessor.cpp, testunusedprivfunc.cpp, testunusedvar.cpp: - Refactoring: Following new classes were created: - CheckBufferOverrunClass CheckClass CheckHeaders CheckMemoryLeakClass - CheckOther Preprocessor - -2008-11-10 Daniel Marjamäki - - * testunusedvar.cpp: unused struct member: Added checks - -2008-11-10 Daniel Marjamäki - - * testmemleak.cpp: testmemleak: Added todo 'forwhile7' - -2008-11-10 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Handle "goto" a - little differently - -2008-11-10 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: cleanup - -2008-11-10 Daniel Marjamäki - - * todo.txt: todo: added memory leak examples - -2008-11-10 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leaks: Added tests - and handling for 'throw' and linux lists - -2008-11-10 Daniel Marjamäki - - * todo.txt: todo: added 'check operator=' - -2008-11-09 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory leak: Minor updates in the notvar - function - -2008-11-09 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory Leak: Improved - checking of subfunctions. Simplify their code. - -2008-11-09 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Ensure that - simple memory leak is detected - -2008-11-09 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CommonCheck.cpp, CommonCheck.h, - testmemleak.cpp: Memory leak: Began work for parsing into - subfunctions. - -2008-11-09 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: Removed false - positives. 'use ; use ;' is not always the same as 'use ;' - -2008-11-09 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CommonCheck.cpp, testmemleak.cpp: Memory - Leak: Stronger checking. Ignore 'if use ;' and 'if dealloc;'. A leak - could occur if it's not executed. - -2008-11-09 Reijo Tomperi - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckHeaders.cpp, - CheckMemoryLeak.cpp, CheckOther.cpp, CommonCheck.cpp, main.cpp, - testbufferoverrun.cpp, testcharvar.cpp, testconstructors.cpp, - testdivision.cpp, testincompletestatement.cpp, testmemleak.cpp, - testtokenize.cpp, testunusedprivfunc.cpp, testunusedvar.cpp, - tokenize.cpp, tokenize.h: Refactoring: Tokenizer class added, - functions still mostly static and using globals - -2008-11-08 Daniel Marjamäki - - * testsuite.h: GPL: Added comment in testsuite.h - -2008-11-08 Daniel Marjamäki - - * Makefile, testunusedprivfunc.cpp: Unused private function: Added - test - -2008-11-08 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory leak: remove the - dealloc in "if dealloc ;" if it's not followed by an "else". This - makes the checking stronger. - -2008-11-07 Reijo Tomperi - - * tokenize.h: - Fixed compiling on Debian with gcc ( missing includes and std:: ) - Removed c-style include for Borland compiler. - -2008-11-07 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory Leak: Added checking - -2008-11-07 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h, testmemleak.cpp, - tokenize.h: cleanup the files - -2008-11-07 Daniel Marjamäki - - * tokenize.h: Visual C++: Fixed compiler error for "strdup" - -2008-11-07 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp, testrunner.cbproj: Memory - Leaks: Convert "do-while" blocks to "while" blocks to make the - handling for that the same. - -2008-11-07 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h, testmemleak.cpp: Memory - Leaks: Improved the checking of loops. - -2008-11-07 Daniel Marjamäki - - * tokenize.h: Borland C++: Fixed compiler error (couldn't find the - function 'free') - -2008-11-06 Reijo Tomperi - - * FileLister.cpp, FileLister.h, testtokenize.cpp: FileLister.* and - testtokenize.cpp, changed encoding to utf-8 - -2008-11-06 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory Leak: Fixed bug with - strdup in loop. Bug 2225370 - -2008-11-06 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckMemoryLeak.cpp, CommonCheck.cpp, - CommonCheck.h, tokenize.cpp, tokenize.h: Refactoring TOKEN: Changed - from struct to class - -2008-11-06 Daniel Marjamäki - - * CheckBufferOverrun.cpp, Makefile, testbufferoverrun.cpp, - testincompletestatement.cpp, tokenize.cpp: cleanup of UTF-8. Updated - the Makefile - -2008-11-06 Daniel Marjamäki - - * CheckOther.cpp: CheckAlpha: Expanded checking to include 'isupper' - and 'islower' - -2008-11-06 Daniel Marjamäki - - * CheckClass.cpp: CheckClass: Applied patch 2220196 - -2008-11-05 Daniel Marjamäki - - * todo.txt: todo: A few short updated notes - -2008-11-05 Daniel Marjamäki - - * tests.cpp: tests: Removed this deprecated file - -2008-11-05 Daniel Marjamäki - - * testrunner.cbproj: C++ Builder: Updated the testrunner project - -2008-11-05 Daniel Marjamäki - - * CheckBufferOverrun.cpp, testbufferoverrun.cpp: Buffer overrun: - Fixed a false positive - -2008-11-05 Daniel Marjamäki - - * testother.cpp: testother: Removed this test. Individual tests will - be created instead - -2008-11-05 Daniel Marjamäki - - * testincompletestatement.cpp: testincompletestatement: created new - test - -2008-11-05 Daniel Marjamäki - - * testbufferoverrun.cpp: TestBufferOverrun: Added a test case that - shouldn't generate error. Get address beyond array. - -2008-11-05 Daniel Marjamäki - - * testtokenize.cpp, tokenize.cpp: Tokenizer: Skip inline assembly - (Bug 2220727) - -2008-11-05 Daniel Marjamäki - - * CheckClass.cpp: CheckClass: Removed false positive "unused private - function" for typedef (Bug 2220326) - -2008-11-04 Daniel Marjamäki - - * testtokenize.cpp, tokenize.cpp: Tokenize: Changed the array - CurrentToken to a std::string - -2008-11-04 Daniel Marjamäki - - * testrunner.cbproj: Borland C++: Added 'TestTokenize' to the - testrunner project - -2008-11-03 Daniel Marjamäki - - * testpreprocessor.cpp: testpreprocessor: updated the testing for - multiline preprocessor statements - -2008-11-03 Daniel Marjamäki - - * preprocessor.cpp: preprocessor: fixed invalid character - -2008-11-03 Daniel Marjamäki - - * cppcheck.cbproj, testrunner.cbproj: Updated the Borland C++ - project files - -2008-11-03 Daniel Marjamäki - - * cppcheck.sln, cppcheck.vcproj: Added Visual C++ 2008 Express - solution and project files - -2008-11-03 Daniel Marjamäki - - * preprocessor.cpp: preprocessor: simple optimizations - -2008-11-03 Daniel Marjamäki - - * FileLister.cpp, FileLister.h, Makefile, main.cpp: File Listing: - New handling of listing files. (Bug 2194949) - -2008-11-03 Daniel Marjamäki - - * testpreprocessor.cpp: TestPreprocessor: Minor update to ensure - that extra spaces are filtered out - -2008-11-03 Daniel Marjamäki - - * testbufferoverrun.cpp, testcharvar.cpp, testconstructors.cpp, - testdivision.cpp, testmemleak.cpp, testother.cpp, testunusedvar.cpp: - Testing: DeallocateTokens after each test - -2008-11-03 Daniel Marjamäki - - * testtokenize.cpp, tokenize.cpp: Tokenizer: Handle '\' in - preprocessor lines - -2008-11-02 Daniel Marjamäki - - * preprocessor.cpp, testpreprocessor.cpp: preprocessor: handling the - '\' in preprocessor code - -2008-11-02 Daniel Marjamäki - - * CheckOther.cpp, testcharvar.cpp: TestCharVar: Fixed some false - positives - -2008-11-02 Daniel Marjamäki - - * CheckClass.cpp: Class Checking: Fixed AV in FindClassFunction - -2008-11-02 Daniel Marjamäki - - * testmemleak.cpp, tokenize.cpp: memleak: fixed false positives for - assignment in return statement (bug 2205568) - -2008-11-01 Daniel Marjamäki - - * CheckClass.cpp, testconstructors.cpp: Uninitialized Member - Variables: Fixed problems with different classes with same name (Bug - 2208157) - -2008-11-01 Daniel Marjamäki - - * man/cppcheck.1.xml: man: Added xml for generating man page - -2008-11-01 Daniel Marjamäki - - * Makefile: Makefile: Applied changes suggested by Reijo - -2008-11-01 Daniel Marjamäki - - * CheckClass.cpp, testconstructors.cpp: Uninitialized member - variables: Removed false positives when using operator= (Bug - 2190376) - -2008-11-01 Daniel Marjamäki - - * CheckClass.cpp, testconstructors.cpp: Uninitialized Member - Variables: Check statements that begin after for example "if (..)" - or "else" (Bug 2190290) - -2008-11-01 Daniel Marjamäki - - * CheckClass.cpp, testconstructors.cpp: Unitialized Members - Variables: Fixed false positives when using "this" (Bug 2190300) - -2008-10-31 Daniel Marjamäki - - * testpreprocessor.cpp: testpreprocessor: changed the syntax - -2008-10-31 Daniel Marjamäki - - * preprocessor.cpp: preprocessor: Minor typo fix - -2008-10-31 Daniel Marjamäki - - * main.cpp, preprocessor.cpp, preprocessor.h, testpreprocessor.cpp: - Preprocessor: Added elif handling. Check for invalid characters - -2008-10-31 Daniel Marjamäki - - * preprocessor.cpp, tokenize.cpp: fixed compilation warnings - generated by visual c++. Nothing serious - -2008-10-30 Daniel Marjamäki - - * main.cpp, preprocessor.cpp, testpreprocessor.cpp, tokenize.cpp, - tokenize.h: preprocessor: Use the new preprocessor in cppcheck - -2008-10-30 Daniel Marjamäki - - * preprocessor.cpp, testpreprocessor.cpp: preprocessor: Handling - "#if .." better - -2008-10-30 Daniel Marjamäki - - * main.cpp, preprocessor.cpp, testpreprocessor.cpp: preprocessor: - Minor cleanups and fixes - -2008-10-30 Daniel Marjamäki - - * main.cpp: Check that a supported compiler is used to when - compiling c++check - -2008-10-30 Daniel Marjamäki - - * testpreprocessor.cpp: preprocessor: Added test if_cond1. It fails - currently - -2008-10-29 Daniel Marjamäki - - * preprocessor.cpp, testpreprocessor.cpp: preprocessor: Added tests - test3, test4, test5 and if1 - -2008-10-29 Daniel Marjamäki - - * preprocessor.cpp: preprocessor: Fixed tests - -2008-10-28 Daniel Marjamäki - - * testpreprocessor.cpp: preprocessor: updated the tests. They are - now failing. - -2008-10-28 Daniel Marjamäki - - * preprocessor.cpp, preprocessor.h, testpreprocessor.cpp: cleanup - -2008-10-27 Daniel Marjamäki - - * preprocessor.cpp, testpreprocessor.cpp: preprocessor: refactoring - the preprocessor and added TestPreprocessor::if0 - -2008-10-27 Daniel Marjamäki - - * preprocessor.cpp, preprocessor.h, testpreprocessor.cpp: - preprocessor: Refactoring - -2008-10-27 Daniel Marjamäki - - * testrunner.cbproj: C++ Builder: Added the preprocessor files to - testrunner.cbproj - -2008-10-26 Daniel Marjamäki - - * preprocessor.cpp, testpreprocessor.cpp: preprocessor: Remove - comments - -2008-10-26 Daniel Marjamäki - - * preprocessor.cpp, testpreprocessor.cpp: preprocessor: refactoring - -2008-10-26 Daniel Marjamäki - - * preprocessor.cpp: preprocessor: quick fix to make the - TestPreprocessor::test1 work - -2008-10-26 Daniel Marjamäki - - * preprocessor.cpp, preprocessor.h, testpreprocessor.cpp: - preprocessor: Created a simple test. But it fails currently. - -2008-10-26 Daniel Marjamäki - - * testrunner.cpp, testsuite.cpp, testsuite.h: Testing: Only run - tests in a specified class - -2008-10-26 Daniel Marjamäki - - * Makefile, preprocessor.cpp, preprocessor.h, testpreprocessor.cpp: - preprocessor: Added new preprocessor. Only used in the tests yet. - -2008-10-26 Daniel Marjamäki - - * COPYING, CheckBufferOverrun.cpp, CheckBufferOverrun.h, - CheckClass.cpp, CheckClass.h, CheckHeaders.cpp, CheckHeaders.h, - CheckMemoryLeak.cpp, CheckMemoryLeak.h, CheckOther.cpp, - CheckOther.h, CommonCheck.cpp, CommonCheck.h, main.cpp, - testbufferoverrun.cpp, testcharvar.cpp, testconstructors.cpp, - testdivision.cpp, testmemleak.cpp, testother.cpp, testrunner.cpp, - testsuite.cpp, testunusedvar.cpp, tokenize.cpp, tokenize.h: - Licensing: Using the GPL 3 license - -2008-10-25 Daniel Marjamäki - - * CommonCheck.cpp, main.cpp: Usage of Global functions: Only checked - if "--all" is given. Show progress. - -2008-10-25 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Reverted [352] it's not a - good fix - -2008-10-25 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: CheckMemoryLeak: Fixed bug - 2190219 - False positive, Mismatching allocation and deallocation - -2008-10-23 Daniel Marjamäki - - * CheckOther.cpp, Makefile, testother.cpp: CheckIncompleteStatement: - Fixed false positive generated by CheckIncompleteStatement (bug - 2187837) - -2008-10-21 Daniel Marjamäki - - * CheckClass.cpp: CheckClass: Minor fix to make it compile in Visual - c++ - -2008-10-19 Daniel Marjamäki - - * CheckClass.cpp: CheckConstructors: Handle recursion better. Don't - hang. - -2008-10-19 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory Leak: Better checking of mismatching - alloc and dealloc for gtk - -2008-10-19 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: Memory Leak: Fixed false - positive - -2008-10-19 Daniel Marjamäki - - * tokenize.cpp: tokenize: Fixed possible endless loop problem when - handling typedefs - -2008-10-18 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Memory Leak: Better checking of memory leaks - in gtk applications - -2008-10-16 Daniel Marjamäki - - * Makefile, testbufferoverrun.cpp, testcharvar.cpp, - testconstructors.cpp, testdivision.cpp, testmemleak.cpp, - testsuite.cpp, testsuite.h, testunusedvar.cpp: testing: Various - fixes to make the tests compile without warnings/errors - -2008-10-16 Daniel Marjamäki - - * CheckMemoryLeak.cpp: MemoryLeak: Minor fix to reduce false - positives - -2008-10-15 Daniel Marjamäki - - * CheckMemoryLeak.cpp: MemoryLeak: minor updates - -2008-10-15 Daniel Marjamäki - - * testbufferoverrun.cpp, testcharvar.cpp, testconstructors.cpp, - testdivision.cpp, testmemleak.cpp, testsuite.h: Testing: Added macro - 'REGISTER_TEST' - -2008-10-13 Daniel Marjamäki - - * testbufferoverrun.cpp, testcharvar.cpp, testconstructors.cpp, - testdivision.cpp, testmemleak.cpp, testrunner.cbproj, - testrunner.cpp, testsuite.cpp, testsuite.h: Testing: Updated the - testing to the new test framework - -2008-10-12 Daniel Marjamäki - - * MiniCppUnit.cpp, MiniCppUnit.h, TestsRunner.cpp: testing: Removed - MiniCppUnit - -2008-10-12 Daniel Marjamäki - - * testrunner.cpp, testsuite.cpp, testsuite.h: testing: Added a new - unit testing framework - -2008-10-08 Daniel Marjamäki - - * testmemleak.cpp: testmemleak: preparing to add checks of function - calls - -2008-10-06 Daniel Marjamäki - - * CheckOther.cpp, testdivision.cpp: Unsigned division: Checking if - negative constant is used - -2008-10-06 Daniel Marjamäki - - * testdivision.cpp: TestDivision: Added two tests of unsigned - division when negative constant is used. - -2008-10-04 Daniel Marjamäki - - * CheckOther.cpp, main.cpp, testdivision.cpp: CheckUnsignedDivision: - Made it more accurate and moved it to the standard checks - -2008-09-29 Daniel Marjamäki - - * CheckMemoryLeak.cpp: CheckMemoryLeak: Removed false positives - about not deleting class instances - -2008-09-24 Daniel Marjamäki - - * main.cpp: cppcheck: removed checking of implementation in header. - temporarily commented out the check for variable scope. These - changes were made so that fewer warning messages will be produced - when running c++check - -2008-09-24 Daniel Marjamäki - - * Makefile, testunusedvar.cpp: testunusedvar: Added simple testing - for unused variables - -2008-09-23 Daniel Marjamäki - - * CheckOther.cpp: CheckOther: Minor updates. Removed false positives - for CheckScope - -2008-09-20 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, main.cpp, tokenize.cpp: Incomplete - statement: Check for statements that begin with a constant - -2008-09-16 Daniel Marjamäki - - * CheckOther.cpp, testcharvar.cpp: CheckOther: Minor updates in - checking of signed char variables and unsigned division - -2008-09-15 Daniel Marjamäki - - * CheckOther.cpp, testdivision.cpp: CheckUnsignedDivision: - Refactoring - -2008-09-11 Daniel Marjamäki - - * tokenize.cpp: tokenize: Fixed a bug in the tokenizer - -2008-09-11 Daniel Marjamäki - - * main.cpp: visual c++: added "--recursive" support - -2008-09-11 Daniel Marjamäki - - * CheckClass.cpp, CheckMemoryLeak.cpp, CommonCheck.cpp, main.cpp, - tokenize.cpp: compilation: Various cross compilation fixes. The - "--recursive" option doesn't work on VC now. - -2008-09-10 Daniel Marjamäki - - * CommonCheck.cpp, MiniCppUnit.cpp, main.cpp: compilation: hopefully - the program should be compilable on VC now - -2008-09-02 Daniel Marjamäki - - * CheckMemoryLeak.cpp: memleak: better handling of switch blocks - -2008-09-01 Daniel Marjamäki - - * testmemleak.cpp: testmemleak: added checks for class members - -2008-08-31 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: memleak: uncommented and - fixed the handling of switch - -2008-08-30 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: memleak: commented out the - switch handling temporarily. it causes segmentation faults when - checking the linux kernel. - -2008-08-30 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckHeaders.cpp, - CheckOther.cpp, CommonCheck.cpp, main.cpp, tokenize.cpp: made - cppcheck compile with g++ 4.3 - -2008-08-30 Daniel Marjamäki - - * main.cpp, tokenize.cpp: djgpp: Fixed compiler warnings/errors when - compiling with DJGPP - -2008-08-28 Daniel Marjamäki - - * testdivision.cpp, tokenize.cpp: tokenize: handle simple typedefs - -2008-08-28 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, Makefile, main.cpp, - testcharvar.cpp, testrunner.cbproj: char variable usage: Added - checking - -2008-08-27 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: testmemleak: improved the - checking of loops - -2008-08-27 Daniel Marjamäki - - * CheckOther.cpp, testdivision.cpp: testdivision: changed the error - message. hopefully it is clearer - -2008-08-27 Daniel Marjamäki - - * testrunner.cbproj: testrunner.cbproj: added 'testbufferoverrun', - 'testconstructors' and 'testdivision' - -2008-08-25 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: CheckMemoryLeak: Improved - the reducing of "if.." - -2008-08-24 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak.cpp: testmemleak: replace switch - blocks with if blocks - -2008-08-24 Daniel Marjamäki - - * Makefile, testconstructors.cpp: testing: added 'testconstructors' - -2008-08-23 Daniel Marjamäki - - * testdivision.cpp: test: Added 'testdivision.cpp' - -2008-08-23 Daniel Marjamäki - - * Makefile, testmemleak.cpp, tests.cpp: test: Added 'testdivision' - -2008-08-23 Daniel Marjamäki - - * testbufferoverrun.cpp, tests.cpp: test: Minor polishing - -2008-08-23 Daniel Marjamäki - - * testbufferoverrun.cpp: test: Added the last buffer overrun tests - -2008-08-23 Daniel Marjamäki - - * Makefile, testbufferoverrun.cpp, tests.cpp: testing: Added - 'testbufferoverrun' - -2008-08-23 Daniel Marjamäki - - * MiniCppUnit.cpp, MiniCppUnit.h: minicppunit: removed compiler - warnings about characters - -2008-08-23 Daniel Marjamäki - - * CheckMemoryLeak.cpp: CheckMemoryLeak: Updated the handling of - 'case' and 'default' a little - -2008-08-22 Daniel Marjamäki - - * test_cppcheck.cbproj, testrunner.cbproj: testing: created new - testproject for codegear that uses the minicppunit framework - -2008-08-22 Daniel Marjamäki - - * CheckMemoryLeak.cpp, MiniCppUnit.cpp, MiniCppUnit.h, - testmemleak.cpp, tests.cpp: testing: Moved tests from tests.cpp to - testmemleak.cpp (forwhile, switch) - -2008-08-21 Daniel Marjamäki - - * CheckMemoryLeak.cpp, MiniCppUnit.cpp, testmemleak.cpp, tests.cpp: - testing: Added tests TestMemoryleak::ifelse - -2008-08-21 Daniel Marjamäki - - * Makefile, MiniCppUnit.cpp, MiniCppUnit.h, TestsRunner.cpp, - testmemleak.cpp: testing: Started using the MiniCppUnit framework - -2008-08-20 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CommonCheck.cpp: refactoring: made - compilation work in codegear - -2008-08-20 Daniel Marjamäki - - * CheckMemoryLeak.cpp: CheckMemoryLeak: Fixed a bug: Don't erase "{ - }", replace with ";" - -2008-08-19 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Added testcase - (false positive from linux kernel) - -2008-08-19 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CommonCheck.cpp, tests.cpp: CheckMemoryLeak: - Small improvements - -2008-08-18 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: By default skip - class memory leaks because there may be various types of garbage - collectors - -2008-08-17 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Minor updates - -2008-08-17 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Made a test case - work - -2008-08-16 Daniel Marjamäki - - * CheckMemoryLeak.cpp: CheckMemoryLeak: Simplified and updated the - code reducers - -2008-08-16 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Refactoring - further - -2008-08-16 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Added simple - checking - -2008-08-16 Daniel Marjamäki - - * CheckMemoryLeak.cpp: CheckMemoryLeak: Got rid of false positives - -2008-08-16 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CommonCheck.cpp, CommonCheck.h: - CheckMemoryLeak: Refactoring the check - -2008-08-15 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Made the checking - a lot simpler when "--all" is not given. This should give few false - positives - -2008-08-15 Daniel Marjamäki - - * tests.cpp: tests: Added memory leak test that gives a false - positive - -2008-08-15 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Added testcase - and made it work (assume that foo.add(p) deallocates p. Todo to - trace into foo.add) - -2008-08-14 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: better handling - of switch blocks - -2008-08-13 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Handle one more - test case (return pointer) - -2008-08-13 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Calling unknown - function => assume that it's deallocating variable - -2008-08-12 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: memory leak: improved the - checking. subfunctions are parsed. redundant conditions are skipped - -2008-08-12 Daniel Marjamäki - - * CheckOther.cpp, tokenize.cpp: cleanup: removed spaces - -2008-08-12 Daniel Marjamäki - - * CheckBufferOverrun.cpp, tests.cpp: buffer overruns: added tests - and improved the checking - -2008-08-11 Daniel Marjamäki - - * tests.cpp: tests: cleanup and reordering - -2008-08-11 Daniel Marjamäki - - * tests.cpp: tests: Refactoring - -2008-08-09 Daniel Marjamäki - - * todo.txt: todo: added todo to simplify the token list further - -2008-08-09 Daniel Marjamäki - - * tests.cpp: tests: minor updates of the tests - -2008-08-09 Daniel Marjamäki - - * CheckMemoryLeak.cpp: CheckMemoryLeak: Improved the checking - (handling loops) - -2008-08-07 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: updated the - checking so that all execution paths are tried - -2008-08-07 Daniel Marjamäki - - * cppcheck.cbproj, test_cppcheck.cbproj: cg2007: Added CodeGear 2007 - project files - -2008-08-07 Daniel Marjamäki - - * CheckMemoryLeak.cpp: Refactoring: Renamed class allocfunc to - AllocFunc - -2008-08-07 Daniel Marjamäki - - * CommonCheck.cpp: CommonCheck: Refactoring. Renamed - clGlobalFunction to GlobalFunction - -2008-05-14 Daniel Marjamäki - - * tests.cpp: tests: updated the tests - -2008-05-14 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h: CheckOther: Removed unused functions - -2008-05-10 Daniel Marjamäki - - * tests.cpp: testing: Added test for mismatching allocation and - deallocation - -2008-05-10 Daniel Marjamäki - - * CheckBufferOverrun.cpp: CheckBufferOverrun: Refactoring and made - the checking smarter - -2008-05-10 Daniel Marjamäki - - * CheckBufferOverrun.cpp: CheckBufferOverrun: Fixed minor bug that - resultet in false positives - -2008-05-10 Daniel Marjamäki - - * CheckMemoryLeak.cpp: CheckMemoryLeak: Made the checking weaker to - reduce false positives - -2008-05-10 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Handling - functions that allocate memory - -2008-05-10 Daniel Marjamäki - - * CheckOther.cpp, tests.cpp: CheckStructMemberUsage: Added more - cases - -2008-05-09 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, main.cpp, tests.cpp: - CheckStructMemberUsage: Check for unused struct members - -2008-05-05 Daniel Marjamäki - - * CommonCheck.cpp: CheckGlobalFunctionUsage: Optimised - -2008-05-04 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Removed false - positives - -2008-05-03 Daniel Marjamäki - - * CheckOther.cpp, tests.cpp: CheckConstantFunctionParameters: - Updated the check to handle all std::.. struct and class - -2008-05-03 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, main.cpp: Added check: passing - constant function parameter by value instead of by reference/pointer - -2008-05-03 Daniel Marjamäki - - * CheckMemoryLeak.cpp: CheckMemoryLeak.cpp: Minor improvements to - avoid false positives - -2008-04-18 Daniel Marjamäki - - * CheckClass.cpp: Checking memset/memcpy/memmove. Removed false - positives - -2008-04-16 Daniel Marjamäki - - * CheckMemoryLeak.cpp: CheckMemoryLeak: A few tweaks to make it - report less false positives against the linux kernel - -2008-04-14 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Small fixes and - updates - -2008-04-14 Daniel Marjamäki - - * CheckMemoryLeak.cpp: CheckMemoryLeak: Bug fix so that checking - stops when the variable goes out of scope - -2008-04-14 Daniel Marjamäki - - * bugs_that_cppcheck_finds.txt: Removed 'bugs_that_cppcheck_finds'. - It will be listed in the wiki instead - -2008-04-12 Daniel Marjamäki - - * CheckClass.cpp, CheckMemoryLeak.cpp, tests.cpp: Minor updates. - Added todo. Refactoring - -2008-04-12 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: Improved the - checking (tests.cpp:memleak_in_function:test16) - -2008-04-12 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: CheckMemoryLeak: fixed bug that - caused false positives - -2008-04-12 Daniel Marjamäki - - * tests.cpp: Added testcase to look at later - -2008-04-12 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tokenize.cpp, tokenize.h: Checking for memory - leaks. Changed the handling of comments about deleting - -2008-04-11 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp, tokenize.cpp, tokenize.h: Make it - possible to disable memory leak checking for a variable. Usable to - avoid false positives - -2008-04-11 Daniel Marjamäki - - * main.cpp: Added comments - -2008-04-08 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: Refactoring CheckMemoryLeak to - detect more leaks - -2008-04-06 Daniel Marjamäki - - * CheckBufferOverrun.cpp, tests.cpp: CheckBufferOverrun: Removed a - false positive - -2008-04-06 Daniel Marjamäki - - * bugs_that_cppcheck_finds.txt, todo.txt: Minor updates in text - files. - -2008-04-06 Daniel Marjamäki - - * TestTok.cpp: TestTok: Deleted deprecated file - -2008-04-06 Daniel Marjamäki - - * CheckMemoryLeak.cpp: CheckMemoryLeak: Added more allocation and - deallocation functions - -2008-04-06 Daniel Marjamäki - - * Makefile: Makefile: Removed Statements - -2008-04-06 Daniel Marjamäki - - * Statements.cpp, Statements.h: Statements: Removed this bastard - from cppcheck - -2008-04-06 Daniel Marjamäki - - * main.cpp: Minor updates to [232] and [233]. Use __GNUC__ define - instead of CYGWIN - -2008-04-06 Daniel Marjamäki - - * main.cpp: Addon to [232] - -2008-04-06 Daniel Marjamäki - - * CheckHeaders.cpp, CheckMemoryLeak.cpp, CommonCheck.cpp, - CommonCheck.h, main.cpp, tokenize.cpp: Fixing bug 1935006 - Compile - problems on cygwin - -2008-04-05 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: Re-adding CheckMemoryLeak - functionality. More work is still needed. - -2008-04-04 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: Further improvements of - CheckMemoryLeak. Still not working as good as a few revisions ago. - -2008-04-04 Daniel Marjamäki - - * bufferoverrun.txt: Removed old file 'bufferoverrun.txt' - -2008-04-03 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: Refactoring CheckMemoryLeak - -2008-04-02 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckMemoryLeak.cpp, - CommonCheck.cpp: Match: Added matching for [] - -2008-04-02 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: Rewriting CheckMemoryLeak (Just - Started) - -2008-04-01 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckOther.cpp, tests.cpp: Minor updates. - Removed some false positives when checking variable scope - -2008-03-29 Daniel Marjamäki - - * CheckOther.cpp, CommonCheck.cpp, Statements.cpp, tests.cpp: Fixed - minor bugs - -2008-03-29 Daniel Marjamäki - - * CommonCheck.cpp, CommonCheck.h, Statements.cpp, main.cpp, - tests.cpp, tokenize.cpp: Added style checks to check for unused - global functions - -2008-03-28 Daniel Marjamäki - - * CheckClass.cpp, CommonCheck.cpp, CommonCheck.h, main.cpp, - tests.cpp: Refactoring: Removed 'HasErrors'. Better usage of - 'Match'. Hid the 'FunctionList' - -2008-03-28 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckHeaders.cpp, - CheckMemoryLeak.cpp, CheckOther.cpp, CommonCheck.cpp, - CommonCheck.h, Statements.cpp, main.cpp, tests.cpp, tokenize.cpp, - tokenize.h: Refactoring: Replaced deprecated "match" with the new - "Match" - -2008-03-27 Daniel Marjamäki - - * CheckBufferOverrun.cpp, tests.cpp: CheckBufferOverrun: Improved - checking of arrays declared like this: "type * var [ num ]" - -2008-03-26 Daniel Marjamäki - - * CheckBufferOverrun.cpp: test cppcheck: All tests work - -2008-03-25 Daniel Marjamäki - - * CheckBufferOverrun.cpp: Fixed bugs in 'CheckBufferOverrun.cpp' - -2008-03-25 Daniel Marjamäki - - * CheckBufferOverrun.cpp: To compile with borland, 'algorithm' was - needed - -2008-03-24 Daniel Marjamäki - - * CheckBufferOverrun.cpp, tests.cpp: Refactoring of - 'CheckBufferOverrun.cpp' - -2008-03-24 Daniel Marjamäki - - * CheckBufferOverrun.cpp: Refactoring 'CheckBufferOverrun'. Added - 'Match1'. - -2008-03-24 Daniel Marjamäki - - * CheckBufferOverrun.cpp: Refactoring the 'CheckBufferOverrun' - -2008-03-24 Daniel Marjamäki - - * CheckBufferOverrun.cpp, tests.cpp: Removed checking of 'dynamic - data' it's impossible to determine if it's false or true positives - without deeper analysis. - -2008-03-24 Daniel Marjamäki - - * CheckBufferOverrun.cpp: Made the checking for buffer overruns more - generic - -2008-03-24 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CommonCheck.cpp, CommonCheck.h: Combined - 'findfunction' and 'FindFunction'. Updated "CheckBufferOverrun" - (checking for-loops). - -2008-03-23 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CommonCheck.cpp, CommonCheck.h, tests.cpp: - Buffer overrun in function parameter - -2008-03-23 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckClass.cpp, tokenize.cpp: Refactoring - (Replace '->' with '.', use matching function when possible) - -2008-03-23 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckHeaders.cpp, CheckOther.cpp, - CommonCheck.cpp, CommonCheck.h, tests.cpp: Reverted 205:207 - -2008-03-23 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckOther.cpp, CommonCheck.cpp, - CommonCheck.h: Refactoring - -2008-03-23 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckHeaders.cpp, CheckOther.cpp, - CommonCheck.cpp, CommonCheck.h, tests.cpp: Refactoring: Use - 'setindentlevel' - -2008-03-22 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CommonCheck.cpp, CommonCheck.h: - Refactoring: Added helper function 'setindentlevel' - -2008-03-22 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CommonCheck.cpp, CommonCheck.h: Minor - refactoring - -2008-03-22 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckOther.cpp, - tokenize.cpp, tokenize.h: In the checks, use const pointers - -2008-03-21 Daniel Marjamäki - - * CheckBufferOverrun.cpp, tests.cpp: Handling pointers in - 'CheckBufferOverrun_StructVariable' - -2008-03-21 Daniel Marjamäki - - * CheckBufferOverrun.cpp, tests.cpp: Check for buffer overruns for - struct members (only numeric) - -2008-03-21 Daniel Marjamäki - - * checknpp.bat: Deleted obsolete file 'checknpp.bat' - -2008-03-21 Daniel Marjamäki - - * CheckOther.cpp, tests.cpp: 'CheckUnsignedDivision' -> more errors. - 'CheckVariableScope' -> removed false errors. - -2008-03-20 Daniel Marjamäki - - * CheckOther.cpp: Rewrote the checking for "unsigned division" => - less false positives - -2008-03-19 Daniel Marjamäki - - * tokenize.cpp: tokenize: Fixed two bugs * don't hang if we can't find the ending of a string. * don't divide by zero - -2008-03-19 Daniel Marjamäki - - * CheckOther.cpp, Statements.cpp, main.cpp: Updates here and there - to make it more accurate - -2008-03-18 Daniel Marjamäki - - * CheckClass.cpp: Better checking of class declarations. - -2008-03-18 Daniel Marjamäki - - * tests.cpp, tokenize.cpp: Updated tokenizer. To handle "#define - f1(a,b) (a+b)" better - -2008-03-17 Daniel Marjamäki - - * CheckOther.cpp, tests.cpp: Checking variable scope - -2008-03-17 Daniel Marjamäki - - * todo.txt: Updated 'todo.txt' - -2008-03-16 Daniel Marjamäki - - * CheckOther.cpp, main.cpp, tests.cpp: bug fixes for - 'CheckVariableScope' - -2008-03-16 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, CommonCheck.cpp, CommonCheck.h, - tests.cpp, tokenize.cpp, tokenize.h: Added test - 'CheckVariableScope'. Increased constness. - -2008-03-16 Daniel Marjamäki - - * tests.cpp, todo.txt: added 'todo.txt' - -2008-03-15 Daniel Marjamäki - - * checkproj.bat: Removed 'checkproj.bat' (Deprecated) - -2008-02-22 Daniel Marjamäki - - * readme.txt: updated command syntax example - -2008-02-22 Daniel Marjamäki - - * tests.cpp: allow duplicate error messages in tests - -2008-02-22 Daniel Marjamäki - - * CheckOther.cpp, CommonCheck.cpp, CommonCheck.h, main.cpp: Removed - false positives and also duplicate error messages. - -2008-02-22 Daniel Marjamäki - - * CheckOther.cpp: comments - -2008-02-22 Daniel Marjamäki - - * CheckClass.cpp: Removed false positives - -2008-02-22 Daniel Marjamäki - - * main.cpp: sort the files before checking to make the results - comparable - -2008-02-21 Daniel Marjamäki - - * CheckBufferOverrun.cpp: Fixed bug (Dereferencing NULL) - -2008-02-21 Daniel Marjamäki - - * CheckOther.cpp: removed false positives for CheckUnsignedDivision - -2008-02-21 Daniel Marjamäki - - * main.cpp: recursive checking when compiling with gcc - -2008-02-21 Daniel Marjamäki - - * main.cpp: recursive checking when compiled by borland c++ - -2008-02-20 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, main.cpp, tests.cpp, tokenize.cpp: - CheckUnsignedDivision: Added check. Not very accurate yet. - -2008-02-19 Daniel Marjamäki - - * CheckClass.cpp, tests.cpp: CheckClass: Improved constructor - checking - -2008-02-18 Daniel Marjamäki - - * Statements.cpp: Refactoring: Removed unneeded parameter - PointerType - -2008-02-18 Daniel Marjamäki - - * CheckClass.cpp, CheckHeaders.cpp, main.cpp, tokenize.cpp: Made it - compilable by borland c++ - -2008-02-18 Daniel Marjamäki - - * CheckClass.cpp, tests.cpp: ClassChecking: Only enable the 'no - constructor' warning if '--style' is given - -2008-02-18 Daniel Marjamäki - - * CheckClass.cpp, tests.cpp: Class Checking: No constructor - -2008-02-17 Daniel Marjamäki - - * main.cpp, tests.cpp: checking multiple files - -2008-02-17 Daniel Marjamäki - - * bugs_that_cppcheck_finds.txt: Added list of bugs that cppcheck - find (incomplete) - -2008-02-17 Daniel Marjamäki - - * CheckMemoryLeak.cpp, tests.cpp: Unit Testing: Checking for - mismatching allocation / deallocation - -2008-02-17 Daniel Marjamäki - - * Statements.cpp, tests.cpp: Unit Testing: Testing the statement - list - -2008-02-17 Daniel Marjamäki - - * Statements.cpp, Statements.h, internaltesting/testassign.cpp, - internaltesting/testassign.out, internaltesting/testdecl.cpp, - internaltesting/testdecl.out, internaltesting/testif.cpp, - internaltesting/testif.out, internaltesting/testloop.cpp, - internaltesting/testloop.out, internaltesting/testnew.cpp, - internaltesting/testnew.out, internaltesting/testuse.cpp, - internaltesting/testuse.out, tests.cpp: Unit Testing: Moved the - 'internaltesting' - -2008-02-17 Daniel Marjamäki - - * internaltesting.bat: Cleanup old testing - -2008-02-17 Daniel Marjamäki - - * testdangerousfunc1/err.msg, - testdangerousfunc1/testdangerousfunc1.cpp, testdelete1/err.msg, - testdelete1/testdelete1.cpp, testh1/err.msg, testh1/testh1.cpp, - testh1/testh1.h, testh2/emptyh.h, testh2/err.msg, - testh2/testh2.cpp, testh2/testh2.h, testh3/err.msg, testh3/h1.h, - testh3/h2.h, testh3/testh3.cpp, testh5/err.msg, testh5/testh5.cpp, - testh5/testh5.h, testh6/err.msg, testh6/testh6.cpp, - testh6/testh6.h, testmemset1/err.msg, testmemset1/testmemset1.cpp, - teststdfunc1/err.msg, teststdfunc1/teststdfunc1.cpp: Cleanup old - tests - -2008-02-17 Daniel Marjamäki - - * testcond1/err.msg, testcond1/testcond1.cpp, testfunc2/err.msg, - testfunc2/testfunc2.cpp, testfunc3/err.msg, - testfunc3/testfunc3.cpp, testfunc4/err.msg, - testfunc4/testfunc4.cpp, testfunc6/err.msg, - testfunc6/testfunc6.cpp, testif1/err.msg, testif1/testif1.cpp, - testif2/err.msg, testif2/testif2.cpp, testif3/err.msg, - testif3/testif3.cpp, testif4/err.msg, testif4/testif4.cpp, - testif5/err.msg, testif5/testif5.cpp, updateall.bat: Cleanup of old - testcases - -2008-02-17 Daniel Marjamäki - - * testmemleak1/err.msg, testmemleak1/testmemleak1.cpp, - testmemleak2/err.msg, testmemleak2/testmemleak2.cpp, - testmemleak3/err.msg, testmemleak3/testmemleak3.cpp, - testmemleak4/err.msg, testmemleak4/testmemleak4.cpp, tests.cpp: Unit - Testing: Moving memleak checks - -2008-02-16 Daniel Marjamäki - - * CheckMemoryLeak.cpp, main.cpp, testmemcheck1/err.msg, - testmemcheck1/testmemcheck1.cpp, testmemcheck2/err.msg, - testmemcheck2/testmemcheck2.cpp, testmemcheck3/err.msg, - testmemcheck3/testmemcheck3.cpp, testmemcheck4/err.msg, - testmemcheck4/testmemcheck4.cpp, testmemcheck5/err.msg, - testmemcheck5/testmemcheck5.cpp, tests.cpp: Unit Testing: Moved - 'testmemcheck' - -2008-02-16 Daniel Marjamäki - - * testUninitVar1/err.msg, testUninitVar1/testUninitVar1.cpp, - tests.cpp: Unit Testing: Moved 'testUninitVar1' - -2008-02-16 Daniel Marjamäki - - * testclass1/err.msg, testclass1/testclass1.cpp, - testclass10/err.msg, testclass10/testclass10.cpp, - testclass12/err.msg, testclass12/testclass12.cpp, - testclass13/err.msg, testclass13/testclass13.cpp, - testclass14/err.msg, testclass14/testclass14.cpp, - testclass2/err.msg, testclass2/testclass2.cpp, testclass4/err.msg, - testclass4/testclass4.cpp, testclass4/testclass4.h, - testclass7/err.msg, testclass7/testclass7.cpp, testclass8/err.msg, - testclass8/testclass8.cpp, tests.cpp: Unit Testing: Moved - constructor and operator= checks - -2008-02-16 Daniel Marjamäki - - * cppcheck.bpf, cppcheck.bpr, tok.bpf, tok.bpr: Borland C++: Removed - project files as gcc will from now on by the primary development - environment - -2008-02-16 Daniel Marjamäki - - * testall, tests.cpp: Testing: Removed old file 'testall'. Testing - will be handled by 'tests.cpp'. - -2008-02-16 Daniel Marjamäki - - * testbufferoverrun1/err.msg, - testbufferoverrun1/testbufferoverrun1.cpp, - testbufferoverrun2/err.msg, - testbufferoverrun2/testbufferoverrun2.cpp, - testbufferoverrun3/err.msg, - testbufferoverrun3/testbufferoverrun3.cpp, - testbufferoverrun4/err.msg, - testbufferoverrun4/testbufferoverrun4.cpp, - testbufferoverrun5/err.msg, - testbufferoverrun5/testbufferoverrun5.cpp, - testbufferoverrun6/err.msg, - testbufferoverrun6/testbufferoverrun6.cpp, - testbufferoverrun7/err.msg, - testbufferoverrun7/testbufferoverrun7.cpp, tests.cpp: Unit Testing: - All tests for buffer overruns were moved - -2008-02-16 Daniel Marjamäki - - * CommonCheck.cpp, CommonCheck.h, Makefile, main.cpp, tests.cpp, - tokenize.cpp, tokenize.h: Unit Testing: Start - -2008-01-17 Daniel Marjamäki - - * CheckClass.cpp, testUninitVar1/err.msg, - testUninitVar1/testUninitVar1.cpp, testclass13/err.msg: Better - checking of uninitialized variables - -2008-01-11 Daniel Marjamäki - - * checknpp.bat: check npp472 instead of npp41 - -2008-01-10 Daniel Marjamäki - - * CheckClass.cpp, cppcheck.bpr, main.cpp, testUninitVar1/err.msg, - testUninitVar1/testUninitVar1.cpp, testbufferoverrun1/warn.msg, - testbufferoverrun2/warn.msg, testbufferoverrun3/warn.msg, - testbufferoverrun4/warn.msg, testbufferoverrun5/warn.msg, - testbufferoverrun6/warn.msg, testclass1/warn.msg, - testclass10/warn.msg, testclass12/warn.msg, testclass13/err.msg, - testclass13/warn.msg, testclass2/warn.msg, testclass4/warn.msg, - testclass7/warn.msg, testclass8/warn.msg, testcond1/warn.msg, - testdangerousfunc1/warn.msg, testdelete1/warn.msg, - testfunc2/warn.msg, testfunc3/warn.msg, testfunc4/warn.msg, - testfunc6/warn.msg, testh1/warn.msg, testh2/warn.msg, - testh3/warn.msg, testh5/warn.msg, testif1/warn.msg, - testif2/warn.msg, testif3/warn.msg, testif4/warn.msg, - testif5/warn.msg, testmemcheck1/warn.msg, testmemcheck2/warn.msg, - testmemcheck3/warn.msg, testmemcheck4/warn.msg, - testmemcheck5/warn.msg, testmemleak4/warn.msg, - testmemset1/warn.msg, teststdfunc1/warn.msg, updateall.bat: check - for uninitialized variables - less generic to increase accuracy - -2008-01-05 Daniel Marjamäki - - * testall: Added 'testall' which is a simple bash-script that runs - all tests - -2007-10-29 Daniel Marjamäki - - * CheckClass.cpp, testclass14/err.msg, testclass14/testclass14.cpp: - remove false positives (uninitialized class members) - -2007-10-23 Daniel Marjamäki - - * CheckClass.cpp: CheckClass: Treating all "std::*" as initialized. - -2007-10-23 Daniel Marjamäki - - * tokenize.cpp: tokenizer: removed some preprocessing => less false - positives - -2007-10-22 Daniel Marjamäki - - * main.cpp, testcasebreak/err.msg, testcasebreak/testcasebreak.cpp, - testcasebreak/warn.msg, testfunc5/err.msg, testfunc5/testfunc5.cpp, - testfunc5/warn.msg: disabled checks that generates false positives - -2007-08-31 Daniel Marjamäki - - * CheckClass.cpp, CheckMemoryLeak.cpp, CheckOther.cpp, - testcasebreak/warn.msg, testmemleak3/err.msg, testmemleak4/err.msg, - testmemleak4/testmemleak4.cpp, testmemleak4/warn.msg: Removing false - positives - -2007-07-27 Daniel Marjamäki - - * CheckMemoryLeak.cpp, Statements.cpp, testmemleak2/err.msg, - testmemleak2/testmemleak2.cpp, testmemleak3/err.msg, - testmemleak3/testmemleak3.cpp: Added 2 checks for memory leaks - -2007-07-26 Daniel Marjamäki - - * main.cpp: Don't allow search pattern in the filename yet. There's - no way to solve it through ANSI C. - -2007-07-26 Daniel Marjamäki - - * checkproj.bat, readme.txt: Minor update: Updated the readme and - checkproj files. - -2007-07-26 Daniel Marjamäki - - * testcond1/err.msg: TestCond1: Updated test. It didn't have a - "err.msg" file - -2007-07-26 Daniel Marjamäki - - * testcasebreak/err.msg, testcasebreak/testcasebreak.cpp, - testcasebreak/warn.msg: Added test: "testcasebreak" - -2007-07-24 Daniel Marjamäki - - * main.cpp: Searching multiple files - -2007-07-24 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, testcond1/testcond1.cpp, - testcond1/warn.msg: Added checks: * CheckIfAssignment: assignment in condition * CheckCaseWithoutBreak: case but no break/return - -2007-07-20 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckMemoryLeak.cpp, Statements.cpp, - checknpp.bat, main.cpp, testclass13/warn.msg: Command line options: - Added "--all" and "--style", removed "-w" - -2007-07-20 Daniel Marjamäki - - * bufferoverrun.txt: bufferoverrun.txt: Added file that contains - thoughts and ideas concerning buffer overruns. - -2007-07-20 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CommonCheck.cpp, CommonCheck.h, - Statements.cpp: For the highest accuracy, don't warn for all memory - leaks unless the "-w" is given - -2007-07-20 Daniel Marjamäki - - * CheckClass.cpp: Always give a warning when 'memset' is used upon a - class - -2007-07-19 Daniel Marjamäki - - * CheckBufferOverrun.cpp, main.cpp, testbufferoverrun7/err.msg, - testbufferoverrun7/testbufferoverrun7.cpp: Improved the buffer - overrun checks. Results that are not 100% certain must be enabled - through the "-w". - -2007-07-18 Daniel Marjamäki - - * Makefile, tokenize.cpp: Minor modifications to make it compile on - linux - -2007-07-18 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CommonCheck.cpp, main.cpp, - testbufferoverrun7/err.msg, - testbufferoverrun7/testbufferoverrun7.cpp: Buffer overruns, using - string with unknown length - -2007-07-17 Daniel Marjamäki - - * CheckMemoryLeak.cpp, Makefile: Minor updates to make it easier to - port to Linux - -2007-07-17 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckClass.cpp, CheckHeaders.cpp, - CheckMemoryLeak.cpp, CheckOther.cpp, Makefile, cppcheck.bpr, - main.cpp, testclass13/err.msg, testclass13/testclass13.cpp, - testclass13/warn.msg, tokenize.cpp: Minor updates to make it - portable to Linux. - -2007-06-11 Daniel Marjamäki - - * CheckHeaders.cpp: CheckHeaders: Checking if included headers are - needed - -2007-06-10 Daniel Marjamäki - - * CheckOther.cpp: CheckOther: minor bug fix - -2007-06-10 Daniel Marjamäki - - * CheckMemoryLeak.cpp, testmemleak1/err.msg, - testmemleak1/testmemleak1.cpp: CheckMemoryLeak: Detect memory leaks - for class members - -2007-06-09 Daniel Marjamäki - - * CheckOther.cpp: CheckOther: Improved the check that checks 'if - (condition) var=true;' - -2007-06-09 Daniel Marjamäki - - * CheckHeaders.cpp: CheckHeaders: Improved the check that checks - included headers. - -2007-06-08 Daniel Marjamäki - - * CheckHeaders.cpp: CheckHeaders: Updated message - -2007-06-08 Daniel Marjamäki - - * tokenize.cpp: Tokenize: generate tokens on '#define' - (CheckIncludedHeaders) - -2007-06-08 Daniel Marjamäki - - * testbufferoverrun1/warn.msg, testbufferoverrun2/warn.msg, - testbufferoverrun3/warn.msg, testbufferoverrun4/warn.msg, - testbufferoverrun5/warn.msg, testbufferoverrun6/warn.msg, - testdangerousfunc1/warn.msg, testdelete1/err.msg, - testfunc2/warn.msg, testfunc3/warn.msg, testfunc4/warn.msg, - testfunc5/err.msg, testfunc5/warn.msg, testfunc6/err.msg, - testfunc6/warn.msg, testh1/warn.msg, testh3/err.msg, testh3/h1.h, - testh3/h2.h, testh3/testh3.cpp, testh3/warn.msg, testif1/err.msg, - testif1/warn.msg, testif2/err.msg, testif2/warn.msg, - testif3/warn.msg, testif4/warn.msg, testmemcheck1/warn.msg, - testmemcheck2/warn.msg, testmemcheck3/warn.msg, - testmemcheck4/warn.msg, testmemcheck5/warn.msg, - testmemset1/warn.msg, updateall.bat: Updated the tests - -2007-06-08 Daniel Marjamäki - - * checknpp.bat: Checking Notepad++: Enabled all warnings - -2007-06-08 Daniel Marjamäki - - * CheckOther.cpp, testif5/err.msg, testif5/testif5.cpp, - testif5/warn.msg: CheckOther: Added check. 'if (condition) var=true; - else var=false;' => 'var = (condition);' - -2007-06-08 Daniel Marjamäki - - * CheckHeaders.cpp: CheckHeaders: Limit the number of warnings about - 'implementation in header' - -2007-06-08 Daniel Marjamäki - - * main.cpp: Main: More checks are only done when the '-w' flag is - given. - -2007-06-08 Daniel Marjamäki - - * CheckHeaders.cpp: CheckHeaders: Bug fix - -2007-06-08 Daniel Marjamäki - - * CheckHeaders.cpp: CheckHeaders: Bug fix - -2007-06-08 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CheckOther.cpp: Modified comments - -2007-06-08 Daniel Marjamäki - - * CheckHeaders.cpp, testh6/err.msg, testh6/testh6.cpp, - testh6/testh6.h: CheckHeaders: Check if all included headers are - needed - -2007-06-06 Daniel Marjamäki - - * CheckOther.cpp, testfunc6/err.msg, testfunc6/testfunc6.cpp: Added - check: "if (condition) var=true;" can be written as - "var|=(condition);" - -2007-06-05 Daniel Marjamäki - - * CheckBufferOverrun.cpp: Buffer overrun: also check the 'memcopy' - parameters. - -2007-06-05 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, main.cpp, testfunc5/err.msg, - testfunc5/testfunc5.cpp: Added check: suspicious usage of strtok - -2007-06-05 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, main.cpp, testfunc4/err.msg, - testfunc4/testfunc4.cpp: Invalid Function Parameter: Check calls to - strtol and strtoul - -2007-06-05 Daniel Marjamäki - - * CheckHeaders.cpp: CheckHeaders: Minor update - -2007-06-05 Daniel Marjamäki - - * CheckBufferOverrun.cpp: CheckBufferOverrun: Optimized and improved - the checking - -2007-06-05 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h, main.cpp: Added check: 'IsAlpha' - -2007-06-04 Daniel Marjamäki - - * testh1/warn.msg, testh2/warn.msg: Tests: Updated the tests. - Checking for unneeded includes - -2007-06-04 Daniel Marjamäki - - * CheckHeaders.cpp, main.cpp: CheckHeaders: Check for unnecessary - headers. some fixes. - -2007-06-03 Daniel Marjamäki - - * CheckMemoryLeak.cpp: CheckMemoryLeak: Bug fix. - -2007-06-03 Daniel Marjamäki - - * tokenize.cpp: tokenize: bug fixes. Handling typedefs. - -2007-06-02 Daniel Marjamäki - - * testif2/err.msg: Test: Updated 'testif2' which is testing the - 'a=b; if (a!=b)' - -2007-06-02 Daniel Marjamäki - - * testif4/err.msg, testif4/testif4.cpp: Test: Test that 'a=b; if - (a==b)' don't generate false positives - -2007-06-02 Daniel Marjamäki - - * testif3/err.msg, testif3/testif3.cpp: Test: Test that 'a=b; if - (a==b)' is detected - -2007-06-02 Daniel Marjamäki - - * tokenize.cpp: tokenize: Fixed the 'typedef' simplifications. Added - token '#' upon preprocessor instructions. - -2007-06-02 Daniel Marjamäki - - * testif2/err.msg, testif2/testif2.cpp: Test: Test that 'a=b; if - (a==b)' is detected - -2007-06-02 Daniel Marjamäki - - * CheckOther.cpp: CheckOther: Added check for 'a=b; if (a==b)' - -2007-05-30 Daniel Marjamäki - - * tokenize.cpp, tokenize.h: tokenizer: made the 'SizeOfType' public. - bug fix in the tokenizer (strings longer than 1000 characters). - -2007-05-30 Daniel Marjamäki - - * CheckBufferOverrun.cpp: CheckBufferOverrun.cpp: Bug fixes - -2007-05-29 Daniel Marjamäki - - * TestTok.cpp, main.cpp, tok.bpr: minor updates - -2007-05-29 Daniel Marjamäki - - * tokenize.cpp, tokenize.h: Tokenize: Replace 'typedef' - -2007-05-29 Daniel Marjamäki - - * TestTok.cpp, internaltesting/testdecl.out, main.cpp, tok.bpr, - tokenize.cpp, tokenize.h: Tokenize: Simplify declarations - -2007-05-28 Daniel Marjamäki - - * tokenize.cpp: Tokenize: Replace '*(var+num)' with 'var[num]' - -2007-05-28 Daniel Marjamäki - - * tokenize.cpp: Tokenize: improved the preprocessing of - 'sizeof(type)' - -2007-05-26 Daniel Marjamäki - - * TestTok.cpp, tok.bpf, tok.bpr: tok: Added a program that tests the - tokenizer. - -2007-05-26 Daniel Marjamäki - - * tokenize.cpp: Tokenize: Improved the tokenizer. Calculations are - done in the tokenizer. sizeof is replaced with numbers. - -2007-05-26 Daniel Marjamäki - - * testbufferoverrun6/err.msg, - testbufferoverrun6/testbufferoverrun6.cpp: Test: Added a buffer - overrun test that contains a calculation that points at an illegal - index - -2007-05-26 Daniel Marjamäki - - * Makefile: Makefile: Updated because the program has been split up - into several files. - -2007-05-26 Daniel Marjamäki - - * CheckBufferOverrun.cpp: CheckBufferOverrun: Improved checking for - types other than char - -2007-05-25 Daniel Marjamäki - - * cppcheck.bpr: cppcheck: added checkothers to the project - -2007-05-25 Daniel Marjamäki - - * CheckOther.cpp, CheckOther.h: CheckOther: Added files. This will - contain checks that don't fit in the other checking files. - -2007-05-25 Daniel Marjamäki - - * tokenize.cpp: tokenize: moved 'IsName' to commoncheck. Replace - 'sizeof(type)' with size. - -2007-05-25 Daniel Marjamäki - - * main.cpp: Main: Moved 'IsName' and 'IsNumber' to commoncheck. - Moved remaining checks to checkother and checkbufferoverrun. - -2007-05-25 Daniel Marjamäki - - * Statements.cpp: Statements: Moved 'IsName' from main to - commoncheck - -2007-05-25 Daniel Marjamäki - - * CheckClass.cpp: CheckClass: Moved 'IsName' from main to - commoncheck - -2007-05-25 Daniel Marjamäki - - * CommonCheck.cpp, CommonCheck.h: CommonCheck: Moved 'IsName' and - 'IsNumber' from main.cpp - -2007-05-25 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h: CheckBufferOverrun: - Added 'CheckDangerousFunctions' - -2007-05-24 Daniel Marjamäki - - * CommonCheck.cpp: CommonCheck: Common functions used while checking - for mistakes - -2007-05-24 Daniel Marjamäki - - * CheckMemoryLeak.cpp, CheckMemoryLeak.h: CheckMemoryLeak: Added - files (Check for memory leaks) - -2007-05-24 Daniel Marjamäki - - * CheckHeaders.cpp, CheckHeaders.h: CheckHeaders: Added files (Check - for mistakes in headers or related to headers) - -2007-05-24 Daniel Marjamäki - - * CheckClass.cpp, CheckClass.h, CommonCheck.h, Statements.cpp, - Statements.h, cppcheck.bpr, main.cpp, tokenize.cpp, tokenize.h: - CheckClass; Added files (Check for mistakes related to classes) - -2007-05-24 Daniel Marjamäki - - * CheckBufferOverrun.cpp, CheckBufferOverrun.h: CheckBufferOverrun; - Added files - -2007-05-24 Daniel Marjamäki - - * cppcheck.bpr, main.cpp, tokenize.cpp, tokenize.h: tokenize: Added - files - -2007-05-23 Daniel Marjamäki - - * readme.txt: readme: minor updates - -2007-05-21 Daniel Marjamäki - - * testbufferoverrun5/err.msg, - testbufferoverrun5/testbufferoverrun5.cpp: Tests: Added - 'TestBufferOverrun5' - -2007-05-21 Daniel Marjamäki - - * main.cpp: Replacing constants to make it easier to find bugs. - -2007-05-21 Daniel Marjamäki - - * testbufferoverrun1/err.msg: Test: minor update to - TestBufferOverrun1 - -2007-05-21 Daniel Marjamäki - - * testbufferoverrun2/testbufferoverrun2.cpp: Test: Updated - 'TestBufferOverrun2'. Bufferusage out of bounds. - -2007-05-21 Daniel Marjamäki - - * testbufferoverrun4/err.msg, - testbufferoverrun4/testbufferoverrun4.cpp: Test: Added - 'TestBufferOverrun4' - -2007-05-21 Daniel Marjamäki - - * main.cpp, testclass1/warn.msg, testclass10/warn.msg, - testclass2/warn.msg, testclass4/warn.msg, testclass7/warn.msg, - testclass8/warn.msg, testdelete1/warn.msg, testh1/warn.msg, - testh2/warn.msg, testh5/warn.msg: Testing: Added warning messages. - -2007-05-21 Daniel Marjamäki - - * main.cpp: CheckBufferOverrun: buffer overrun inside loop. The - tokenizer will convert hexadecimal values to decimal values, which - simplifies the checking. - -2007-05-21 Daniel Marjamäki - - * testbufferoverrun1/testbufferoverrun1.cpp, - testbufferoverrun2/err.msg, - testbufferoverrun2/testbufferoverrun2.cpp, - testbufferoverrun3/err.msg, - testbufferoverrun3/testbufferoverrun3.cpp: Test: Buffer overrun - -2007-05-20 Daniel Marjamäki - - * testbufferoverrun1/err.msg, - testbufferoverrun1/testbufferoverrun1.cpp: Test: Added - 'TestBufferOverrun1' - -2007-05-20 Daniel Marjamäki - - * main.cpp: CheckBufferOverrun: Array index out of bounds. - -2007-05-20 Daniel Marjamäki - - * main.cpp, testdangerousfunc1/err.msg, - testdangerousfunc1/testdangerousfunc1.cpp: Buffer Overrun: Using - dangerous functions - -2007-05-20 Daniel Marjamäki - - * main.cpp: Building statement list: SWITCH - BREAK - -2007-05-20 Daniel Marjamäki - - * testmemcheck4/err.msg, testmemcheck4/testmemcheck4.cpp, - testmemcheck5/err.msg, testmemcheck5/testmemcheck5.cpp: Test: - Updated 'testmemcheck4' and 'testmemcheck5' (continue/break) - -2007-05-20 Daniel Marjamäki - - * main.cpp: CheckMemoryLeak: Handling continue/break - -2007-05-20 Daniel Marjamäki - - * main.cpp: WarningIf: Bug fix - -2007-05-19 Daniel Marjamäki - - * internaltesting/testloop.out: Test: Updated "testloop" - -2007-05-19 Daniel Marjamäki - - * main.cpp: Build Statement List: LOOP, ENDLOOP - -2007-05-19 Daniel Marjamäki - - * : 60 1 main.cpp - -2007-05-19 Daniel Marjamäki - - * main.cpp: CheckMemleak: Don't handle conditional allocation at the - moment. - -2007-05-19 Daniel Marjamäki - - * testmemcheck4/err.msg, testmemcheck4/testmemcheck4.err: Test: File - with wrong name was renamed - -2007-05-19 Daniel Marjamäki - - * testmemcheck4/out.err, testmemcheck4/testmemcheck4.err: Test: File - with wrong name was renamed - -2007-05-19 Daniel Marjamäki - - * internaltesting/testif.out, internaltesting/testloop.out: Tests: - Updated the internaltesting tests "testif" and "testloop" - -2007-05-19 Daniel Marjamäki - - * main.cpp: Build Statement List: ENDIF - -2007-05-19 Daniel Marjamäki - - * main.cpp, testmemcheck4/out.err, testmemcheck4/testmemcheck4.cpp: - Tests: Added "testmemcheck4", memory leak from a strdup - -2007-05-19 Daniel Marjamäki - - * main.cpp: Building Statement List: MALLOC. Bug fix (strdup is a - malloc) - -2007-05-19 Daniel Marjamäki - - * internaltesting.bat, internaltesting/testloop.cpp, - internaltesting/testloop.out, main.cpp: Building Statement List: - CONTINUE, BREAK - -2007-05-18 Daniel Marjamäki - - * internaltesting.bat, internaltesting/testif.cpp, - internaltesting/testif.out, main.cpp: internaltesting: IF - -2007-05-18 Daniel Marjamäki - - * teststdfunc1/err.msg, teststdfunc1/warn.msg: Tests: Modified the - test 'teststdfunc1'. Warnings has been deactivated. - -2007-05-18 Daniel Marjamäki - - * teststdfunc1/err.msg, teststdfunc1/teststdfunc1.cpp, - warnstdfunc1/err.msg, warnstdfunc1/teststdfunc1.cpp: Tests: Renamed - 'warnstdfunc1' to 'teststdfunc1' - -2007-05-18 Daniel Marjamäki - - * testclass12/err.msg, testclass12/testclass12.cpp, - testclass12/warn.msg, warnclass12/err.msg, - warnclass12/testclass12.cpp: Testing: Renamed 'warnclass12' to - 'testclass12' - -2007-05-18 Daniel Marjamäki - - * main.cpp: * Building Statement list: MALLOC, FREE * Deactivated some warnings to make the output more interesting - -2007-05-18 Daniel Marjamäki - - * testclass12/err.msg, testclass12/testclass12.cpp, - teststdfunc1/err.msg, teststdfunc1/teststdfunc1.cpp, - warnclass12/err.msg, warnclass12/testclass12.cpp, - warnstdfunc1/err.msg, warnstdfunc1/teststdfunc1.cpp: Testing: - Deactivating some warnings - -2007-05-18 Daniel Marjamäki - - * main.cpp: Building Statement List: IF, ELSE, ELSEIF - -2007-05-18 Daniel Marjamäki - - * testmemcheck3/err.msg, testmemcheck3/testmemcheck3.cpp: Testing: - memcheck3 - new and delete (no error) - -2007-05-17 Daniel Marjamäki - - * internaltesting/testdecl.cpp, internaltesting/testdecl.out: - Testing: "return" and "delete" are not variable declarations - -2007-05-17 Daniel Marjamäki - - * testmemcheck2/err.msg, testmemcheck2/testmemcheck2.cpp: Added test - for memory checking - -2007-05-17 Daniel Marjamäki - - * main.cpp: Improving the accuracy of the memory leaks detecting - -2007-05-16 Daniel Marjamäki - - * testmemcheck1/err.msg: Test: updated the error message output by - memcheck1 - -2007-05-16 Daniel Marjamäki - - * internaltesting/testassign.out, internaltesting/testdecl.out, - internaltesting/testnew.out, internaltesting/testuse.out: Test: - Internal testing, updated the messages - -2007-05-16 Daniel Marjamäki - - * main.cpp: Bug fixing - -2007-05-16 Daniel Marjamäki - - * main.cpp: Checking for memory leaks.. only active in debug mode - since it's so inaccurate - -2007-05-16 Daniel Marjamäki - - * main.cpp: Building statement list; USE - -2007-05-16 Daniel Marjamäki - - * internaltesting.bat, internaltesting/testuse.cpp, - internaltesting/testuse.out: Test: Internal testing, added "testuse" - -2007-05-15 Daniel Marjamäki - - * readme.txt: readme: minor update - -2007-05-15 Daniel Marjamäki - - * main.cpp: Check for memory leaks - -2007-05-15 Daniel Marjamäki - - * testmemcheck1/err.msg, testmemcheck1/testmemcheck1.cpp: Test: - Added "TestMemCheck1" -> mismatching allocation and deallocation - -2007-05-15 Daniel Marjamäki - - * main.cpp: Test: Added command line option "--debug" that is used - by the tests "internaltesting" - -2007-05-15 Daniel Marjamäki - - * internaltesting.bat, internaltesting/testassign.cpp, - internaltesting/testassign.out, internaltesting/testdecl.cpp, - internaltesting/testdecl.out, internaltesting/testnew.cpp, - internaltesting/testnew.out: Test: Internal testing - -2007-05-15 Daniel Marjamäki - - * main.cpp: Building statement list; bug fixes - -2007-05-15 Daniel Marjamäki - - * Makefile: Updated the Makefile. The name of this project has - changed from 'codecheck' to 'cppcheck' - -2007-05-14 Daniel Marjamäki - - * main.cpp: Building statement list; NEW, NEWARRAY, DELETE, - DELETEARRAY - -2007-05-14 Daniel Marjamäki - - * main.cpp: Building statement list; OBRACE, EBRACE, DECL - -2007-05-11 Daniel Marjamäki - - * main.cpp: Class (unused private functions): Reactivated and - improved this check - -2007-05-10 Daniel Marjamäki - - * main.cpp: Minor updates. Make sure there is no doublechecking. - Don't perform certain checks upon c-files. - -2007-05-10 Daniel Marjamäki - - * checknpp.bat: Updated script that checks notepad++ - -2007-05-09 Daniel Marjamäki - - * testdelete1/err.msg, testh1/err.msg: updated error reports for - test cases - -2007-05-09 Daniel Marjamäki - - * main.cpp: Check 'operator=()' - -2007-05-09 Daniel Marjamäki - - * testclass12/err.msg, testclass12/testclass12.cpp: Added testcase: - bad 'operator=()' - -2007-05-09 Daniel Marjamäki - - * readme.txt: Added readme.txt - -2007-05-09 Daniel Marjamäki - - * main.cpp: Minor updates: * Refactoring. * don't warn for 'memset(this,..' - -2007-05-08 Daniel Marjamäki - - * checknpp.bat: Added script that checks the notepad++ source code - -2007-05-08 Daniel Marjamäki - - * main.cpp: Updated warning message. Shorter and simpler - -2007-05-08 Daniel Marjamäki - - * main.cpp: Inactivated tests that are not accurate - -2007-05-08 Daniel Marjamäki - - * testh1/err.msg, testh2/err.msg: Updated test cases - -2007-05-08 Daniel Marjamäki - - * testclass5/err.msg, testclass5/testclass5.cpp, - testclass6/err.msg, testclass6/testclass6.cpp, - testclass6/testclass6.h, testclass9/err.msg, - testclass9/testclass9.cpp: Removed test cases that are not currently - wanted. - -2007-05-08 Daniel Marjamäki - - * checkcode.bpf, checkcode.bpr, cppcheck.bpf, cppcheck.bpr: Files - needed to build with Borland C++ Builder - -2007-05-08 Daniel Marjamäki - - * runall.bat: Removed testing batch file. Must work on this. - -2007-05-08 Daniel Marjamäki - - * checkcode.bpf, checkcode.bpr: Added Borland C++ Builder project - files - -2007-05-07 Daniel Marjamäki - - * Added files from local repository. - diff --git a/Cppcheck.xcodeproj/project.pbxproj b/Cppcheck.xcodeproj/project.pbxproj deleted file mode 100644 index 07756172c89..00000000000 --- a/Cppcheck.xcodeproj/project.pbxproj +++ /dev/null @@ -1,378 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 39E60EB91270DE3A00AC0D02 /* checkautovariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60E8D1270DE3A00AC0D02 /* checkautovariables.cpp */; }; - 39E60EBA1270DE3A00AC0D02 /* checkbufferoverrun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60E8F1270DE3A00AC0D02 /* checkbufferoverrun.cpp */; }; - 39E60EBB1270DE3A00AC0D02 /* checkclass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60E911270DE3A00AC0D02 /* checkclass.cpp */; }; - 39E60EBC1270DE3A00AC0D02 /* checkexceptionsafety.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60E931270DE3A00AC0D02 /* checkexceptionsafety.cpp */; }; - 39E60EBD1270DE3A00AC0D02 /* checkmemoryleak.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60E951270DE3A00AC0D02 /* checkmemoryleak.cpp */; }; - 39E60EBE1270DE3A00AC0D02 /* checkobsoletefunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60E971270DE3A00AC0D02 /* checkobsoletefunctions.cpp */; }; - 39E60EBF1270DE3A00AC0D02 /* checkother.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60E991270DE3A00AC0D02 /* checkother.cpp */; }; - 39E60EC01270DE3A00AC0D02 /* checkpostfixoperator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60E9B1270DE3A00AC0D02 /* checkpostfixoperator.cpp */; }; - 39E60EC11270DE3A00AC0D02 /* checkstl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60E9D1270DE3A00AC0D02 /* checkstl.cpp */; }; - 39E60EC21270DE3A00AC0D02 /* checkunusedfunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60E9F1270DE3A00AC0D02 /* checkunusedfunctions.cpp */; }; - 39E60EC31270DE3A00AC0D02 /* cppcheck.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60EA11270DE3A00AC0D02 /* cppcheck.cpp */; }; - 39E60EC41270DE3A00AC0D02 /* errorlogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60EA31270DE3A00AC0D02 /* errorlogger.cpp */; }; - 39E60EC51270DE3A00AC0D02 /* executionpath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60EA51270DE3A00AC0D02 /* executionpath.cpp */; }; - 39E60EC61270DE3A00AC0D02 /* filelister_unix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60EA71270DE3A00AC0D02 /* filelister_unix.cpp */; }; - 39E60EC71270DE3A00AC0D02 /* filelister.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60EA91270DE3A00AC0D02 /* filelister.cpp */; }; - 39E60EC81270DE3A00AC0D02 /* mathlib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60EAB1270DE3A00AC0D02 /* mathlib.cpp */; }; - 39E60EC91270DE3A00AC0D02 /* path.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60EAD1270DE3A00AC0D02 /* path.cpp */; }; - 39E60ECA1270DE3A00AC0D02 /* preprocessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60EAF1270DE3A00AC0D02 /* preprocessor.cpp */; }; - 39E60ECB1270DE3A00AC0D02 /* settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60EB11270DE3A00AC0D02 /* settings.cpp */; }; - 39E60ECC1270DE3A00AC0D02 /* timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60EB31270DE3A00AC0D02 /* timer.cpp */; }; - 39E60ECD1270DE3A00AC0D02 /* token.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60EB51270DE3A00AC0D02 /* token.cpp */; }; - 39E60ECE1270DE3A00AC0D02 /* tokenize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60EB71270DE3A00AC0D02 /* tokenize.cpp */; }; - 39E60ED61270DE5000AC0D02 /* cmdlineparser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60ECF1270DE5000AC0D02 /* cmdlineparser.cpp */; }; - 39E60ED71270DE5000AC0D02 /* cppcheckexecutor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60ED11270DE5000AC0D02 /* cppcheckexecutor.cpp */; }; - 39E60ED81270DE5000AC0D02 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60ED31270DE5000AC0D02 /* main.cpp */; }; - 39E60ED91270DE5000AC0D02 /* threadexecutor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39E60ED41270DE5000AC0D02 /* threadexecutor.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 8DD76F690486A84900D96B5E /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 39E60E8C1270DE3A00AC0D02 /* check.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = check.h; path = lib/check.h; sourceTree = ""; }; - 39E60E8D1270DE3A00AC0D02 /* checkautovariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = checkautovariables.cpp; path = lib/checkautovariables.cpp; sourceTree = ""; }; - 39E60E8E1270DE3A00AC0D02 /* checkautovariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = checkautovariables.h; path = lib/checkautovariables.h; sourceTree = ""; }; - 39E60E8F1270DE3A00AC0D02 /* checkbufferoverrun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = checkbufferoverrun.cpp; path = lib/checkbufferoverrun.cpp; sourceTree = ""; }; - 39E60E901270DE3A00AC0D02 /* checkbufferoverrun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = checkbufferoverrun.h; path = lib/checkbufferoverrun.h; sourceTree = ""; }; - 39E60E911270DE3A00AC0D02 /* checkclass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = checkclass.cpp; path = lib/checkclass.cpp; sourceTree = ""; }; - 39E60E921270DE3A00AC0D02 /* checkclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = checkclass.h; path = lib/checkclass.h; sourceTree = ""; }; - 39E60E931270DE3A00AC0D02 /* checkexceptionsafety.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = checkexceptionsafety.cpp; path = lib/checkexceptionsafety.cpp; sourceTree = ""; }; - 39E60E941270DE3A00AC0D02 /* checkexceptionsafety.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = checkexceptionsafety.h; path = lib/checkexceptionsafety.h; sourceTree = ""; }; - 39E60E951270DE3A00AC0D02 /* checkmemoryleak.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = checkmemoryleak.cpp; path = lib/checkmemoryleak.cpp; sourceTree = ""; }; - 39E60E961270DE3A00AC0D02 /* checkmemoryleak.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = checkmemoryleak.h; path = lib/checkmemoryleak.h; sourceTree = ""; }; - 39E60E971270DE3A00AC0D02 /* checkobsoletefunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = checkobsoletefunctions.cpp; path = lib/checkobsoletefunctions.cpp; sourceTree = ""; }; - 39E60E981270DE3A00AC0D02 /* checkobsoletefunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = checkobsoletefunctions.h; path = lib/checkobsoletefunctions.h; sourceTree = ""; }; - 39E60E991270DE3A00AC0D02 /* checkother.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = checkother.cpp; path = lib/checkother.cpp; sourceTree = ""; }; - 39E60E9A1270DE3A00AC0D02 /* checkother.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = checkother.h; path = lib/checkother.h; sourceTree = ""; }; - 39E60E9B1270DE3A00AC0D02 /* checkpostfixoperator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = checkpostfixoperator.cpp; path = lib/checkpostfixoperator.cpp; sourceTree = ""; }; - 39E60E9C1270DE3A00AC0D02 /* checkpostfixoperator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = checkpostfixoperator.h; path = lib/checkpostfixoperator.h; sourceTree = ""; }; - 39E60E9D1270DE3A00AC0D02 /* checkstl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = checkstl.cpp; path = lib/checkstl.cpp; sourceTree = ""; }; - 39E60E9E1270DE3A00AC0D02 /* checkstl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = checkstl.h; path = lib/checkstl.h; sourceTree = ""; }; - 39E60E9F1270DE3A00AC0D02 /* checkunusedfunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = checkunusedfunctions.cpp; path = lib/checkunusedfunctions.cpp; sourceTree = ""; }; - 39E60EA01270DE3A00AC0D02 /* checkunusedfunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = checkunusedfunctions.h; path = lib/checkunusedfunctions.h; sourceTree = ""; }; - 39E60EA11270DE3A00AC0D02 /* cppcheck.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cppcheck.cpp; path = lib/cppcheck.cpp; sourceTree = ""; }; - 39E60EA21270DE3A00AC0D02 /* cppcheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cppcheck.h; path = lib/cppcheck.h; sourceTree = ""; }; - 39E60EA31270DE3A00AC0D02 /* errorlogger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = errorlogger.cpp; path = lib/errorlogger.cpp; sourceTree = ""; }; - 39E60EA41270DE3A00AC0D02 /* errorlogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = errorlogger.h; path = lib/errorlogger.h; sourceTree = ""; }; - 39E60EA51270DE3A00AC0D02 /* executionpath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = executionpath.cpp; path = lib/executionpath.cpp; sourceTree = ""; }; - 39E60EA61270DE3A00AC0D02 /* executionpath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = executionpath.h; path = lib/executionpath.h; sourceTree = ""; }; - 39E60EA71270DE3A00AC0D02 /* filelister_unix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = filelister_unix.cpp; path = lib/filelister_unix.cpp; sourceTree = ""; }; - 39E60EA81270DE3A00AC0D02 /* filelister_unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = filelister_unix.h; path = lib/filelister_unix.h; sourceTree = ""; }; - 39E60EA91270DE3A00AC0D02 /* filelister.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = filelister.cpp; path = lib/filelister.cpp; sourceTree = ""; }; - 39E60EAA1270DE3A00AC0D02 /* filelister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = filelister.h; path = lib/filelister.h; sourceTree = ""; }; - 39E60EAB1270DE3A00AC0D02 /* mathlib.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mathlib.cpp; path = lib/mathlib.cpp; sourceTree = ""; }; - 39E60EAC1270DE3A00AC0D02 /* mathlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mathlib.h; path = lib/mathlib.h; sourceTree = ""; }; - 39E60EAD1270DE3A00AC0D02 /* path.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = path.cpp; path = lib/path.cpp; sourceTree = ""; }; - 39E60EAE1270DE3A00AC0D02 /* path.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = path.h; path = lib/path.h; sourceTree = ""; }; - 39E60EAF1270DE3A00AC0D02 /* preprocessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = preprocessor.cpp; path = lib/preprocessor.cpp; sourceTree = ""; }; - 39E60EB01270DE3A00AC0D02 /* preprocessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = preprocessor.h; path = lib/preprocessor.h; sourceTree = ""; }; - 39E60EB11270DE3A00AC0D02 /* settings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = settings.cpp; path = lib/settings.cpp; sourceTree = ""; }; - 39E60EB21270DE3A00AC0D02 /* settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = settings.h; path = lib/settings.h; sourceTree = ""; }; - 39E60EB31270DE3A00AC0D02 /* timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = timer.cpp; path = lib/timer.cpp; sourceTree = ""; }; - 39E60EB41270DE3A00AC0D02 /* timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = timer.h; path = lib/timer.h; sourceTree = ""; }; - 39E60EB51270DE3A00AC0D02 /* token.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = token.cpp; path = lib/token.cpp; sourceTree = ""; }; - 39E60EB61270DE3A00AC0D02 /* token.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = token.h; path = lib/token.h; sourceTree = ""; }; - 39E60EB71270DE3A00AC0D02 /* tokenize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = tokenize.cpp; path = lib/tokenize.cpp; sourceTree = ""; }; - 39E60EB81270DE3A00AC0D02 /* tokenize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tokenize.h; path = lib/tokenize.h; sourceTree = ""; }; - 39E60ECF1270DE5000AC0D02 /* cmdlineparser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cmdlineparser.cpp; path = cli/cmdlineparser.cpp; sourceTree = ""; }; - 39E60ED01270DE5000AC0D02 /* cmdlineparser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cmdlineparser.h; path = cli/cmdlineparser.h; sourceTree = ""; }; - 39E60ED11270DE5000AC0D02 /* cppcheckexecutor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = cppcheckexecutor.cpp; path = cli/cppcheckexecutor.cpp; sourceTree = ""; }; - 39E60ED21270DE5000AC0D02 /* cppcheckexecutor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cppcheckexecutor.h; path = cli/cppcheckexecutor.h; sourceTree = ""; }; - 39E60ED31270DE5000AC0D02 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = cli/main.cpp; sourceTree = ""; }; - 39E60ED41270DE5000AC0D02 /* threadexecutor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = threadexecutor.cpp; path = cli/threadexecutor.cpp; sourceTree = ""; }; - 39E60ED51270DE5000AC0D02 /* threadexecutor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = threadexecutor.h; path = cli/threadexecutor.h; sourceTree = ""; }; - 39E60EDE1270DEB100AC0D02 /* cppcheck */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = cppcheck; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8DD76F660486A84900D96B5E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* cppcheck */ = { - isa = PBXGroup; - children = ( - 08FB7795FE84155DC02AAC07 /* Source */, - C6859E8C029090F304C91782 /* Documentation */, - 1AB674ADFE9D54B511CA2CBB /* Products */, - ); - name = cppcheck; - sourceTree = ""; - }; - 08FB7795FE84155DC02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 2C21A45D1178BB0B00D35009 /* Library */, - 2C21A45C1178BB0400D35009 /* Command */, - ); - name = Source; - sourceTree = ""; - }; - 1AB674ADFE9D54B511CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 39E60EDE1270DEB100AC0D02 /* cppcheck */, - ); - name = Products; - sourceTree = ""; - }; - 2C21A45C1178BB0400D35009 /* Command */ = { - isa = PBXGroup; - children = ( - 39E60ECF1270DE5000AC0D02 /* cmdlineparser.cpp */, - 39E60ED01270DE5000AC0D02 /* cmdlineparser.h */, - 39E60ED11270DE5000AC0D02 /* cppcheckexecutor.cpp */, - 39E60ED21270DE5000AC0D02 /* cppcheckexecutor.h */, - 39E60ED31270DE5000AC0D02 /* main.cpp */, - 39E60ED41270DE5000AC0D02 /* threadexecutor.cpp */, - 39E60ED51270DE5000AC0D02 /* threadexecutor.h */, - ); - name = Command; - sourceTree = ""; - }; - 2C21A45D1178BB0B00D35009 /* Library */ = { - isa = PBXGroup; - children = ( - 39E60E8C1270DE3A00AC0D02 /* check.h */, - 39E60E8D1270DE3A00AC0D02 /* checkautovariables.cpp */, - 39E60E8E1270DE3A00AC0D02 /* checkautovariables.h */, - 39E60E8F1270DE3A00AC0D02 /* checkbufferoverrun.cpp */, - 39E60E901270DE3A00AC0D02 /* checkbufferoverrun.h */, - 39E60E911270DE3A00AC0D02 /* checkclass.cpp */, - 39E60E921270DE3A00AC0D02 /* checkclass.h */, - 39E60E931270DE3A00AC0D02 /* checkexceptionsafety.cpp */, - 39E60E941270DE3A00AC0D02 /* checkexceptionsafety.h */, - 39E60E951270DE3A00AC0D02 /* checkmemoryleak.cpp */, - 39E60E961270DE3A00AC0D02 /* checkmemoryleak.h */, - 39E60E971270DE3A00AC0D02 /* checkobsoletefunctions.cpp */, - 39E60E981270DE3A00AC0D02 /* checkobsoletefunctions.h */, - 39E60E991270DE3A00AC0D02 /* checkother.cpp */, - 39E60E9A1270DE3A00AC0D02 /* checkother.h */, - 39E60E9B1270DE3A00AC0D02 /* checkpostfixoperator.cpp */, - 39E60E9C1270DE3A00AC0D02 /* checkpostfixoperator.h */, - 39E60E9D1270DE3A00AC0D02 /* checkstl.cpp */, - 39E60E9E1270DE3A00AC0D02 /* checkstl.h */, - 39E60E9F1270DE3A00AC0D02 /* checkunusedfunctions.cpp */, - 39E60EA01270DE3A00AC0D02 /* checkunusedfunctions.h */, - 39E60EA11270DE3A00AC0D02 /* cppcheck.cpp */, - 39E60EA21270DE3A00AC0D02 /* cppcheck.h */, - 39E60EA31270DE3A00AC0D02 /* errorlogger.cpp */, - 39E60EA41270DE3A00AC0D02 /* errorlogger.h */, - 39E60EA51270DE3A00AC0D02 /* executionpath.cpp */, - 39E60EA61270DE3A00AC0D02 /* executionpath.h */, - 39E60EA71270DE3A00AC0D02 /* filelister_unix.cpp */, - 39E60EA81270DE3A00AC0D02 /* filelister_unix.h */, - 39E60EA91270DE3A00AC0D02 /* filelister.cpp */, - 39E60EAA1270DE3A00AC0D02 /* filelister.h */, - 39E60EAB1270DE3A00AC0D02 /* mathlib.cpp */, - 39E60EAC1270DE3A00AC0D02 /* mathlib.h */, - 39E60EAD1270DE3A00AC0D02 /* path.cpp */, - 39E60EAE1270DE3A00AC0D02 /* path.h */, - 39E60EAF1270DE3A00AC0D02 /* preprocessor.cpp */, - 39E60EB01270DE3A00AC0D02 /* preprocessor.h */, - 39E60EB11270DE3A00AC0D02 /* settings.cpp */, - 39E60EB21270DE3A00AC0D02 /* settings.h */, - 39E60EB31270DE3A00AC0D02 /* timer.cpp */, - 39E60EB41270DE3A00AC0D02 /* timer.h */, - 39E60EB51270DE3A00AC0D02 /* token.cpp */, - 39E60EB61270DE3A00AC0D02 /* token.h */, - 39E60EB71270DE3A00AC0D02 /* tokenize.cpp */, - 39E60EB81270DE3A00AC0D02 /* tokenize.h */, - ); - name = Library; - sourceTree = ""; - }; - C6859E8C029090F304C91782 /* Documentation */ = { - isa = PBXGroup; - children = ( - ); - name = Documentation; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8DD76F620486A84900D96B5E /* cppcheck */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "cppcheck" */; - buildPhases = ( - 8DD76F640486A84900D96B5E /* Sources */, - 8DD76F660486A84900D96B5E /* Frameworks */, - 8DD76F690486A84900D96B5E /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = cppcheck; - productInstallPath = "$(HOME)/bin"; - productName = cppcheck; - productReference = 39E60EDE1270DEB100AC0D02 /* cppcheck */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Cppcheck" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 08FB7794FE84155DC02AAC07 /* cppcheck */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 8DD76F620486A84900D96B5E /* cppcheck */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 8DD76F640486A84900D96B5E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 39E60EB91270DE3A00AC0D02 /* checkautovariables.cpp in Sources */, - 39E60EBA1270DE3A00AC0D02 /* checkbufferoverrun.cpp in Sources */, - 39E60EBB1270DE3A00AC0D02 /* checkclass.cpp in Sources */, - 39E60EBC1270DE3A00AC0D02 /* checkexceptionsafety.cpp in Sources */, - 39E60EBD1270DE3A00AC0D02 /* checkmemoryleak.cpp in Sources */, - 39E60EBE1270DE3A00AC0D02 /* checkobsoletefunctions.cpp in Sources */, - 39E60EBF1270DE3A00AC0D02 /* checkother.cpp in Sources */, - 39E60EC01270DE3A00AC0D02 /* checkpostfixoperator.cpp in Sources */, - 39E60EC11270DE3A00AC0D02 /* checkstl.cpp in Sources */, - 39E60EC21270DE3A00AC0D02 /* checkunusedfunctions.cpp in Sources */, - 39E60EC31270DE3A00AC0D02 /* cppcheck.cpp in Sources */, - 39E60EC41270DE3A00AC0D02 /* errorlogger.cpp in Sources */, - 39E60EC51270DE3A00AC0D02 /* executionpath.cpp in Sources */, - 39E60EC61270DE3A00AC0D02 /* filelister_unix.cpp in Sources */, - 39E60EC71270DE3A00AC0D02 /* filelister.cpp in Sources */, - 39E60EC81270DE3A00AC0D02 /* mathlib.cpp in Sources */, - 39E60EC91270DE3A00AC0D02 /* path.cpp in Sources */, - 39E60ECA1270DE3A00AC0D02 /* preprocessor.cpp in Sources */, - 39E60ECB1270DE3A00AC0D02 /* settings.cpp in Sources */, - 39E60ECC1270DE3A00AC0D02 /* timer.cpp in Sources */, - 39E60ECD1270DE3A00AC0D02 /* token.cpp in Sources */, - 39E60ECE1270DE3A00AC0D02 /* tokenize.cpp in Sources */, - 39E60ED61270DE5000AC0D02 /* cmdlineparser.cpp in Sources */, - 39E60ED71270DE5000AC0D02 /* cppcheckexecutor.cpp in Sources */, - 39E60ED81270DE5000AC0D02 /* main.cpp in Sources */, - 39E60ED91270DE5000AC0D02 /* threadexecutor.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1DEB923208733DC60010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_MODEL_TUNING = ""; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ""; - GCC_VERSION = ""; - INSTALL_PATH = /usr/local/bin; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = cppcheck; - }; - name = Debug; - }; - 1DEB923308733DC60010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - GCC_MODEL_TUNING = ""; - INSTALL_PATH = /usr/local/bin; - PRODUCT_NAME = cppcheck; - }; - name = Release; - }; - 1DEB923608733DC60010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_VERSION = 4.0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx10.6; - }; - name = Debug; - }; - 1DEB923708733DC60010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - PREBINDING = NO; - SDKROOT = macosx10.6; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "cppcheck" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB923208733DC60010E9CD /* Debug */, - 1DEB923308733DC60010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "Cppcheck" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB923608733DC60010E9CD /* Debug */, - 1DEB923708733DC60010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/Makefile b/Makefile index 7954368a61c..5a348e27001 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,104 @@ -# This file is generated by tools/dmake, do not edit. +# This file is generated by dmake, do not edit. +ifndef VERBOSE + VERBOSE= +endif # To compile with rules, use 'make HAVE_RULES=yes' ifndef HAVE_RULES - HAVE_RULES=no + HAVE_RULES= +endif + +ifndef MATCHCOMPILER + MATCHCOMPILER= +endif +# use match compiler +ifeq ($(MATCHCOMPILER),yes) + # Find available Python interpreter + ifeq ($(PYTHON_INTERPRETER),) + PYTHON_INTERPRETER := $(shell which python3) + endif + ifeq ($(PYTHON_INTERPRETER),) + PYTHON_INTERPRETER := $(shell which python) + endif + ifeq ($(PYTHON_INTERPRETER),) + $(error Did not find a Python interpreter) + endif + ifdef VERIFY + matchcompiler_S := $(shell $(PYTHON_INTERPRETER) tools/matchcompiler.py --verify) + else + matchcompiler_S := $(shell $(PYTHON_INTERPRETER) tools/matchcompiler.py) + endif + libcppdir:=build +else ifeq ($(MATCHCOMPILER),) + libcppdir:=lib +else + $(error invalid MATCHCOMPILER value '$(MATCHCOMPILER)') endif +ifndef CPPFLAGS + CPPFLAGS= +endif + +ifdef FILESDIR + override CPPFLAGS+=-DFILESDIR=\"$(FILESDIR)\" +endif + +RDYNAMIC?=-rdynamic +# Set the CPPCHK_GLIBCXX_DEBUG flag. This flag is not used in release Makefiles. +# The _GLIBCXX_DEBUG define doesn't work in Cygwin or other Win32 systems. ifndef COMSPEC + ifeq ($(VERBOSE),1) + $(info COMSPEC not found) + endif ifdef ComSpec + ifeq ($(VERBOSE),1) + $(info ComSpec found) + endif #### ComSpec is defined on some WIN32's. - COMSPEC=$(ComSpec) + WINNT=1 + + ifeq ($(VERBOSE),1) + $(info PATH=$(PATH)) + endif + + ifneq (,$(findstring /cygdrive/,$(PATH))) + ifeq ($(VERBOSE),1) + $(info /cygdrive/ found in PATH) + endif + CYGWIN=1 + endif # CYGWIN endif # ComSpec endif # COMSPEC -ifdef COMSPEC +ifdef WINNT + ifeq ($(VERBOSE),1) + $(info WINNT found) + endif #### Maybe Windows ifndef CPPCHK_GLIBCXX_DEBUG CPPCHK_GLIBCXX_DEBUG= endif # !CPPCHK_GLIBCXX_DEBUG -else # !COMSPEC + + ifeq ($(VERBOSE),1) + $(info MSYSTEM=$(MSYSTEM)) + endif + + ifneq ($(MSYSTEM),MINGW32 MINGW64) + RDYNAMIC= + endif + + LDFLAGS+=-lshlwapi +else # !WINNT + ifeq ($(VERBOSE),1) + $(info WINNT not found) + endif + uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') + ifeq ($(VERBOSE),1) + $(info uname_S=$(uname_S)) + endif + ifeq ($(uname_S),Linux) ifndef CPPCHK_GLIBCXX_DEBUG CPPCHK_GLIBCXX_DEBUG=-D_GLIBCXX_DEBUG @@ -32,163 +111,295 @@ else # !COMSPEC endif # !CPPCHK_GLIBCXX_DEBUG endif # GNU/kFreeBSD -endif # COMSPEC + LDFLAGS+=-pthread + +endif # WINNT +ifdef CYGWIN + ifeq ($(VERBOSE),1) + $(info CYGWIN found) + endif + + # Increase stack size for Cygwin builds to avoid segmentation fault in limited recursive tests. + CXXFLAGS+=-Wl,--stack,8388608 +endif # CYGWIN + +ifndef CXX + CXX=g++ +endif + +ifeq (clang++, $(findstring clang++,$(CXX))) + CPPCHK_GLIBCXX_DEBUG= +endif ifndef CXXFLAGS - CXXFLAGS=-pedantic -Wall -Wextra -Wabi -Wcast-qual -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Woverloaded-virtual -Wpacked -Wredundant-decls -Wshadow -Wsign-promo $(CPPCHK_GLIBCXX_DEBUG) -g + CXXFLAGS=-pedantic -Wall -Wextra -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-sign-compare -Wno-multichar -Woverloaded-virtual -g endif +ifeq (g++, $(findstring g++,$(CXX))) + override CXXFLAGS += -pipe +endif +override CXXFLAGS += -std=c++11 ifeq ($(HAVE_RULES),yes) - CXXFLAGS += -DHAVE_RULES $(shell pcre-config --cflags) + PCRE_CONFIG = $(shell which pcre-config) + ifeq ($(PCRE_CONFIG),) + $(error Did not find pcre-config) + endif + override CXXFLAGS += $(shell $(PCRE_CONFIG) --cflags) + override CPPFLAGS += -DHAVE_RULES ifdef LIBS - LIBS += $(shell pcre-config --libs) + LIBS += $(shell $(PCRE_CONFIG) --libs) else - LIBS=$(shell pcre-config --libs) + LIBS=$(shell $(PCRE_CONFIG) --libs) endif +else ifneq ($(HAVE_RULES),) + $(error invalid HAVE_RULES value '$(HAVE_RULES)') endif -ifndef CXX - CXX=g++ +# older make versions do not support # in $(shell) and newer ones handle the escape sequence literally +REQUIRE_ESCAPE=$(shell echo "\#define DEF" | $(CXX) -c -xc - 2> /dev/null && echo "1" || echo "0") +ifeq ($(REQUIRE_ESCAPE),1) + HAVE_EXECINFO_H=$(shell echo "\#include " | $(CXX) -c -xc - 2> /dev/null && echo "1" || echo "0") +else + HAVE_EXECINFO_H=$(shell echo "#include " | $(CXX) -c -xc - 2> /dev/null && echo "1" || echo "0") endif +override CPPFLAGS += -DHAVE_EXECINFO_H=$(HAVE_EXECINFO_H) + +override CXXFLAGS += $(CXXOPTS) +override CPPFLAGS += $(CPPOPTS) +override LDFLAGS += $(LDOPTS) ifndef PREFIX PREFIX=/usr endif ifndef INCLUDE_FOR_LIB - INCLUDE_FOR_LIB=-Ilib + INCLUDE_FOR_LIB=-Ilib -isystem externals -isystem externals/picojson -isystem externals/simplecpp -isystem externals/tinyxml2 +endif + +ifndef INCLUDE_FOR_FE + INCLUDE_FOR_FE=-Ilib endif ifndef INCLUDE_FOR_CLI - INCLUDE_FOR_CLI=-Ilib -Iexternals -Iexternals/tinyxml + INCLUDE_FOR_CLI=-Ilib -Ifrontend -isystem externals/picojson -isystem externals/simplecpp -isystem externals/tinyxml2 endif ifndef INCLUDE_FOR_TEST - INCLUDE_FOR_TEST=-Ilib -Icli -Iexternals -Iexternals/tinyxml + INCLUDE_FOR_TEST=-Ilib -Ifrontend -Icli -isystem externals/picojson -isystem externals/simplecpp -isystem externals/tinyxml2 +endif + +ifndef CFLAGS_FOR_TEST + CFLAGS_FOR_TEST=-Wno-dollar-in-identifier-extension endif BIN=$(DESTDIR)$(PREFIX)/bin # For 'make man': sudo apt-get install xsltproc docbook-xsl docbook-xml on Linux -DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl +DB2MAN?=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl XP=xsltproc -''-nonet -''-param man.charmap.use.subset "0" MAN_SOURCE=man/cppcheck.1.xml ###### Object Files -LIBOBJ = lib/check64bit.o \ - lib/checkassignif.o \ - lib/checkautovariables.o \ - lib/checkboost.o \ - lib/checkbufferoverrun.o \ - lib/checkclass.o \ - lib/checkexceptionsafety.o \ - lib/checkinternal.o \ - lib/checkmemoryleak.o \ - lib/checknonreentrantfunctions.o \ - lib/checknullpointer.o \ - lib/checkobsoletefunctions.o \ - lib/checkother.o \ - lib/checkpostfixoperator.o \ - lib/checkstl.o \ - lib/checkuninitvar.o \ - lib/checkunusedfunctions.o \ - lib/checkunusedvar.o \ - lib/cppcheck.o \ - lib/errorlogger.o \ - lib/executionpath.o \ - lib/mathlib.o \ - lib/path.o \ - lib/preprocessor.o \ - lib/settings.o \ - lib/suppressions.o \ - lib/symboldatabase.o \ - lib/templatesimplifier.o \ - lib/timer.o \ - lib/token.o \ - lib/tokenize.o +LIBOBJ = $(libcppdir)/valueflow.o \ + $(libcppdir)/tokenize.o \ + $(libcppdir)/symboldatabase.o \ + $(libcppdir)/addoninfo.o \ + $(libcppdir)/analyzerinfo.o \ + $(libcppdir)/astutils.o \ + $(libcppdir)/check.o \ + $(libcppdir)/check64bit.o \ + $(libcppdir)/checkassert.o \ + $(libcppdir)/checkautovariables.o \ + $(libcppdir)/checkbool.o \ + $(libcppdir)/checkbufferoverrun.o \ + $(libcppdir)/checkclass.o \ + $(libcppdir)/checkcondition.o \ + $(libcppdir)/checkers.o \ + $(libcppdir)/checkersidmapping.o \ + $(libcppdir)/checkersreport.o \ + $(libcppdir)/checkexceptionsafety.o \ + $(libcppdir)/checkfunctions.o \ + $(libcppdir)/checkinternal.o \ + $(libcppdir)/checkio.o \ + $(libcppdir)/checkleakautovar.o \ + $(libcppdir)/checkmemoryleak.o \ + $(libcppdir)/checknullpointer.o \ + $(libcppdir)/checkother.o \ + $(libcppdir)/checkpostfixoperator.o \ + $(libcppdir)/checks.o \ + $(libcppdir)/checksizeof.o \ + $(libcppdir)/checkstl.o \ + $(libcppdir)/checkstring.o \ + $(libcppdir)/checktype.o \ + $(libcppdir)/checkuninitvar.o \ + $(libcppdir)/checkunusedfunctions.o \ + $(libcppdir)/checkunusedvar.o \ + $(libcppdir)/checkvaarg.o \ + $(libcppdir)/clangimport.o \ + $(libcppdir)/color.o \ + $(libcppdir)/cppcheck.o \ + $(libcppdir)/ctu.o \ + $(libcppdir)/errorlogger.o \ + $(libcppdir)/errortypes.o \ + $(libcppdir)/findtoken.o \ + $(libcppdir)/forwardanalyzer.o \ + $(libcppdir)/fwdanalysis.o \ + $(libcppdir)/importproject.o \ + $(libcppdir)/infer.o \ + $(libcppdir)/keywords.o \ + $(libcppdir)/library.o \ + $(libcppdir)/mathlib.o \ + $(libcppdir)/path.o \ + $(libcppdir)/pathanalysis.o \ + $(libcppdir)/pathmatch.o \ + $(libcppdir)/platform.o \ + $(libcppdir)/preprocessor.o \ + $(libcppdir)/programmemory.o \ + $(libcppdir)/regex.o \ + $(libcppdir)/reverseanalyzer.o \ + $(libcppdir)/sarifreport.o \ + $(libcppdir)/settings.o \ + $(libcppdir)/standards.o \ + $(libcppdir)/summaries.o \ + $(libcppdir)/suppressions.o \ + $(libcppdir)/templatesimplifier.o \ + $(libcppdir)/timer.o \ + $(libcppdir)/token.o \ + $(libcppdir)/tokenlist.o \ + $(libcppdir)/utils.o \ + $(libcppdir)/vf_analyzers.o \ + $(libcppdir)/vf_common.o \ + $(libcppdir)/vf_settokenvalue.o \ + $(libcppdir)/vfvalue.o + +EXTOBJ = externals/simplecpp/simplecpp.o \ + externals/tinyxml2/tinyxml2.o + +FEOBJ = frontend/frontend.o CLIOBJ = cli/cmdlineparser.o \ cli/cppcheckexecutor.o \ + cli/executor.o \ cli/filelister.o \ cli/main.o \ - cli/pathmatch.o \ + cli/processexecutor.o \ + cli/sehwrapper.o \ + cli/signalhandler.o \ + cli/singleexecutor.o \ + cli/stacktrace.o \ cli/threadexecutor.o -TESTOBJ = test/options.o \ +TESTOBJ = test/fixture.o \ + test/helpers.o \ + test/main.o \ + test/options.o \ test/test64bit.o \ - test/testassignif.o \ + test/testanalyzerinformation.o \ + test/testassert.o \ + test/testastutils.o \ test/testautovariables.o \ - test/testboost.o \ + test/testbool.o \ test/testbufferoverrun.o \ test/testcharvar.o \ + test/testcheck.o \ + test/testcheckersreport.o \ + test/testclangimport.o \ test/testclass.o \ test/testcmdlineparser.o \ + test/testcolor.o \ + test/testcondition.o \ test/testconstructors.o \ test/testcppcheck.o \ - test/testdivision.o \ test/testerrorlogger.o \ test/testexceptionsafety.o \ + test/testexecutor.o \ test/testfilelister.o \ + test/testfilesettings.o \ + test/testfrontend.o \ + test/testfunctions.o \ + test/testgarbage.o \ + test/testimportproject.o \ test/testincompletestatement.o \ test/testinternal.o \ + test/testio.o \ + test/testleakautovar.o \ + test/testlibrary.o \ test/testmathlib.o \ test/testmemleak.o \ - test/testnonreentrantfunctions.o \ test/testnullpointer.o \ - test/testobsoletefunctions.o \ test/testoptions.o \ test/testother.o \ test/testpath.o \ test/testpathmatch.o \ + test/testplatform.o \ test/testpostfixoperator.o \ test/testpreprocessor.o \ - test/testrunner.o \ + test/testprocessexecutor.o \ + test/testprogrammemory.o \ + test/testregex.o \ + test/testsarifreport.o \ + test/testsettings.o \ + test/testsimplifytemplate.o \ test/testsimplifytokens.o \ + test/testsimplifytypedef.o \ + test/testsimplifyusing.o \ + test/testsingleexecutor.o \ + test/testsizeof.o \ + test/teststandards.o \ test/teststl.o \ - test/testsuite.o \ + test/teststring.o \ + test/testsummaries.o \ test/testsuppressions.o \ test/testsymboldatabase.o \ test/testthreadexecutor.o \ + test/testtimer.o \ test/testtoken.o \ test/testtokenize.o \ + test/testtokenlist.o \ + test/testtokenrange.o \ + test/testtype.o \ test/testuninitvar.o \ test/testunusedfunctions.o \ test/testunusedprivfunc.o \ - test/testunusedvar.o - -ifndef TINYXML - TINYXML = externals/tinyxml/tinystr.o \ - externals/tinyxml/tinyxml.o \ - externals/tinyxml/tinyxmlerror.o \ - externals/tinyxml/tinyxmlparser.o -endif + test/testunusedvar.o \ + test/testutils.o \ + test/testvaarg.o \ + test/testvalueflow.o \ + test/testvarid.o \ + test/testvfvalue.o +.PHONY: run-dmake tags -EXTOBJ += $(TINYXML) ###### Targets -cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ) - $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LIBS) +cppcheck: $(EXTOBJ) $(LIBOBJ) $(FEOBJ) $(CLIOBJ) + $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS) $(RDYNAMIC) all: cppcheck testrunner -testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/filelister.o cli/pathmatch.o - $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) cli/threadexecutor.o cli/cppcheckexecutor.o cli/cmdlineparser.o cli/filelister.o cli/pathmatch.o $(EXTOBJ) $(LIBS) +testrunner: $(EXTOBJ) $(TESTOBJ) $(LIBOBJ) $(FEOBJ) cli/cmdlineparser.o cli/cppcheckexecutor.o cli/executor.o cli/filelister.o cli/processexecutor.o cli/sehwrapper.o cli/signalhandler.o cli/singleexecutor.o cli/stacktrace.o cli/threadexecutor.o + $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS) $(LDFLAGS) $(RDYNAMIC) test: all ./testrunner check: all - ./testrunner -g -q + ./testrunner -q + +checkcfg: cppcheck validateCFG + ./test/cfg/runtests.sh + +dmake: tools/dmake/dmake.o cli/filelister.o $(libcppdir)/pathmatch.o $(libcppdir)/path.o $(libcppdir)/utils.o externals/simplecpp/simplecpp.o + $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) -dmake: tools/dmake.cpp - $(CXX) -o dmake tools/dmake.cpp cli/filelister.cpp lib/path.cpp -Ilib +run-dmake: dmake + ./dmake clean: - rm -f lib/*.o cli/*.o test/*.o externals/tinyxml/*.o testrunner cppcheck cppcheck.1 + rm -f build/*.cpp build/*.o lib/*.o cli/*.o frontend/*.o test/*.o tools/dmake/*.o externals/*/*.o testrunner dmake cppcheck cppcheck.exe cppcheck.1 man: man/cppcheck.1 @@ -197,246 +408,570 @@ man/cppcheck.1: $(MAN_SOURCE) $(XP) $(DB2MAN) $(MAN_SOURCE) tags: - ctags -R --exclude=doxyoutput . + ctags -R --exclude=doxyoutput --exclude=test/cfg cli externals gui lib test install: cppcheck install -d ${BIN} install cppcheck ${BIN} + install htmlreport/cppcheck-htmlreport ${BIN} +ifdef FILESDIR + install -d ${DESTDIR}${FILESDIR} + install -d ${DESTDIR}${FILESDIR}/addons + install -m 644 addons/*.json ${DESTDIR}${FILESDIR}/addons + install -m 644 addons/*.py ${DESTDIR}${FILESDIR}/addons + install -d ${DESTDIR}${FILESDIR}/cfg + install -m 644 cfg/*.cfg ${DESTDIR}${FILESDIR}/cfg + install -d ${DESTDIR}${FILESDIR}/platforms + install -m 644 platforms/*.xml ${DESTDIR}${FILESDIR}/platforms +else + $(error FILESDIR must be set!) +endif +uninstall: + @if test -d ${BIN}; then \ + files="cppcheck cppcheck-htmlreport"; \ + echo '(' cd ${BIN} '&&' rm -f $$files ')'; \ + ( cd ${BIN} && rm -f $$files ); \ + fi +ifdef FILESDIR + @if test -d ${DESTDIR}${FILESDIR}; then \ + echo rm -rf ${DESTDIR}${FILESDIR}; \ + rm -rf ${DESTDIR}${FILESDIR}; \ + fi +endif +# Validation of library files: +ConfigFiles := $(wildcard cfg/*.cfg) +ConfigFilesCHECKED := $(patsubst %.cfg,%.checked,$(ConfigFiles)) +.PHONY: validateCFG +%.checked:%.cfg + xmllint --noout --relaxng cfg/cppcheck-cfg.rng $< +validateCFG: ${ConfigFilesCHECKED} + xmllint --noout cfg/cppcheck-cfg.rng + +# Validation of platforms files: +PlatformFiles := $(wildcard platforms/*.xml) +PlatformFilesCHECKED := $(patsubst %.xml,%.checked,$(PlatformFiles)) +.PHONY: validatePlatforms +%.checked:%.xml + xmllint --noout --relaxng platforms/cppcheck-platforms.rng $< +validatePlatforms: ${PlatformFilesCHECKED} + xmllint --noout platforms/cppcheck-platforms.rng + +# Validate XML output (to detect regressions) +/tmp/errorlist.xml: cppcheck + ./cppcheck --errorlist >$@ +/tmp/example.xml: cppcheck + ./cppcheck --xml --enable=all --inconclusive --max-configs=1 samples 2>/tmp/example.xml +createXMLExamples:/tmp/errorlist.xml /tmp/example.xml +.PHONY: validateXML +validateXML: createXMLExamples + xmllint --noout cppcheck-errors.rng + xmllint --noout --relaxng cppcheck-errors.rng /tmp/errorlist.xml + xmllint --noout --relaxng cppcheck-errors.rng /tmp/example.xml + +checkCWEEntries: /tmp/errorlist.xml + $(eval PYTHON_INTERPRETER := $(if $(PYTHON_INTERPRETER),$(PYTHON_INTERPRETER),$(shell which python3))) + $(eval PYTHON_INTERPRETER := $(if $(PYTHON_INTERPRETER),$(PYTHON_INTERPRETER),$(shell which python))) + $(eval PYTHON_INTERPRETER := $(if $(PYTHON_INTERPRETER),$(PYTHON_INTERPRETER),$(error Did not find a Python interpreter))) + $(PYTHON_INTERPRETER) tools/listErrorsWithoutCWE.py -F /tmp/errorlist.xml +.PHONY: validateRules +validateRules: + xmllint --noout rules/*.xml +.PHONY: check-nonneg +check-nonneg: + ls lib/*.cpp | xargs -n 1 -P $$(nproc) g++ -fsyntax-only -DNONNEG $(CXXFLAGS) $(INCLUDE_FOR_LIB) ###### Build -lib/check64bit.o: lib/check64bit.cpp lib/check64bit.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/symboldatabase.h lib/mathlib.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/check64bit.o lib/check64bit.cpp +$(libcppdir)/valueflow.o: lib/valueflow.cpp lib/addoninfo.h lib/analyzer.h lib/astutils.h lib/calculate.h lib/check.h lib/checkers.h lib/checkuninitvar.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/findtoken.h lib/forwardanalyzer.h lib/infer.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/programmemory.h lib/regex.h lib/reverseanalyzer.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/valueptr.h lib/vf_analyzers.h lib/vf_common.h lib/vf_settokenvalue.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/valueflow.cpp + +$(libcppdir)/tokenize.o: lib/tokenize.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/astutils.h lib/checkers.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/summaries.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/tokenize.cpp + +$(libcppdir)/symboldatabase.o: lib/symboldatabase.cpp lib/addoninfo.h lib/astutils.h lib/checkers.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/keywords.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/symboldatabase.cpp + +$(libcppdir)/addoninfo.o: lib/addoninfo.cpp externals/picojson/picojson.h lib/addoninfo.h lib/config.h lib/json.h lib/path.h lib/standards.h lib/utils.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/addoninfo.cpp + +$(libcppdir)/analyzerinfo.o: lib/analyzerinfo.cpp externals/tinyxml2/tinyxml2.h lib/analyzerinfo.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/mathlib.h lib/path.h lib/platform.h lib/standards.h lib/utils.h lib/xml.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/analyzerinfo.cpp + +$(libcppdir)/astutils.o: lib/astutils.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkclass.h lib/checkers.h lib/config.h lib/errortypes.h lib/findtoken.h lib/infer.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/valueflow.h lib/valueptr.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/astutils.cpp + +$(libcppdir)/check.o: lib/check.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/check.cpp + +$(libcppdir)/check64bit.o: lib/check64bit.cpp lib/addoninfo.h lib/check.h lib/check64bit.h lib/checkers.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/check64bit.cpp + +$(libcppdir)/checkassert.o: lib/checkassert.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkassert.h lib/checkers.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkassert.cpp + +$(libcppdir)/checkautovariables.o: lib/checkautovariables.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkautovariables.h lib/checkers.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkautovariables.cpp + +$(libcppdir)/checkbool.o: lib/checkbool.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkbool.h lib/checkers.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkbool.cpp + +$(libcppdir)/checkbufferoverrun.o: lib/checkbufferoverrun.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/astutils.h lib/check.h lib/checkbufferoverrun.h lib/checkers.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/vf_common.h lib/vfvalue.h lib/xml.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkbufferoverrun.cpp + +$(libcppdir)/checkclass.o: lib/checkclass.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/astutils.h lib/check.h lib/checkclass.h lib/checkers.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h lib/xml.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkclass.cpp + +$(libcppdir)/checkcondition.o: lib/checkcondition.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkcondition.h lib/checkers.h lib/checkother.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkcondition.cpp + +$(libcppdir)/checkers.o: lib/checkers.cpp lib/checkers.h lib/config.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkers.cpp + +$(libcppdir)/checkersidmapping.o: lib/checkersidmapping.cpp lib/checkers.h lib/config.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkersidmapping.cpp + +$(libcppdir)/checkersreport.o: lib/checkersreport.cpp lib/addoninfo.h lib/checkers.h lib/checkersreport.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkersreport.cpp + +$(libcppdir)/checkexceptionsafety.o: lib/checkexceptionsafety.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checkexceptionsafety.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkexceptionsafety.cpp + +$(libcppdir)/checkfunctions.o: lib/checkfunctions.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checkfunctions.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkfunctions.cpp + +$(libcppdir)/checkinternal.o: lib/checkinternal.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checkinternal.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkinternal.cpp + +$(libcppdir)/checkio.o: lib/checkio.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checkio.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkio.cpp + +$(libcppdir)/checkleakautovar.o: lib/checkleakautovar.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checkleakautovar.h lib/checkmemoryleak.h lib/checknullpointer.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkleakautovar.cpp + +$(libcppdir)/checkmemoryleak.o: lib/checkmemoryleak.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checkmemoryleak.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkmemoryleak.cpp + +$(libcppdir)/checknullpointer.o: lib/checknullpointer.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checknullpointer.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/findtoken.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checknullpointer.cpp + +$(libcppdir)/checkother.o: lib/checkother.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checkother.h lib/config.h lib/errortypes.h lib/fwdanalysis.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkother.cpp + +$(libcppdir)/checkpostfixoperator.o: lib/checkpostfixoperator.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkpostfixoperator.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkpostfixoperator.cpp + +$(libcppdir)/checks.o: lib/checks.cpp lib/check.h lib/check64bit.h lib/checkassert.h lib/checkautovariables.h lib/checkbool.h lib/checkbufferoverrun.h lib/checkclass.h lib/checkcondition.h lib/checkexceptionsafety.h lib/checkfunctions.h lib/checkinternal.h lib/checkio.h lib/checkleakautovar.h lib/checkmemoryleak.h lib/checknullpointer.h lib/checkother.h lib/checkpostfixoperator.h lib/checks.h lib/checksizeof.h lib/checkstl.h lib/checkstring.h lib/checktype.h lib/checkuninitvar.h lib/checkunusedvar.h lib/checkvaarg.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/standards.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checks.cpp + +$(libcppdir)/checksizeof.o: lib/checksizeof.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checksizeof.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checksizeof.cpp + +$(libcppdir)/checkstl.o: lib/checkstl.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checknullpointer.h lib/checkstl.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/pathanalysis.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkstl.cpp + +$(libcppdir)/checkstring.o: lib/checkstring.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checkstring.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkstring.cpp + +$(libcppdir)/checktype.o: lib/checktype.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checktype.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checktype.cpp + +$(libcppdir)/checkuninitvar.o: lib/checkuninitvar.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checknullpointer.h lib/checkuninitvar.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkuninitvar.cpp + +$(libcppdir)/checkunusedfunctions.o: lib/checkunusedfunctions.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/analyzerinfo.h lib/astutils.h lib/checkers.h lib/checkunusedfunctions.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h lib/xml.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkunusedfunctions.cpp + +$(libcppdir)/checkunusedvar.o: lib/checkunusedvar.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checkunusedvar.h lib/config.h lib/errortypes.h lib/fwdanalysis.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkunusedvar.cpp + +$(libcppdir)/checkvaarg.o: lib/checkvaarg.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/checkvaarg.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/checkvaarg.cpp + +$(libcppdir)/clangimport.o: lib/clangimport.cpp lib/clangimport.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/clangimport.cpp + +$(libcppdir)/color.o: lib/color.cpp lib/color.h lib/config.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/color.cpp + +$(libcppdir)/cppcheck.o: lib/cppcheck.cpp externals/picojson/picojson.h externals/simplecpp/simplecpp.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/checkers.h lib/checks.h lib/checkunusedfunctions.h lib/clangimport.h lib/color.h lib/config.h lib/cppcheck.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/json.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/timer.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/version.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/cppcheck.cpp + +$(libcppdir)/ctu.o: lib/ctu.cpp externals/tinyxml2/tinyxml2.h lib/astutils.h lib/check.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h lib/xml.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/ctu.cpp + +$(libcppdir)/errorlogger.o: lib/errorlogger.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/utils.h lib/vfvalue.h lib/xml.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/errorlogger.cpp + +$(libcppdir)/errortypes.o: lib/errortypes.cpp lib/config.h lib/errortypes.h lib/utils.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/errortypes.cpp + +$(libcppdir)/findtoken.o: lib/findtoken.cpp lib/astutils.h lib/config.h lib/errortypes.h lib/findtoken.h lib/library.h lib/mathlib.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/findtoken.cpp + +$(libcppdir)/forwardanalyzer.o: lib/forwardanalyzer.cpp lib/addoninfo.h lib/analyzer.h lib/astutils.h lib/checkers.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/forwardanalyzer.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueptr.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/forwardanalyzer.cpp + +$(libcppdir)/fwdanalysis.o: lib/fwdanalysis.cpp lib/addoninfo.h lib/astutils.h lib/checkers.h lib/config.h lib/errortypes.h lib/fwdanalysis.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/fwdanalysis.cpp + +$(libcppdir)/importproject.o: lib/importproject.cpp externals/picojson/picojson.h externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/checkers.h lib/config.h lib/errortypes.h lib/filesettings.h lib/importproject.h lib/json.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/utils.h lib/vfvalue.h lib/xml.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/importproject.cpp + +$(libcppdir)/infer.o: lib/infer.cpp lib/calculate.h lib/config.h lib/errortypes.h lib/infer.h lib/mathlib.h lib/smallvector.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/valueptr.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/infer.cpp + +$(libcppdir)/keywords.o: lib/keywords.cpp lib/config.h lib/keywords.h lib/standards.h lib/utils.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/keywords.cpp + +$(libcppdir)/library.o: lib/library.cpp externals/tinyxml2/tinyxml2.h lib/astutils.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/utils.h lib/vfvalue.h lib/xml.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/library.cpp + +$(libcppdir)/mathlib.o: lib/mathlib.cpp externals/simplecpp/simplecpp.h lib/config.h lib/errortypes.h lib/mathlib.h lib/smallvector.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/mathlib.cpp + +$(libcppdir)/path.o: lib/path.cpp externals/simplecpp/simplecpp.h lib/config.h lib/path.h lib/standards.h lib/utils.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/path.cpp + +$(libcppdir)/pathanalysis.o: lib/pathanalysis.cpp lib/astutils.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/pathanalysis.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/pathanalysis.cpp + +$(libcppdir)/pathmatch.o: lib/pathmatch.cpp lib/config.h lib/path.h lib/pathmatch.h lib/standards.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/pathmatch.cpp + +$(libcppdir)/platform.o: lib/platform.cpp externals/tinyxml2/tinyxml2.h lib/config.h lib/mathlib.h lib/path.h lib/platform.h lib/standards.h lib/utils.h lib/xml.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/platform.cpp + +$(libcppdir)/preprocessor.o: lib/preprocessor.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/checkers.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/preprocessor.cpp + +$(libcppdir)/programmemory.o: lib/programmemory.cpp lib/addoninfo.h lib/astutils.h lib/calculate.h lib/checkers.h lib/config.h lib/errortypes.h lib/infer.h lib/library.h lib/mathlib.h lib/platform.h lib/programmemory.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/utils.h lib/valueflow.h lib/valueptr.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/programmemory.cpp + +$(libcppdir)/regex.o: lib/regex.cpp lib/config.h lib/regex.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/regex.cpp + +$(libcppdir)/reverseanalyzer.o: lib/reverseanalyzer.cpp lib/addoninfo.h lib/analyzer.h lib/astutils.h lib/checkers.h lib/config.h lib/errortypes.h lib/forwardanalyzer.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/reverseanalyzer.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/valueptr.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/reverseanalyzer.cpp + +$(libcppdir)/sarifreport.o: lib/sarifreport.cpp externals/picojson/picojson.h lib/addoninfo.h lib/check.h lib/checkers.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/json.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/sarifreport.h lib/settings.h lib/standards.h lib/utils.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/sarifreport.cpp + +$(libcppdir)/settings.o: lib/settings.cpp externals/picojson/picojson.h lib/addoninfo.h lib/checkers.h lib/config.h lib/errortypes.h lib/json.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/summaries.h lib/suppressions.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/settings.cpp + +$(libcppdir)/standards.o: lib/standards.cpp externals/simplecpp/simplecpp.h lib/config.h lib/standards.h lib/utils.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/standards.cpp + +$(libcppdir)/summaries.o: lib/summaries.cpp lib/addoninfo.h lib/analyzerinfo.h lib/checkers.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/summaries.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/summaries.cpp + +$(libcppdir)/suppressions.o: lib/suppressions.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/checkers.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/utils.h lib/vfvalue.h lib/xml.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/suppressions.cpp + +$(libcppdir)/templatesimplifier.o: lib/templatesimplifier.cpp lib/addoninfo.h lib/checkers.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/templatesimplifier.cpp + +$(libcppdir)/timer.o: lib/timer.cpp lib/config.h lib/timer.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/timer.cpp + +$(libcppdir)/token.o: lib/token.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/astutils.h lib/checkers.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/tokenrange.h lib/utils.h lib/valueflow.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/token.cpp + +$(libcppdir)/tokenlist.o: lib/tokenlist.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/astutils.h lib/checkers.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/keywords.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/tokenlist.cpp + +$(libcppdir)/utils.o: lib/utils.cpp lib/config.h lib/utils.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/utils.cpp + +$(libcppdir)/vf_analyzers.o: lib/vf_analyzers.cpp lib/addoninfo.h lib/analyzer.h lib/astutils.h lib/calculate.h lib/checkers.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/programmemory.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/valueflow.h lib/valueptr.h lib/vf_analyzers.h lib/vf_common.h lib/vf_settokenvalue.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/vf_analyzers.cpp + +$(libcppdir)/vf_common.o: lib/vf_common.cpp lib/addoninfo.h lib/astutils.h lib/checkers.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/vf_common.h lib/vf_settokenvalue.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/vf_common.cpp + +$(libcppdir)/vf_settokenvalue.o: lib/vf_settokenvalue.cpp lib/addoninfo.h lib/astutils.h lib/calculate.h lib/checkers.h lib/config.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/valueflow.h lib/vf_common.h lib/vf_settokenvalue.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/vf_settokenvalue.cpp + +$(libcppdir)/vfvalue.o: lib/vfvalue.cpp lib/config.h lib/errortypes.h lib/mathlib.h lib/smallvector.h lib/templatesimplifier.h lib/token.h lib/utils.h lib/vfvalue.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(libcppdir)/vfvalue.cpp + +frontend/frontend.o: frontend/frontend.cpp frontend/frontend.h lib/addoninfo.h lib/checkers.h lib/config.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h + $(CXX) ${INCLUDE_FOR_FE} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ frontend/frontend.cpp + +cli/cmdlineparser.o: cli/cmdlineparser.cpp cli/cmdlinelogger.h cli/cmdlineparser.h cli/filelister.h externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/checkers.h lib/checks.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h lib/xml.h + $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/cmdlineparser.cpp + +cli/cppcheckexecutor.o: cli/cppcheckexecutor.cpp cli/cmdlinelogger.h cli/cmdlineparser.h cli/cppcheckexecutor.h cli/executor.h cli/processexecutor.h cli/sehwrapper.h cli/signalhandler.h cli/singleexecutor.h cli/threadexecutor.h externals/picojson/picojson.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/checkers.h lib/checkersreport.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/json.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/sarifreport.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h + $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/cppcheckexecutor.cpp + +cli/executor.o: cli/executor.cpp cli/executor.h lib/addoninfo.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h + $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/executor.cpp + +cli/filelister.o: cli/filelister.cpp cli/filelister.h lib/config.h lib/filesettings.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/standards.h lib/utils.h + $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/filelister.cpp + +cli/main.o: cli/main.cpp cli/cppcheckexecutor.h lib/config.h lib/filesettings.h lib/mathlib.h lib/path.h lib/platform.h lib/standards.h lib/utils.h + $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/main.cpp + +cli/processexecutor.o: cli/processexecutor.cpp cli/executor.h cli/processexecutor.h lib/addoninfo.h lib/check.h lib/checkers.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h + $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/processexecutor.cpp + +cli/sehwrapper.o: cli/sehwrapper.cpp cli/sehwrapper.h lib/config.h lib/utils.h + $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/sehwrapper.cpp + +cli/signalhandler.o: cli/signalhandler.cpp cli/signalhandler.h cli/stacktrace.h lib/config.h + $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/signalhandler.cpp + +cli/singleexecutor.o: cli/singleexecutor.cpp cli/executor.h cli/singleexecutor.h lib/addoninfo.h lib/check.h lib/checkers.h lib/config.h lib/cppcheck.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/timer.h lib/utils.h + $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/singleexecutor.cpp + +cli/stacktrace.o: cli/stacktrace.cpp cli/stacktrace.h lib/config.h lib/utils.h + $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/stacktrace.cpp + +cli/threadexecutor.o: cli/threadexecutor.cpp cli/executor.h cli/threadexecutor.h lib/addoninfo.h lib/check.h lib/checkers.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h + $(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/threadexecutor.cpp + +test/fixture.o: test/fixture.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/xml.h test/fixture.h test/helpers.h test/options.h test/redirect.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/fixture.cpp + +test/helpers.o: test/helpers.cpp cli/filelister.h externals/simplecpp/simplecpp.h externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/checkers.h lib/config.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/preprocessor.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/xml.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/helpers.cpp + +test/main.o: test/main.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h test/options.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/main.cpp + +test/options.o: test/options.cpp lib/config.h lib/timer.h test/options.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/options.cpp -lib/checkassignif.o: lib/checkassignif.cpp lib/checkassignif.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/mathlib.h lib/symboldatabase.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkassignif.o lib/checkassignif.cpp +test/test64bit.o: test/test64bit.cpp lib/addoninfo.h lib/check.h lib/check64bit.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/test64bit.cpp -lib/checkautovariables.o: lib/checkautovariables.cpp lib/checkautovariables.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/symboldatabase.h lib/mathlib.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkautovariables.o lib/checkautovariables.cpp +test/testanalyzerinformation.o: test/testanalyzerinformation.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h lib/xml.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testanalyzerinformation.cpp -lib/checkboost.o: lib/checkboost.cpp lib/checkboost.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkboost.o lib/checkboost.cpp +test/testassert.o: test/testassert.cpp lib/addoninfo.h lib/check.h lib/checkassert.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testassert.cpp -lib/checkbufferoverrun.o: lib/checkbufferoverrun.cpp lib/checkbufferoverrun.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/mathlib.h lib/symboldatabase.h lib/executionpath.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkbufferoverrun.o lib/checkbufferoverrun.cpp +test/testastutils.o: test/testastutils.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testastutils.cpp -lib/checkclass.o: lib/checkclass.cpp lib/checkclass.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/symboldatabase.h lib/mathlib.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkclass.o lib/checkclass.cpp +test/testautovariables.o: test/testautovariables.cpp lib/addoninfo.h lib/check.h lib/checkautovariables.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testautovariables.cpp -lib/checkexceptionsafety.o: lib/checkexceptionsafety.cpp lib/checkexceptionsafety.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/symboldatabase.h lib/mathlib.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkexceptionsafety.o lib/checkexceptionsafety.cpp +test/testbool.o: test/testbool.cpp lib/addoninfo.h lib/check.h lib/checkbool.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testbool.cpp -lib/checkinternal.o: lib/checkinternal.cpp lib/checkinternal.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/symboldatabase.h lib/mathlib.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkinternal.o lib/checkinternal.cpp +test/testbufferoverrun.o: test/testbufferoverrun.cpp lib/addoninfo.h lib/check.h lib/checkbufferoverrun.h lib/checkers.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testbufferoverrun.cpp -lib/checkmemoryleak.o: lib/checkmemoryleak.cpp lib/checkmemoryleak.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/symboldatabase.h lib/mathlib.h lib/checkuninitvar.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkmemoryleak.o lib/checkmemoryleak.cpp +test/testcharvar.o: test/testcharvar.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkother.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testcharvar.cpp -lib/checknonreentrantfunctions.o: lib/checknonreentrantfunctions.cpp lib/checknonreentrantfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checknonreentrantfunctions.o lib/checknonreentrantfunctions.cpp +test/testcheck.o: test/testcheck.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checks.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testcheck.cpp -lib/checknullpointer.o: lib/checknullpointer.cpp lib/checknullpointer.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/executionpath.h lib/mathlib.h lib/symboldatabase.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checknullpointer.o lib/checknullpointer.cpp +test/testcheckersreport.o: test/testcheckersreport.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkersreport.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testcheckersreport.cpp -lib/checkobsoletefunctions.o: lib/checkobsoletefunctions.cpp lib/checkobsoletefunctions.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/symboldatabase.h lib/mathlib.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkobsoletefunctions.o lib/checkobsoletefunctions.cpp +test/testclangimport.o: test/testclangimport.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/clangimport.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testclangimport.cpp -lib/checkother.o: lib/checkother.cpp lib/checkother.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/mathlib.h lib/symboldatabase.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkother.o lib/checkother.cpp +test/testclass.o: test/testclass.cpp lib/addoninfo.h lib/check.h lib/checkclass.h lib/checkers.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testclass.cpp -lib/checkpostfixoperator.o: lib/checkpostfixoperator.cpp lib/checkpostfixoperator.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/symboldatabase.h lib/mathlib.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkpostfixoperator.o lib/checkpostfixoperator.cpp +test/testcmdlineparser.o: test/testcmdlineparser.cpp cli/cmdlinelogger.h cli/cmdlineparser.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testcmdlineparser.cpp -lib/checkstl.o: lib/checkstl.cpp lib/checkstl.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/executionpath.h lib/symboldatabase.h lib/mathlib.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkstl.o lib/checkstl.cpp +test/testcolor.o: test/testcolor.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testcolor.cpp -lib/checkuninitvar.o: lib/checkuninitvar.cpp lib/checkuninitvar.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/mathlib.h lib/executionpath.h lib/checknullpointer.h lib/symboldatabase.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkuninitvar.o lib/checkuninitvar.cpp +test/testcondition.o: test/testcondition.cpp lib/addoninfo.h lib/check.h lib/checkcondition.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testcondition.cpp -lib/checkunusedfunctions.o: lib/checkunusedfunctions.cpp lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkunusedfunctions.o lib/checkunusedfunctions.cpp +test/testconstructors.o: test/testconstructors.cpp lib/addoninfo.h lib/check.h lib/checkclass.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testconstructors.cpp -lib/checkunusedvar.o: lib/checkunusedvar.cpp lib/checkunusedvar.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/symboldatabase.h lib/mathlib.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/checkunusedvar.o lib/checkunusedvar.cpp +test/testcppcheck.o: test/testcppcheck.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testcppcheck.cpp -lib/cppcheck.o: lib/cppcheck.cpp lib/cppcheck.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/preprocessor.h lib/timer.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/cppcheck.o lib/cppcheck.cpp +test/testerrorlogger.o: test/testerrorlogger.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/xml.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testerrorlogger.cpp -lib/errorlogger.o: lib/errorlogger.cpp lib/errorlogger.h lib/suppressions.h lib/path.h lib/cppcheck.h lib/settings.h lib/standards.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/errorlogger.o lib/errorlogger.cpp +test/testexceptionsafety.o: test/testexceptionsafety.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkexceptionsafety.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testexceptionsafety.cpp -lib/executionpath.o: lib/executionpath.cpp lib/executionpath.h lib/token.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/executionpath.o lib/executionpath.cpp +test/testexecutor.o: test/testexecutor.cpp cli/executor.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testexecutor.cpp -lib/mathlib.o: lib/mathlib.cpp lib/mathlib.h lib/errorlogger.h lib/suppressions.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/mathlib.o lib/mathlib.cpp +test/testfilelister.o: test/testfilelister.cpp cli/filelister.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testfilelister.cpp -lib/path.o: lib/path.cpp lib/path.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/path.o lib/path.cpp +test/testfilesettings.o: test/testfilesettings.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testfilesettings.cpp -lib/preprocessor.o: lib/preprocessor.cpp lib/preprocessor.h lib/tokenize.h lib/path.h lib/token.h lib/errorlogger.h lib/suppressions.h lib/settings.h lib/standards.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/preprocessor.o lib/preprocessor.cpp +test/testfrontend.o: test/testfrontend.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testfrontend.cpp -lib/settings.o: lib/settings.cpp lib/settings.h lib/suppressions.h lib/standards.h lib/path.h lib/preprocessor.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/settings.o lib/settings.cpp +test/testfunctions.o: test/testfunctions.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkfunctions.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testfunctions.cpp -lib/suppressions.o: lib/suppressions.cpp lib/suppressions.h lib/settings.h lib/standards.h lib/path.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/suppressions.o lib/suppressions.cpp +test/testgarbage.o: test/testgarbage.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checks.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testgarbage.cpp -lib/symboldatabase.o: lib/symboldatabase.cpp lib/symboldatabase.h lib/token.h lib/mathlib.h lib/tokenize.h lib/path.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/check.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/symboldatabase.o lib/symboldatabase.cpp +test/testimportproject.o: test/testimportproject.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/importproject.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h lib/xml.h test/fixture.h test/redirect.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testimportproject.cpp -lib/templatesimplifier.o: lib/templatesimplifier.cpp lib/templatesimplifier.h lib/mathlib.h lib/errorlogger.h lib/suppressions.h lib/token.h lib/settings.h lib/standards.h lib/check.h lib/tokenize.h lib/path.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/templatesimplifier.o lib/templatesimplifier.cpp +test/testincompletestatement.o: test/testincompletestatement.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkother.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testincompletestatement.cpp -lib/timer.o: lib/timer.cpp lib/timer.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/timer.o lib/timer.cpp +test/testinternal.o: test/testinternal.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkinternal.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testinternal.cpp -lib/token.o: lib/token.cpp lib/token.h lib/errorlogger.h lib/suppressions.h lib/check.h lib/tokenize.h lib/path.h lib/settings.h lib/standards.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/token.o lib/token.cpp +test/testio.o: test/testio.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkio.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testio.cpp -lib/tokenize.o: lib/tokenize.cpp lib/tokenize.h lib/path.h lib/token.h lib/mathlib.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/check.h lib/symboldatabase.h lib/templatesimplifier.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_LIB} -c -o lib/tokenize.o lib/tokenize.cpp +test/testleakautovar.o: test/testleakautovar.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkleakautovar.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testleakautovar.cpp -cli/cmdlineparser.o: cli/cmdlineparser.cpp lib/cppcheck.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/path.h lib/timer.h cli/cmdlineparser.h cli/filelister.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_CLI} -c -o cli/cmdlineparser.o cli/cmdlineparser.cpp +test/testlibrary.o: test/testlibrary.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testlibrary.cpp -cli/cppcheckexecutor.o: cli/cppcheckexecutor.cpp cli/cppcheckexecutor.h lib/errorlogger.h lib/suppressions.h lib/settings.h lib/standards.h lib/cppcheck.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/path.h cli/threadexecutor.h lib/preprocessor.h cli/cmdlineparser.h cli/filelister.h cli/pathmatch.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_CLI} -c -o cli/cppcheckexecutor.o cli/cppcheckexecutor.cpp +test/testmathlib.o: test/testmathlib.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testmathlib.cpp -cli/filelister.o: cli/filelister.cpp cli/filelister.h lib/path.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_CLI} -c -o cli/filelister.o cli/filelister.cpp +test/testmemleak.o: test/testmemleak.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkmemoryleak.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testmemleak.cpp -cli/main.o: cli/main.cpp cli/cppcheckexecutor.h lib/errorlogger.h lib/suppressions.h lib/settings.h lib/standards.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_CLI} -c -o cli/main.o cli/main.cpp +test/testnullpointer.o: test/testnullpointer.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checknullpointer.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testnullpointer.cpp -cli/pathmatch.o: cli/pathmatch.cpp cli/pathmatch.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_CLI} -c -o cli/pathmatch.o cli/pathmatch.cpp +test/testoptions.o: test/testoptions.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h test/options.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testoptions.cpp -cli/threadexecutor.o: cli/threadexecutor.cpp cli/cppcheckexecutor.h lib/errorlogger.h lib/suppressions.h lib/settings.h lib/standards.h cli/threadexecutor.h lib/cppcheck.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/path.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_CLI} -c -o cli/threadexecutor.o cli/threadexecutor.cpp +test/testother.o: test/testother.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkother.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testother.cpp -test/options.o: test/options.cpp test/options.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/options.o test/options.cpp +test/testpath.o: test/testpath.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testpath.cpp -test/test64bit.o: test/test64bit.cpp lib/tokenize.h lib/path.h lib/check64bit.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/test64bit.o test/test64bit.cpp +test/testpathmatch.o: test/testpathmatch.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testpathmatch.cpp -test/testassignif.o: test/testassignif.cpp lib/tokenize.h lib/path.h lib/checkassignif.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/mathlib.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testassignif.o test/testassignif.cpp +test/testplatform.o: test/testplatform.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h lib/xml.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testplatform.cpp -test/testautovariables.o: test/testautovariables.cpp lib/tokenize.h lib/path.h lib/checkautovariables.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testautovariables.o test/testautovariables.cpp +test/testpostfixoperator.o: test/testpostfixoperator.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkpostfixoperator.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testpostfixoperator.cpp -test/testboost.o: test/testboost.cpp lib/tokenize.h lib/path.h lib/checkboost.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testboost.o test/testboost.cpp +test/testpreprocessor.o: test/testpreprocessor.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testpreprocessor.cpp -test/testbufferoverrun.o: test/testbufferoverrun.cpp lib/tokenize.h lib/path.h lib/checkbufferoverrun.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/mathlib.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testbufferoverrun.o test/testbufferoverrun.cpp +test/testprocessexecutor.o: test/testprocessexecutor.cpp cli/executor.h cli/processexecutor.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testprocessexecutor.cpp -test/testcharvar.o: test/testcharvar.cpp lib/tokenize.h lib/path.h lib/checkother.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testcharvar.o test/testcharvar.cpp +test/testprogrammemory.o: test/testprogrammemory.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/programmemory.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testprogrammemory.cpp -test/testclass.o: test/testclass.cpp lib/tokenize.h lib/path.h lib/checkclass.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testclass.o test/testclass.cpp +test/testregex.o: test/testregex.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testregex.cpp -test/testcmdlineparser.o: test/testcmdlineparser.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h lib/settings.h lib/standards.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testcmdlineparser.o test/testcmdlineparser.cpp +test/testsarifreport.o: test/testsarifreport.cpp externals/picojson/picojson.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/json.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/sarifreport.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsarifreport.cpp -test/testconstructors.o: test/testconstructors.cpp lib/tokenize.h lib/path.h lib/checkclass.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testconstructors.o test/testconstructors.cpp +test/testsettings.o: test/testsettings.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsettings.cpp -test/testcppcheck.o: test/testcppcheck.cpp lib/cppcheck.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/path.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testcppcheck.o test/testcppcheck.cpp +test/testsimplifytemplate.o: test/testsimplifytemplate.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsimplifytemplate.cpp -test/testdivision.o: test/testdivision.cpp lib/tokenize.h lib/path.h lib/checkother.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testdivision.o test/testdivision.cpp +test/testsimplifytokens.o: test/testsimplifytokens.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsimplifytokens.cpp -test/testerrorlogger.o: test/testerrorlogger.cpp lib/cppcheck.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/path.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testerrorlogger.o test/testerrorlogger.cpp +test/testsimplifytypedef.o: test/testsimplifytypedef.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsimplifytypedef.cpp -test/testexceptionsafety.o: test/testexceptionsafety.cpp lib/tokenize.h lib/path.h lib/checkexceptionsafety.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testexceptionsafety.o test/testexceptionsafety.cpp +test/testsimplifyusing.o: test/testsimplifyusing.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsimplifyusing.cpp -test/testfilelister.o: test/testfilelister.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testfilelister.o test/testfilelister.cpp +test/testsingleexecutor.o: test/testsingleexecutor.cpp cli/executor.h cli/singleexecutor.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsingleexecutor.cpp -test/testincompletestatement.o: test/testincompletestatement.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h lib/tokenize.h lib/path.h lib/checkother.h lib/check.h lib/token.h lib/settings.h lib/standards.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testincompletestatement.o test/testincompletestatement.cpp +test/testsizeof.o: test/testsizeof.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checksizeof.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsizeof.cpp -test/testinternal.o: test/testinternal.cpp lib/tokenize.h lib/path.h lib/checkinternal.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testinternal.o test/testinternal.cpp +test/teststandards.o: test/teststandards.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/teststandards.cpp -test/testmathlib.o: test/testmathlib.cpp lib/mathlib.h test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testmathlib.o test/testmathlib.cpp +test/teststl.o: test/teststl.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkstl.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/teststl.cpp -test/testmemleak.o: test/testmemleak.cpp lib/tokenize.h lib/path.h lib/checkmemoryleak.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testmemleak.o test/testmemleak.cpp +test/teststring.o: test/teststring.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkstring.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/teststring.cpp -test/testnonreentrantfunctions.o: test/testnonreentrantfunctions.cpp lib/tokenize.h lib/path.h lib/checknonreentrantfunctions.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testnonreentrantfunctions.o test/testnonreentrantfunctions.cpp +test/testsummaries.o: test/testsummaries.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/summaries.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsummaries.cpp -test/testnullpointer.o: test/testnullpointer.cpp lib/tokenize.h lib/path.h lib/checknullpointer.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testnullpointer.o test/testnullpointer.cpp +test/testsuppressions.o: test/testsuppressions.cpp cli/cppcheckexecutor.h cli/executor.h cli/processexecutor.h cli/singleexecutor.h cli/threadexecutor.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsuppressions.cpp -test/testobsoletefunctions.o: test/testobsoletefunctions.cpp lib/tokenize.h lib/path.h lib/checkobsoletefunctions.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testobsoletefunctions.o test/testobsoletefunctions.cpp +test/testsymboldatabase.o: test/testsymboldatabase.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsymboldatabase.cpp -test/testoptions.o: test/testoptions.cpp test/options.h test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testoptions.o test/testoptions.cpp +test/testthreadexecutor.o: test/testthreadexecutor.cpp cli/executor.h cli/threadexecutor.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testthreadexecutor.cpp -test/testother.o: test/testother.cpp lib/preprocessor.h lib/tokenize.h lib/path.h lib/checkother.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testother.o test/testother.cpp +test/testtimer.o: test/testtimer.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/timer.h lib/utils.h test/fixture.h test/redirect.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testtimer.cpp -test/testpath.o: test/testpath.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h lib/path.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testpath.o test/testpath.cpp +test/testtoken.o: test/testtoken.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testtoken.cpp -test/testpathmatch.o: test/testpathmatch.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testpathmatch.o test/testpathmatch.cpp +test/testtokenize.o: test/testtokenize.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testtokenize.cpp -test/testpostfixoperator.o: test/testpostfixoperator.cpp lib/tokenize.h lib/path.h lib/checkpostfixoperator.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testpostfixoperator.o test/testpostfixoperator.cpp +test/testtokenlist.o: test/testtokenlist.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testtokenlist.cpp -test/testpreprocessor.o: test/testpreprocessor.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h lib/preprocessor.h lib/tokenize.h lib/path.h lib/token.h lib/settings.h lib/standards.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testpreprocessor.o test/testpreprocessor.cpp +test/testtokenrange.o: test/testtokenrange.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/tokenrange.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testtokenrange.cpp -test/testrunner.o: test/testrunner.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h test/options.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testrunner.o test/testrunner.cpp +test/testtype.o: test/testtype.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checktype.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testtype.cpp -test/testsimplifytokens.o: test/testsimplifytokens.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h lib/tokenize.h lib/path.h lib/token.h lib/settings.h lib/standards.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testsimplifytokens.o test/testsimplifytokens.cpp +test/testuninitvar.o: test/testuninitvar.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkuninitvar.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testuninitvar.cpp -test/teststl.o: test/teststl.cpp lib/tokenize.h lib/path.h lib/checkstl.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/teststl.o test/teststl.cpp +test/testunusedfunctions.o: test/testunusedfunctions.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkunusedfunctions.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testunusedfunctions.cpp -test/testsuite.o: test/testsuite.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h test/options.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testsuite.o test/testsuite.cpp +test/testunusedprivfunc.o: test/testunusedprivfunc.cpp lib/addoninfo.h lib/check.h lib/checkclass.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testunusedprivfunc.cpp -test/testsuppressions.o: test/testsuppressions.cpp lib/cppcheck.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/path.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testsuppressions.o test/testsuppressions.cpp +test/testunusedvar.o: test/testunusedvar.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkers.h lib/checkunusedvar.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testunusedvar.cpp -test/testsymboldatabase.o: test/testsymboldatabase.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h test/testutils.h lib/settings.h lib/standards.h lib/tokenize.h lib/path.h lib/symboldatabase.h lib/token.h lib/mathlib.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testsymboldatabase.o test/testsymboldatabase.cpp +test/testutils.o: test/testutils.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testutils.cpp -test/testthreadexecutor.o: test/testthreadexecutor.cpp lib/cppcheck.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/tokenize.h lib/path.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testthreadexecutor.o test/testthreadexecutor.cpp +test/testvaarg.o: test/testvaarg.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/checkvaarg.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testvaarg.cpp -test/testtoken.o: test/testtoken.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h test/testutils.h lib/settings.h lib/standards.h lib/tokenize.h lib/path.h lib/token.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testtoken.o test/testtoken.cpp +test/testvalueflow.o: test/testvalueflow.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testvalueflow.cpp -test/testtokenize.o: test/testtokenize.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h lib/tokenize.h lib/path.h lib/token.h lib/settings.h lib/standards.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testtokenize.o test/testtokenize.cpp +test/testvarid.o: test/testvarid.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/regex.h lib/settings.h lib/smallvector.h lib/standards.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testvarid.cpp -test/testuninitvar.o: test/testuninitvar.cpp lib/tokenize.h lib/path.h lib/checkuninitvar.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testuninitvar.o test/testuninitvar.cpp +test/testvfvalue.o: test/testvfvalue.cpp lib/addoninfo.h lib/check.h lib/checkers.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/regex.h lib/settings.h lib/standards.h lib/utils.h lib/vfvalue.h test/fixture.h + $(CXX) ${INCLUDE_FOR_TEST} ${CFLAGS_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testvfvalue.cpp -test/testunusedfunctions.o: test/testunusedfunctions.cpp lib/tokenize.h lib/path.h test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h lib/checkunusedfunctions.h lib/check.h lib/token.h lib/settings.h lib/standards.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testunusedfunctions.o test/testunusedfunctions.cpp +externals/simplecpp/simplecpp.o: externals/simplecpp/simplecpp.cpp externals/simplecpp/simplecpp.h + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -w -c -o $@ externals/simplecpp/simplecpp.cpp -test/testunusedprivfunc.o: test/testunusedprivfunc.cpp lib/tokenize.h lib/path.h lib/checkclass.h lib/check.h lib/token.h lib/settings.h lib/suppressions.h lib/standards.h lib/errorlogger.h test/testsuite.h test/redirect.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testunusedprivfunc.o test/testunusedprivfunc.cpp +externals/tinyxml2/tinyxml2.o: externals/tinyxml2/tinyxml2.cpp externals/tinyxml2/tinyxml2.h + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -w -D_LARGEFILE_SOURCE -c -o $@ externals/tinyxml2/tinyxml2.cpp -test/testunusedvar.o: test/testunusedvar.cpp test/testsuite.h lib/errorlogger.h lib/suppressions.h test/redirect.h lib/tokenize.h lib/path.h lib/checkunusedvar.h lib/check.h lib/token.h lib/settings.h lib/standards.h - $(CXX) $(CPPFLAGS) $(CXXFLAGS) ${INCLUDE_FOR_TEST} -c -o test/testunusedvar.o test/testunusedvar.cpp +tools/dmake/dmake.o: tools/dmake/dmake.cpp cli/filelister.h lib/config.h lib/filesettings.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/standards.h lib/utils.h + $(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ tools/dmake/dmake.cpp diff --git a/TUNING.md b/TUNING.md new file mode 100644 index 00000000000..ba1f7f49738 --- /dev/null +++ b/TUNING.md @@ -0,0 +1,171 @@ +# Tuning Cppcheck Analysis + +There are several ways you can potentially improve the runtime of a Cppcheck analysis. + +Note: Most of these suggestions highly depend on your code base so they need to be evaluated before being applied. They might also depend the code of Cppcheck itself and your environment. So you might want to evaluate these on a regular basis. + +## Collecting Information + +To see the time each file took to analyze just specify the `--showtime=file-total` CLI option. + +## Tuning At Build-Level + +It is most likely that a pre-built binary is being used - either an official one or one provided by the packaging manager of my operating system. + +But if you build your own binary it is possible to apply several steps to potentially improve the performance. + +Note: Recently more distribution have opted to use more advanced optimization for their packages so several of the following suggestions might have already been applied. +Please refer to the documentation of your distribution for more insight on this. + +### Use Matchcompiler + +(TODO: document how to use it when using the in-tree Visual Studio project) +(TODO: check with a CMake generated Visual Studio project) + +### Use Boost + +Boost.Container (https://www.boost.org/doc/libs/release/libs/container) is being used for some containers which have a smaller overhead. + +As the used library is header-only implementation you only need to install the package on the system you build the binary on but not on the system you run the analysis on. + +The official Windows binary is always using this. + +This will be used by default if Boost is detected in CMake. If you want to enforce the usage, you can use the CMake option `-DUSE_BOOST=On` which will cause the build to fail if no Boost was detected. + +Using Visual Studio you need to provide a full Boost release (i.e. including binaries) for it to be detected by CMake. If you are not able to do this you can specify the CMake option `-DBOOST_INCLUDEDIR=` (pointing to the directory which *contains* the `boost` include directory) to work around this (this is a Cppcheck specific hack) - see https://trac.cppcheck.net/ticket/13822 for more details. + +If you are using `make` instead you need to specify `-DHAVE_BOOST` in the flags. + +If you are using the Visual Studio project you need to specify the properties `HaveBoost` (always needs to be set to `HAVE_BOOST`) and `BoostInclude` (set to the Boost folder). On the command-line you would need to add `-p:HaveBoost=HAVE_BOOST -p:BoostInclude=`. + +### Use A Different Compiler + +Analyzing our own code base has shown that using a different compiler might lead to slightly better performance. + +In our case Clang is mostly faster than GCC. See https://trac.cppcheck.net/ticket/10778 for some details. + +### Use More Advanced Optimizations + +By default we enforce the `-O2` optimization level. Even when using the `Release` build type in CMake which defaults to `-O3`. It might be possible that building with `-O3` might yield a performance increase. + +There are also no additional code generation flags provided so the resulting binary can run on any system. You might be able to tune this and apply more optimization which is tailored to the system you will be running the binary on. + +Needs to be evaluated. (TODO: file tickets) + +### Use LTO + +Needs to be evaluated. See https://trac.cppcheck.net/ticket/11671. + +### Use profile-guided optimizations (PGO/BOLT/AutoFDO/Propeller) + +Needs to be evaluated. See https://trac.cppcheck.net/ticket/11672. + +## Tuning At Analysis-Level + +### Use A More Performant Platform + +It seems people assume that you need to run the analysis on the same system you build your code on/for. That is not necessary as the analysis is system-agnostic. +As system headers are not required for analyzing your code you only need to specify the configuration which matches the system you run your code on. + +In case you are using a project as input which can only be generated on the build/target system you can just transfer that to a different system and still run the analysis. + +### Specify A Build Dir + +Using the `--cppcheck-build-dir` allows you to perform incremental runs which omit files which have not been changed. + +Important: As this is currently seriously lacking in testing coverage it might have shortcomings and need to be used with care. (TODO: file ticket) + +### Exclude Static/Generated Files + +If your code base contains files which rarely change (e.g. local copies of external dependencies) or you have generated files (e.g. `moc_*.cpp` for Qt projects) you might consider excluding these from the analysis. +This can be done by using the `-i` option on the CLI, `` in GUI projects or by including them to begin with into the files passed to the analysis. + +Depending on your setup you might also consider to scan these files in a less frequent run (e.g. only when the files have changed or Cppcheck was updated). + +This could also be handled using `--cppcheck-build-dir` (see above). + +### Exclude System Headers + +System headers are not necessary to perform the analysis. So you might consider not providing those to the analysis and specify a library configuration via `--library` instead. + +`pkg-config` for instance will always provide non-system includes. + +(TODO: file ticket about ignoring all braced includes) + +### Limit The Configuration + +By default configuration to analyze will be determined automatically for each file based on the code. The maximum amount is limited and can be controlled by CLI options. + +Depending on your setup you might want to limit it to specific configuration by using `-D` (CLI) or `--project-configuration=` (Visual Studio project). +When you are using a compilation database generated by CMake it is already using a fixed configuration. + +### Use Multiple Jobs + +By default only a single process/thread is being used. You might to scale this up using the `-j` CLI option. Please note that specifying a value that will max out your systems resources might have a detrimental effect. + +### Use A Different Threading Model + +When using multiple job for the analysis (see above) on Linux it will default to using processes. This is done so the analysis is not aborted prematurely aborted in case of a crash. +Unfortunately it has overhead because of a suboptimal implementation and the fact that data needs to be transferred from the child processes to the main process. +So if you do not require the additional safety you might want to switch to the usage of thread instead using `--executor=thread`. + +Note: For Windows binaries we currently do not provide the possibility of using processes so this does not apply. + +### Disable Analyzing Of Unused Templated Functions + +Currently all templated functions (either locally or in headers) will be analyzed regardless if they are instantiated or not. If you have template-heavy includes that might lead to unnecessary work and findings, and might slow down the analysis. This behavior can be disabled with `--no-check-unused-templates`. + +Note: This might lead to "false negatives" in such functions if they are never instantiated. You should make sure that you have proper coverage of the affected functions in your code before enabling this. + +### Limit Analysis Of Projects + +If you specify a project all files will be analyzed by default. But in some cases you might only be interested in the results in a subset of those (e.g. in IDE integrations). + +Using the `--file-filter=` CLI option you can select files using a globbing syntax. Using `--file-filter=-` you can provide the filters directly on the CLI. + +## Advanced Tuning + +### Re-order The Files + +Files which take longer to analyze should be processed at first so they might not extended the run time. As the order how the files provided on the CLI or via the project are being honored it is as simple as that. + +### Adjust Thresholds + +There are lots of internal thresholds which limit the work which is put into parts of the analysis. The defaults were chosen as a compromise of time being spent vs. issues being detected but not might not be a good fit in all cases. + +These thresholds are currently neither exposed nor documented so they cannot be changed without the modifying the source which is *highly discouraged*. + +They are being utilized internally by `-check-level` though (see below). + +(TODO: file ticket about providing all bailouts) +(TODO: file ticket about expose these) +(TODO: file ticket about specifying these per file) + +Note: As these will lead to less data being collected for the analysis it might lead to false negatives *and* false positives. + +### Adjust Check Level + +There are several check levels which are basically a collection of different threshold values (see above). This can be adjusted by the CLI option `--check-level`. + +Note: The current default is the lowest available check level. + +Note: As these will lead to less data being collected for the analysis it might lead to false negatives *and* false positives. + +## Reporting Issues + +If you encounter a file which has an unreasonable slow analysis please consider reporting this as an issue. + +Also consider reporting major upticks in the runtime of the analysis after updating to a newer version. Some of these might be expected as the analysis is constantly improved but out-of-the-box we still need aim for reasonable times. + +In all cases please try to provide a small reproducer if possible. + +Note: There might even be cases the analysis will never finish because it is stuck in a cycle. This is quite uncommon but there are still several unresolved known cases so it is possible to encounter this. + +### Known Issues + +https://trac.cppcheck.net/ticket/10663 +https://trac.cppcheck.net/ticket/10765 +https://trac.cppcheck.net/ticket/10778 +https://trac.cppcheck.net/ticket/11262 +https://trac.cppcheck.net/ticket/12528 +https://trac.cppcheck.net/ticket/13698 \ No newline at end of file diff --git a/addons/README.md b/addons/README.md new file mode 100644 index 00000000000..05502f547b6 --- /dev/null +++ b/addons/README.md @@ -0,0 +1,72 @@ +# Cppcheck addons + +Addons are scripts that analyses Cppcheck dump files to check compatibility with secure coding standards and to locate various issues. + +## Supported addons + ++ [misra.py](https://github.com/cppcheck-opensource/cppcheck/blob/main/addons/misra.py) + Used to verify compliance with MISRA C 2012 - a proprietary set of guidelines to avoid such questionable code, developed for embedded systems. Since this standard is proprietary, cppcheck does not display error text by specifying only the number of violated rules (for example, [c2012-21.3]). If you want to display full texts for violated rules, you will need to create a text file containing MISRA rules, which you will have to pass when calling the script with `--rule-texts` key. Some examples of rule texts files available in [tests directory](https://github.com/cppcheck-opensource/cppcheck/blob/main/addons/test/misra/). ++ [y2038.py](https://github.com/cppcheck-opensource/cppcheck/blob/main/addons/y2038.py) + Checks code for [year 2038 problem](https://en.wikipedia.org/wiki/Year_2038_problem) safety. See complete description [here](https://github.com/cppcheck-opensource/cppcheck/blob/main/addons/doc/y2038.md). ++ [threadsafety.py](https://github.com/cppcheck-opensource/cppcheck/blob/main/addons/threadsafety.py) + Analyse Cppcheck dump files to locate threadsafety issues like static local objects used by multiple threads. ++ [naming.py](https://github.com/cppcheck-opensource/cppcheck/blob/main/addons/naming.py) + Enforces naming conventions across the code. ++ [namingng.py](https://github.com/cppcheck-opensource/cppcheck/blob/main/addons/namingng.py) + Enforces naming conventions across the code. Enhanced version with support for type prefixes in variable and function names. ++ [findcasts.py](https://github.com/cppcheck-opensource/cppcheck/blob/main/addons/findcasts.py) + Locates casts in the code. ++ [misc.py](https://github.com/cppcheck-opensource/cppcheck/blob/main/addons/misc.py) + Performs miscellaneous checks. + +### Other files + +- doc + Additional files for documentation generation. +- tests + Contains various unit tests for the addons. +- cppcheck.py + Internal helper used by Cppcheck binary to run the addons. +- cppcheckdata.doxyfile + Configuration file for documentation generation. +- cppcheckdata.py + Helper class for reading Cppcheck dump files within an addon. +- misra_9.py + Implementation of the MISRA 9.x rules used by `misra` addon. +- namingng.config.json + Example configuration for `namingng` addon. +- namingng.json + Example JSON file that can be used using --addon=namingng.json, referring to namingng.py and namingng.config.json +- ROS_naming.json + Example configuration for the `namingng` addon enforcing the [ROS naming convention for C++ ](http://wiki.ros.org/CppStyleGuide#Files). +- runaddon.py + Internal helper used by Cppcheck binary to run the addons. + +## Usage + +### Command line interface + +```bash +cppcheck --addon=misc src/test.c +``` + +For project-wide analysis with compile_commands.json: +```bash +cppcheck --project=build/compile_commands.json --addon=y2038 +``` + +It is also possible to call scripts as follows: +```bash +cppcheck --dump --quiet src/test.c +python misc.py src/test.c.dump +python misra.py --rule-texts=~/misra_rules.txt src/test.c.dump +``` + +This allows you to add additional parameters when calling the script (for example, `--rule-texts` for `misra.py`). The full list of available parameters can be found by calling any script with the `--help` flag. + +### GUI + +When using the graphical interface `cppcheck-gui`, the selection and configuration of addons is carried out on the tab `Addons and tools` in the project settings (`Edit Project File`): + +![Screenshot](https://raw.githubusercontent.com/cppcheck-opensource/cppcheck/main/addons/doc/img/cppcheck-gui-addons.png) + diff --git a/addons/ROS_naming.json b/addons/ROS_naming.json new file mode 100644 index 00000000000..0262d69c09b --- /dev/null +++ b/addons/ROS_naming.json @@ -0,0 +1,24 @@ +{ + "RE_FILE": [".*[A-Z]"], + "RE_NAMESPACE": {".*[A-Z]": [true, "under_scored"], + ".*\\_$": [true, "under_scored"]}, + "RE_FUNCTIONNAME": {".*\\_": [true, "camelCase"], + ".*^[a-z]": [false, "camelCase"]}, + "RE_CLASS_NAME": {".*^[A-Z]": [false, "CamelCase"], + ".*\\_": [true, "CamelCase"]}, + "RE_GLOBAL_VARNAME": {".*^([g]\\_)": [false, "g_under_scored"], + ".*[A-Z]": [true, "g_under_scored"], + ".*\\_$": [true, "g_under_scored"]}, + "RE_VARNAME": {".*^([g]\\_)": [true, "under_scored"], + ".*[A-Z]": [true, "under_scored"], + ".*\\_$": [true, "under_scored"]}, + "RE_PRIVATE_MEMBER_VARIABLE": {".*\\_$": [false, "under_scored_"], + ".*[A-Z]": [true, "under_scored_"]}, + "RE_PUBLIC_MEMBER_VARIABLE": {".*\\_$": [false, "under_scored_"], + ".*[A-Z]": [true, "under_scored_"]}, + "var_prefixes": {"uint32_t": "ui32", + "int*": "intp"}, + "function_prefixes": {"uint16_t": "ui16", + "uint32_t": "ui32"}, + "skip_one_char_variables": false +} \ No newline at end of file diff --git a/htdocs/site/simplepie/cache/dummy.txt b/addons/__init__.py similarity index 100% rename from htdocs/site/simplepie/cache/dummy.txt rename to addons/__init__.py diff --git a/addons/cppcheck.py b/addons/cppcheck.py new file mode 100644 index 00000000000..735269d32c5 --- /dev/null +++ b/addons/cppcheck.py @@ -0,0 +1,41 @@ + +import cppcheckdata +import sys +import os + +__checkers__ = [] + +def checker(f): + __checkers__.append(f) + return f + + +__errorid__ = '' +__addon_name__ = '' +def reportError(location, severity, message, errorId=None): + cppcheckdata.reportError(location, severity, message, __addon_name__, errorId or __errorid__) + +def runcheckers(): + # If there are no checkers then don't run + if len(__checkers__) == 0: + return + global __addon_name__ + global __errorid__ + addon = sys.argv[0] + parser = cppcheckdata.ArgumentParser() + args = parser.parse_args() + + __addon_name__ = os.path.splitext(os.path.basename(addon))[0] + + for dumpfile in args.dumpfile: + if not args.quiet: + print('Checking %s...' % dumpfile) + + data = cppcheckdata.CppcheckData(dumpfile) + + for cfg in data.iterconfigurations(): + if not args.quiet: + print('Checking %s, config %s...' % (dumpfile, cfg.name)) + for c in __checkers__: + __errorid__ = c.__name__ + c(cfg, data) diff --git a/addons/cppcheckdata.doxyfile b/addons/cppcheckdata.doxyfile new file mode 100644 index 00000000000..9fd8eada752 --- /dev/null +++ b/addons/cppcheckdata.doxyfile @@ -0,0 +1,1792 @@ +# Doxyfile 1.8.1.2 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" "). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or sequence of words) that should +# identify the project. Note that if you do not use Doxywizard you need +# to put quotes around the project name if it contains spaces. + +PROJECT_NAME = "cppcheckdata" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer +# a quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is +# included in the documentation. The maximum height of the logo should not +# exceed 55 pixels and the maximum width should not exceed 200 pixels. +# Doxygen will copy the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful if your file system +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding +# "class=itcl::class" will allow you to use the command class in the +# itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this +# tag. The format is ext=language, where ext is a file extension, and language +# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, +# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions +# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all +# comments according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you +# can mix doxygen, HTML, and XML commands with Markdown formatting. +# Disable only in case of backward compatibilities issues. + +MARKDOWN_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also makes the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and +# unions are shown inside the group in which they are included (e.g. using +# @ingroup) instead of on a separate page (for HTML and Man pages) or +# section (for LaTeX and RTF). + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and +# unions with only public data fields will be shown inline in the documentation +# of the scope in which they are defined (i.e. file, namespace, or group +# documentation), provided this scope is documented. If set to NO (the default), +# structs, classes, and unions are shown on a separate page (for HTML and Man +# pages) or section (for LaTeX and RTF). + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penalty. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will roughly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +SYMBOL_CACHE_SIZE = 0 + +# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be +# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given +# their name and scope. Since this can be an expensive process and often the +# same symbol appear multiple times in the code, doxygen keeps a cache of +# pre-resolved symbols. If the cache is too small doxygen will become slower. +# If the cache is too large, memory is wasted. The cache size is given by this +# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespaces are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen +# will sort the (brief and detailed) documentation of class members so that +# constructors and destructors are listed first. If set to NO (the default) +# the constructors will appear in the respective orders defined by +# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. +# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO +# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to +# do proper type resolution of all parameters of a function it will reject a +# match between the prototype and the implementation of a member function even +# if there is only one candidate or it is obvious which candidate to choose +# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen +# will still accept a match between prototype and implementation in such cases. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or macro consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and macros in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. +# You can optionally specify a file name after the option, if omitted +# DoxygenLayout.xml will be used as the name of the layout file. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files +# containing the references data. This must be a list of .bib files. The +# .bib extension is automatically appended if omitted. Using this command +# requires the bibtex tool to be installed. See also +# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this +# feature you need bibtex and perl available in the search path. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# The WARN_NO_PARAMDOC option can be enabled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = cppcheckdata.py + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh +# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py +# *.f90 *.f *.for *.vhd *.vhdl + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty or if +# non of the patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) +# and it is also possible to disable source filtering for a specific pattern +# using *.ext= (so without naming a filter). This option only has effect when +# FILTER_SOURCE_FILES is enabled. + +FILTER_SOURCE_PATTERNS = + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C, C++ and Fortran comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. Note that when using a custom header you are responsible +# for the proper inclusion of any scripts and style sheets that doxygen +# needs, which is dependent on the configuration options used. +# It is advised to generate a default header using "doxygen -w html +# header.html footer.html stylesheet.css YourConfigFile" and then modify +# that header. Note that the header is subject to change so you typically +# have to redo this when upgrading to a newer version of doxygen or when +# changing the value of configuration settings such as GENERATE_TREEVIEW! + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# style sheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that +# the files will be copied as-is; there are no commands or markers available. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. +# Doxygen will adjust the colors in the style sheet and background images +# according to this color. Hue is specified as an angle on a colorwheel, +# see http://en.wikipedia.org/wiki/Hue for more information. +# For instance the value 0 represents red, 60 is yellow, 120 is green, +# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. +# The allowed range is 0 to 359. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of +# the colors in the HTML output. For a value of 0 the output will use +# grayscales only. A value of 255 will produce the most vivid colors. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to +# the luminance component of the colors in the HTML output. Values below +# 100 gradually make the output lighter, whereas values above 100 make +# the output darker. The value divided by 100 is the actual gamma applied, +# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, +# and 100 does not change the gamma. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of +# entries shown in the various tree structured indices initially; the user +# can expand and collapse entries dynamically later on. Doxygen will expand +# the tree to such a level that at most the specified number of entries are +# visible (unless a fully collapsed tree already exceeds this amount). +# So setting the number of entries 1 will produce a full collapsed tree by +# default. 0 is a special value representing an infinite number of entries +# and will result in a full expanded tree by default. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated +# that can be used as input for Qt's qhelpgenerator to generate a +# Qt Compressed Help (.qch) of the generated HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to +# add. For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see +# +# Qt Help Project / Custom Filters. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's +# filter section matches. +# +# Qt Help Project / Filter Attributes. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before +# the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) +# at top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. Since the tabs have the same information as the +# navigation tree you can set this option to NO if you already set +# GENERATE_TREEVIEW to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. +# Since the tree basically has the same information as the tab index you +# could consider to set DISABLE_INDEX to NO when enabling this option. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values +# (range [0,1..20]) that doxygen will group on one line in the generated HTML +# documentation. Note that a value of 0 will completely suppress the enum +# values from appearing in the overview section. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open +# links to external symbols imported via tag files in a separate window. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are +# not supported properly for IE 6.0, but are supported on all modern browsers. +# Note that when changing this option you need to delete any form_*.png files +# in the HTML output before the changes have effect. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax +# (see http://www.mathjax.org) which uses client side Javascript for the +# rendering instead of using prerendered bitmaps. Use this if you do not +# have LaTeX installed or if you want to formulas look prettier in the HTML +# output. When enabled you may also need to install MathJax separately and +# configure the path to it using the MATHJAX_RELPATH option. + +USE_MATHJAX = NO + +# When MathJax is enabled you need to specify the location relative to the +# HTML output directory using the MATHJAX_RELPATH option. The destination +# directory should contain the MathJax.js script. For instance, if the mathjax +# directory is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to +# the MathJax Content Delivery Network so you can quickly see the result without +# installing MathJax. +# However, it is strongly recommended to install a local +# copy of MathJax from http://www.mathjax.org before deployment. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension +# names that should be enabled during MathJax rendering. + +MATHJAX_EXTENSIONS = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box +# for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using +# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be +# implemented using a PHP enabled web server instead of at the web client +# using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server +# based approach is that it scales better to large projects and allows +# full text search. The disadvantages are that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4 + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for +# the generated latex document. The footer should contain everything after +# the last chapter. If it is left blank doxygen will generate a +# standard footer. Notice: only use this tag if you know what you are doing! + +LATEX_FOOTER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = NO + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include +# source code with syntax highlighting in the LaTeX output. +# Note that which sources are shown also depends on other settings +# such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +# The LATEX_BIB_STYLE tag can be used to specify the style to use for the +# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See +# http://en.wikipedia.org/wiki/BibTeX for more info. + +LATEX_BIB_STYLE = plain + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load style sheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# pointed to by INCLUDE_PATH will be searched when a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition that +# overrules the definition found in the source code. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all references to function-like macros +# that are alone on a line, have an all uppercase name, and do not end with a +# semicolon, because these will confuse the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. For each +# tag file the location of the external documentation should be added. The +# format of a tag file without this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths +# or URLs. Note that each tag file must have a unique name (where the name does +# NOT include the path). If a tag file is not located in the directory in which +# doxygen is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option also works with HAVE_DOT disabled, but it is recommended to +# install and use dot, since it yields more powerful graphs. + +CLASS_DIAGRAMS = NO + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is +# allowed to run in parallel. When set to 0 (the default) doxygen will +# base this on the number of processors available in the system. You can set it +# explicitly to a value larger than 0 to get control over the balance +# between CPU load and processing speed. + +DOT_NUM_THREADS = 0 + +# By default doxygen will use the Helvetica font for all dot files that +# doxygen generates. When you want a differently looking font you can specify +# the font name using DOT_FONTNAME. You need to make sure dot is able to find +# the font, which can be done by putting it in a standard location or by setting +# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the +# directory containing the font. + +DOT_FONTNAME = Helvetica + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the Helvetica font. +# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to +# set the path where dot can find it. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If the UML_LOOK tag is enabled, the fields and methods are shown inside +# the class node. If there are many fields or methods and many nodes the +# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS +# threshold limits the number of items for each type to make the size more +# manageable. Set this to 0 for no limit. Note that the threshold may be +# exceeded by 50% before the limit is enforced. + +UML_LIMIT_NUM_FIELDS = 10 + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will generate a graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = NO + +# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = NO + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are svg, png, jpg, or gif. +# If left blank png will be used. If you choose svg you need to set +# HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible in IE 9+ (other browsers do not have this requirement). + +DOT_IMAGE_FORMAT = png + +# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to +# enable generation of interactive SVG images that allow zooming and panning. +# Note that this requires a modern browser other than Internet Explorer. +# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you +# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files +# visible. Older versions of IE do not have SVG support. + +INTERACTIVE_SVG = NO + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MSCFILE_DIRS tag can be used to specify one or more directories that +# contain msc files that are included in the documentation (see the +# \mscfile command). + +MSCFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = NO + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = NO diff --git a/addons/cppcheckdata.py b/addons/cppcheckdata.py new file mode 100755 index 00000000000..06028e2005c --- /dev/null +++ b/addons/cppcheckdata.py @@ -0,0 +1,1727 @@ +""" +cppcheckdata + +This is a Python module that helps you access Cppcheck dump data. + +License: No restrictions, use this as you need. +""" + +import argparse +import json +import os +import sys +import subprocess + +try: + import pathlib +except ImportError: + message = "Failed to load pathlib. Upgrade Python to 3.x or install pathlib with 'pip install pathlib'." + error_id = 'pythonError' + if '--cli' in sys.argv: + msg = { 'file': '', + 'linenr': 0, + 'column': 0, + 'severity': 'error', + 'message': message, + 'addon': 'cppcheckdata', + 'errorId': error_id, + 'extra': ''} + sys.stdout.write(json.dumps(msg) + '\n') + else: + sys.stderr.write('%s [%s]\n' % (message, error_id)) + sys.exit(1) + +from xml.etree import ElementTree +from fnmatch import fnmatch + +EXIT_CODE = 0 + +current_dumpfile_suppressions = [] + +def _load_location(location, element): + """Load location from element/dict""" + location.file = element.get('file') + line = element.get('line') + if line is None: + line = element.get('linenr') + if line is None: + line = '0' + location.linenr = int(line) + location.column = int(element.get('column', '0')) + + +class Location: + """Utility location class""" + file = None + linenr = None + column = None + def __init__(self, element): + _load_location(self, element) + + +class Directive: + """ + Directive class. Contains information about each preprocessor directive in the source code. + + Attributes: + str The directive line, with all C or C++ comments removed + file Name of (possibly included) file where directive is defined + linenr Line number in (possibly included) file where directive is defined + + To iterate through all directives use such code: + @code + data = cppcheckdata.parsedump(...) + for cfg in data.configurations: + for directive in cfg.directives: + print(directive.str) + @endcode + """ + #preprocessor.cpp/Preprocessor::dump + + str = None + file = None + linenr = None + column = None + + def __init__(self, element): + self.str = element.get('str') + _load_location(self, element) + + def __repr__(self): + attrs = ["str", "file", "linenr"] + return "{}({})".format( + "Directive", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + +class MacroUsage: + """ + Tracks preprocessor macro usage + + Attributes: + name Name of the macro + usefile + useline + usecolumn + isKnownValue + """ + #preprocessor.cpp/Preprocessor::dump + + name = None # Macro name + file = None + linenr = None + column = None + usefile = None + uselinenr = None + usecolumn = None + + def __init__(self, element): + self.name = element.get('name') + _load_location(self, element) + self.usefile = element.get('usefile') + self.useline = element.get('useline') + self.usecolumn = element.get('usecolumn') + self.isKnownValue = element.get('is-known-value', 'false') == 'true' + + def __repr__(self): + attrs = ["name", "file", "linenr", "column", "usefile", "useline", "usecolumn", "isKnownValue"] + return "{}({})".format( + "MacroUsage", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + +class PreprocessorIfCondition: + """ + Information about #if/#elif conditions + + Attributes: + E + result + """ + #preprocessor.cpp/Preprocessor::dump + + file = None + linenr = None + column = None + E = None + result = None + + def __init__(self, element): + _load_location(self, element) + self.E = element.get('E') + self.result = int(element.get('result')) + + def __repr__(self): + attrs = ["file", "linenr", "column", "E", "result"] + return "{}({})".format( + "PreprocessorIfCondition", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + +class ValueType: + """ + ValueType class. Contains (promoted) type information for each node in the AST. + + Attributes: + type nonstd/pod/record/smart-pointer/container/iterator/void/bool/char/short/wchar_t/int/long/long long/unknown int/float/double/long double + sign signed/unsigned + bits bit count for bit-fields, otherwise None + pointer + constness + reference + typeScopeId + originalTypeName bool/const char */long/char */size_t/int/double/std::string/.. + + """ + #symboldatabase.cpp/ValueType::dump + + type = None + sign = None + bits = None + constness = 0 + pointer = 0 + typeScopeId = None + typeScope = None + originalTypeName = None + + def __init__(self, element): + self.type = element.get('valueType-type') + self.sign = element.get('valueType-sign') + self.bits = element.get('valueType-bits', None) + self.bits = int(self.bits) if self.bits else None + self.pointer = int(element.get('valueType-pointer', 0)) + self.constness = int(element.get('valueType-constness', 0)) + self.reference = element.get('valueType-reference') + self.typeScopeId = element.get('valueType-typeScope') + self.originalTypeName = element.get('valueType-originalTypeName') + #valueType-containerId TODO add + + + def __repr__(self): + attrs = ["type", "sign", "bits", "typeScopeId", "originalTypeName", + "constness", "pointer"] + return "{}({})".format( + "ValueType", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + + def setId(self, IdMap): + self.typeScope = IdMap[self.typeScopeId] + + def isIntegral(self): + return self.type in {'bool', 'char', 'short', 'int', 'long', 'long long'} + + def isFloat(self): + return self.type in {'float', 'double', 'long double'} + + def isEnum(self): + return self.typeScope and self.typeScope.type == "Enum" + + +class Token: + """ + Token class. Contains information about each token in the source code. + + The CppcheckData.tokenlist is a list of Token items + + C++ class: https://cppcheck.sourceforge.io/devinfo/doxyoutput/classToken.html + + Attributes: + str Token string + next Next token in tokenlist. For last token, next is None. + previous Previous token in tokenlist. For first token, previous is None. + link Linked token in tokenlist. Each '(', '[' and '{' are linked to the + corresponding '}', ']' and ')'. For templates, the '<' is linked to + the corresponding '>'. + scope Scope information for this token. See the Scope class. + type Type information: name/op/number/string/.. + isName Is this token a symbol name + isUnsigned Is this token a unsigned type + isSigned Is this token a signed type + isNumber Is this token a number, for example 123, 12.34 + isInt Is this token a int value such as 1234 + isFloat Is this token a float value such as 12.34 + isString Is this token a string literal such as "hello" + strlen string length for string literal + isChar Is this token a char literal such as 'x' + isBoolean Is this token a boolean + isOp Is this token a operator + isArithmeticalOp Is this token a arithmetic operator + isAssignmentOp Is this token a assignment operator + isComparisonOp Is this token a comparison operator + isLogicalOp Is this token a logical operator: && || + isCast + externLang + isExpandedMacro Is this token a expanded macro token + macroName Macro name that this token is expanded from + isRemovedVoidParameter Has void parameter been removed? + isSplittedVarDeclComma Is this a comma changed to semicolon in a split variable declaration ('int a,b;' => 'int a; int b;') + isSplittedVarDeclEq Is this a '=' changed to semicolon in a split variable declaration ('int a=5;' => 'int a; a=5;') + isImplicitInt Is this token an implicit "int"? + isComplex + isRestrict + isAttributeExport + isAnonymous + varId varId for token, each variable has a unique non-zero id + exprId exprId for token, each expression has a unique non-zero id + variable Variable information for this token. See the Variable class. + function If this token points at a function call, this attribute has the Function + information. See the Function class. + values Possible/Known values of token + typeScope type scope (token->type()->classScope) + astParent ast parent + astOperand1 ast operand1 + astOperand2 ast operand2 + orriginalName original name of the token + valueType type information: container/.. + file file name + linenr line number + column column + + To iterate through all tokens use such code: + @code + data = cppcheckdata.parsedump(...) + for cfg in data.configurations: + code = '' + for token in cfg.tokenlist: + code = code + token.str + ' ' + print(code) + @endcode + """ + #tokenize.cpp/Tokenizer::dump + + Id = None + str = None + next = None + previous = None + linkId = None + link = None + scopeId = None + scope = None + isName = False + isNumber = False + isInt = False + isFloat = False + isString = False + strlen = None + isChar = False + isBoolean = False + isOp = False + isArithmeticalOp = False + isAssignmentOp = False + isComparisonOp = False + isLogicalOp = False + isCast = False + isUnsigned = False + isSigned = False + macroName = None + isExpandedMacro = False + isRemovedVoidParameter = False + isSplittedVarDeclComma = False + isSplittedVarDeclEq = False + isImplicitInt = False + isComplex = False + isRestrict = False + isAttributeExport = False + isAnonymous = False + exprId = None + varId = None + variableId = None + variable = None + functionId = None + function = None + valuesId = None + values = None + impossible_values = None + valueType = None + + typeScopeId = None + typeScope = None + type = None + + astParentId = None + astParent = None + astOperand1Id = None + astOperand1 = None + astOperand2Id = None + astOperand2 = None + + file = None + linenr = None + column = None + + def __init__(self, element): + self.Id = element.get('id') + self.str = element.get('str') + self.next = None + self.previous = None + self.scopeId = element.get('scope') + self.scope = None + self.type = element.get('type') + if self.type == 'name': + self.isName = True + if element.get('isUnsigned'): + self.isUnsigned = True + if element.get('isSigned'): + self.isSigned = True + elif self.type == 'number': + self.isNumber = True + if element.get('isInt'): + self.isInt = True + elif element.get('isFloat'): + self.isFloat = True + elif self.type == 'string': + self.isString = True + self.strlen = int(element.get('strlen')) + elif self.type == 'char': + self.isChar = True + elif self.type == 'boolean': + self.isBoolean = True + elif self.type == 'op': + self.isOp = True + if element.get('isArithmeticalOp'): + self.isArithmeticalOp = True + elif element.get('isAssignmentOp'): + self.isAssignmentOp = True + elif element.get('isComparisonOp'): + self.isComparisonOp = True + elif element.get('isLogicalOp'): + self.isLogicalOp = True + if element.get('isCast'): + self.isCast = True + self.externLang = element.get('externLang') + self.macroName = element.get('macroName') + if self.macroName or element.get('isExpandedMacro'): + self.isExpandedMacro = True + if element.get('isRemovedVoidParameter'): + self.isRemovedVoidParameter = True + if element.get('isSplittedVarDeclComma'): + self.isSplittedVarDeclComma = True + if element.get('isSplittedVarDeclEq'): + self.isSplittedVarDeclEq = True + if element.get('isImplicitInt'): + self.isImplicitInt = True + if element.get('isComplex'): + self.isComplex = True + if element.get('isRestrict'): + self.isRestrict = True + if element.get('isAttributeExport'): + self.isAttributeExport = True + if element.get('isAnonymous'): + self.isAnonymous = True + self.linkId = element.get('link') + self.link = None + if element.get('varId'): + self.varId = int(element.get('varId')) + if element.get('exprId'): + self.exprId = int(element.get('exprId')) + self.variableId = element.get('variable') + self.variable = None + self.functionId = element.get('function') + self.function = None + self.valuesId = element.get('values') + self.values = None + self.typeScopeId = element.get('type-scope') + self.typeScope = None + self.astParentId = element.get('astParent') + self.astParent = None + self.astOperand1Id = element.get('astOperand1') + self.astOperand1 = None + self.astOperand2Id = element.get('astOperand2') + self.astOperand2 = None + self.originalName = element.get('originalName') + if element.get('valueType-type'): + self.valueType = ValueType(element) + else: + self.valueType = None + _load_location(self, element) + + def __repr__(self): + attrs = ["Id", "str", "scopeId", "isName", "isUnsigned", "isSigned", + "isNumber", "isInt", "isFloat", "isString", "strlen", + "isChar", "isBoolean", "isOp", "isArithmeticalOp", "isAssignmentOp", + "isComparisonOp", "isLogicalOp", "isCast", "externLang", "isExpandedMacro", + "isRemovedVoidParameter", "isSplittedVarDeclComma", "isSplittedVarDeclEq", + "isImplicitInt", "isComplex", "isRestrict", "isAttributeExport", "isAnonymous", "linkId", + "varId", "variableId", "functionId", "valuesId", "valueType", + "typeScopeId", "astParentId", "astOperand1Id", "file", + "linenr", "column"] + return "{}({})".format( + "Token", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + def setId(self, IdMap): + self.scope = IdMap[self.scopeId] + self.link = IdMap[self.linkId] + self.variable = IdMap[self.variableId] + self.function = IdMap[self.functionId] + self.values = [] + self.impossible_values = [] + if IdMap[self.valuesId]: + for v in IdMap[self.valuesId]: + if v.isImpossible(): + self.impossible_values.append(v) + else: + self.values.append(v) + v.setId(IdMap) + self.typeScope = IdMap[self.typeScopeId] + self.astParent = IdMap[self.astParentId] + self.astOperand1 = IdMap[self.astOperand1Id] + self.astOperand2 = IdMap[self.astOperand2Id] + if self.valueType: + self.valueType.setId(IdMap) + + def getValue(self, v): + """ + Get value if it exists + Returns None if it doesn't exist + """ + + if not self.values: + return None + for value in self.values: + if value.intvalue == v: + return value + return None + + def getKnownIntValue(self): + """ + If token has a known int value then return that. + Otherwise returns None + """ + if not self.values: + return None + for value in self.values: + if value.valueKind == 'known': + return value.intvalue + return None + + def isUnaryOp(self, op): + return self.astOperand1 and (self.astOperand2 is None) and self.str == op + + def isBinaryOp(self): + return self.astOperand1 and self.astOperand2 + + def forward(self, end=None): + token = self + while token and token != end: + yield token + token = token.next + + def backward(self, start=None): + token = self + while token and token != start: + yield token + token = token.previous + + def astParents(self): + token = self + while token and token.astParent: + token = token.astParent + yield token + + def astTop(self): + top = None + for parent in self.astParents(): + top = parent + return top + + def tokAt(self, n): + tl = self.forward() + if n < 0: + tl = self.backward() + n = -n + for i, t in enumerate(tl): + if i == n: + return t + return None + + def linkAt(self, n): + token = self.tokAt(n) + if token: + return token.link + return None + +class Scope: + """ + Scope. Information about global scope, function scopes, class scopes, inner scopes, etc. + C++ class: https://cppcheck.sourceforge.io/devinfo/doxyoutput/classScope.html + + Attributes + bodyStart The { Token for this scope + bodyEnd The } Token for this scope + className Name of this scope. + For a function scope, this is the function name; + For a class scope, this is the class name. + function If this scope belongs at a function call, this attribute + has the Function information. See the Function class. + functions if this is a Class type, it may have functions defined + nestedIn + type Type of scope: Function, If/Else/For/While/Switch/Global/Enum/Struct/Namespace/Class/Constructor/Destructor + isExecutable True when the type is: Function/If/Else/For/While/Do/Switch/Try/Catch/Unconditional/Lambda + definedType + """ + #symboldatabase.cpp/SymbolDatabase::printXml + + Id = None + bodyStartId = None + bodyStart = None + bodyEndId = None + bodyEnd = None + className = None + functionId = None + function = None + nestedInId = None + nestedIn = None + nestedList = None + type = None + isExecutable = None + varlistId = None + varlist = None + + def __init__(self, element): + self.Id = element.get('id') + self.className = element.get('className') + self.functionId = element.get('function') + self.function = None + self.functions = [] + self.bodyStartId = element.get('bodyStart') + self.bodyStart = None + self.bodyEndId = element.get('bodyEnd') + self.bodyEnd = None + self.nestedInId = element.get('nestedIn') + self.nestedIn = None + self.nestedList = [] + self.type = element.get('type') + self.definedType = element.get('definedType') + self.isExecutable = (self.type in ('Function', 'If', 'Else', 'For', 'While', 'Do', + 'Switch', 'Try', 'Catch', 'Unconditional', 'Lambda')) + + self.varlistId = [] + self.varlist = [] + + def __repr__(self): + attrs = ["Id", "className", "functionId", "bodyStartId", "bodyEndId", + "nestedInId", "nestedIn", "type", "definedType", "isExecutable", "functions"] + return "{}({})".format( + "Scope", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + def setId(self, IdMap): + self.bodyStart = IdMap[self.bodyStartId] + self.bodyEnd = IdMap[self.bodyEndId] + self.nestedIn = IdMap[self.nestedInId] + if self.nestedIn: + self.nestedIn.nestedList.append(self) + self.function = IdMap[self.functionId] + for v in self.varlistId: + value = IdMap.get(v) + if value: + self.varlist.append(value) + + +class Function: + """ + Information about a function + C++ class: + https://cppcheck.sourceforge.io/devinfo/doxyoutput/classFunction.html + + Attributes + argument Argument list (dict of argument number and variable) + token Token in function implementation + tokenDef Token in function definition + name + type Constructor/CopyConstructor/MoveConstructor/OperatorEqual/Destructor/Function/Lambda/Unknown + hasVirtualSpecifier Is this function is virtual + isImplicitlyVirtual Is this function is virtual this in the base classes + access Public/Protected/Private + isInlineKeyword Is inline keyword used + isStatic Is this function static + isAttributeNoreturn + overriddenFunction + """ + #symboldatabase.cpp/SymbolDatabase::printXml + + Id = None + argument = None + argumentId = None + token = None + tokenId = None + tokenDef = None + tokenDefId = None + name = None + type = None + access = None + isImplicitlyVirtual = None + hasVirtualSpecifier = None + isInlineKeyword = None + isStatic = None + isAttributeNoreturn = None + overriddenFunction = None + nestedIn = None + + def __init__(self, element, nestedIn): + self.Id = element.get('id') + self.tokenId = element.get('token') + self.tokenDefId = element.get('tokenDef') + self.name = element.get('name') + self.type = element.get('type') + self.hasVirtualSpecifier = element.get('hasVirtualSpecifier', 'false') == 'true' + self.isImplicitlyVirtual = element.get('isImplicitlyVirtual', 'false') == 'true' + self.access = element.get('access') + self.isInlineKeyword = element.get('isInlineKeyword', 'false') == 'true' + self.isStatic = element.get('isStatic', 'false') == 'true' + self.isAttributeNoreturn = element.get('isAttributeNoreturn', 'false') == 'true' + self.overriddenFunction = element.get('overriddenFunction', 'false') == 'true' + self.nestedIn = nestedIn + + self.argument = {} + self.argumentId = {} + + def __repr__(self): + attrs = ["Id", "tokenId", "tokenDefId", "name", "type", "hasVirtualSpecifier", + "isImplicitlyVirtual", "access", "isInlineKeyword", "isStatic", + "isAttributeNoreturn", "overriddenFunction", "nestedIn", "argumentId"] + return "{}({})".format( + "Function", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + def setId(self, IdMap): + for argnr, argid in self.argumentId.items(): + self.argument[argnr] = IdMap[argid] + self.token = IdMap.get(self.tokenId, None) + self.tokenDef = IdMap[self.tokenDefId] + + +#todo add class Types: + #symboldatabase.cpp/SymbolDatabase::printXml + + +class Variable: + """ + Information about a variable + C++ class: + https://cppcheck.sourceforge.io/devinfo/doxyoutput/classVariable.html + + Attributes: + nameToken Name token in variable declaration + typeStartToken Start token of variable declaration + typeEndToken End token of variable declaration + access Global/Local/Namespace/Public/Protected/Public/Throw/Argument/Unknown + scope Variable scope + constness Variable constness (same encoding as ValueType::constness) + isArgument Is this variable a function argument? + isGlobal Is this variable a global variable? + isLocal Is this variable a local variable? + isArray Is this variable an array? + isClass Is this variable a class or struct? + isConst Is this variable a const variable? + isExtern Is this variable an extern variable? + isPointer Is this variable a pointer + isReference Is this variable a reference + isStatic Is this variable static? + isVolatile Is this variable volatile? + """ + #symboldatabase.cpp/SymbolDatabase::printXml + + Id = None + nameTokenId = None + nameToken = None + typeStartTokenId = None + typeStartToken = None + typeEndTokenId = None + typeEndToken = None + access = None + scopeId = None + scope = None + isArgument = False + isArray = False + isClass = False + isConst = False + isExtern = False + isGlobal = False + isLocal = False + isPointer = False + isReference = False + isStatic = False + isVolatile = False + constness = 0 + + def __init__(self, element): + self.Id = element.get('id') + self.nameTokenId = element.get('nameToken') + self.nameToken = None + self.typeStartTokenId = element.get('typeStartToken') + self.typeStartToken = None + self.typeEndTokenId = element.get('typeEndToken') + self.typeEndToken = None + self.access = element.get('access') + self.isArgument = (self.access and self.access == 'Argument') + self.isGlobal = (self.access and self.access == 'Global') + self.isLocal = (self.access and self.access == 'Local') + self.scopeId = element.get('scope') + self.scope = None + self.constness = int(element.get('constness',0)) + self.isArray = element.get('isArray') == 'true' + self.isClass = element.get('isClass') == 'true' + self.isConst = element.get('isConst') == 'true' + self.isExtern = element.get('isExtern') == 'true' + self.isPointer = element.get('isPointer') == 'true' + self.isReference = element.get('isReference') == 'true' + self.isStatic = element.get('isStatic') == 'true' + self.isVolatile = element.get('isVolatile') == 'true' + + def __repr__(self): + attrs = ["Id", "nameTokenId", "typeStartTokenId", "typeEndTokenId", + "access", "scopeId", "isArgument", "isArray", "isClass", + "isConst", "isGlobal", "isExtern", "isLocal", "isPointer", + "isReference", "isStatic", "isVolatile", "constness"] + return "{}({})".format( + "Variable", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + def setId(self, IdMap): + self.nameToken = IdMap[self.nameTokenId] + self.typeStartToken = IdMap[self.typeStartTokenId] + self.typeEndToken = IdMap[self.typeEndTokenId] + self.scope = IdMap[self.scopeId] + +class Container: + """ + Container class -- information about containers + + Attributes: + array-like-index-op true/false + stdStringLike true/false + """ + #tokenizer.cpp/tokenizer::dump + Id = None + + def __init__(self, element): + self.Id = element.get('id') + self.arrayLikeIndexOp = element.get('array-like-index-op') == 'true' + self.stdStringLike = element.get('std-string-like') == 'true' + +class TypedefInfo: + """ + TypedefInfo class -- information about typedefs + + Attributes: + name name of the typedef + used 0/1 + """ + #tokenizer.cpp/tokenizer::dump + + name = None + used = None + file = None + linenr = None + column = None + + def __init__(self, element): + self.name = element.get('name') + _load_location(self, element) + self.used = (element.get('used') == '1') + +class Value: + """ + Value class + + Attributes: + intvalue integer value + tokvalue token value + floatvalue float value + movedvalue + uninit + containerSize container size + bufferSize buffer size + lifetimeScope Local/Argument/SubFunction/ThisPointer/ThisValue + lifetimeKind Object/SubObject/Lambda/Iterator/Address + symbolicDelta + condition condition where this Value comes from + bound Upper/Lower/Point + valueKind known/possible/impossible/inconclusive + path 0/1/2/3/.. + """ + #token.cpp/token::printValueFlow + + intvalue = None + tokvalue = None + floatvalue = None + containerSize = None + condition = None + valueKind = None + + def isKnown(self): + return self.valueKind and self.valueKind == 'known' + + def isPossible(self): + return self.valueKind and self.valueKind == 'possible' + + def isImpossible(self): + return self.valueKind and self.valueKind == 'impossible' + + def isInconclusive(self): + return self.valueKind and self.valueKind == 'inconclusive' + + def __init__(self, element): + self.intvalue = element.get('intvalue') + if self.intvalue: + self.intvalue = int(self.intvalue) + self._tokvalueId = element.get('tokvalue') + self.floatvalue = element.get('floatvalue') + self.movedvalue = element.get('movedvalue') + self.uninit = element.get('uninit') + self.bufferSize = element.get('buffer-size') + self.containerSize = element.get('container-size') + self.iteratorStart = element.get('iterator-start') + self.iteratorEnd = element.get('iterator-end') + self._lifetimeId = element.get('lifetime') + self.lifetimeScope = element.get('lifetime-scope') + self.lifetimeKind = element.get('lifetime-kind') + self._symbolicId = element.get('symbolic') + self.symbolicDelta = element.get('symbolic-delta') + self.bound = element.get('bound') + self.condition = element.get('condition-line') + if self.condition: + self.condition = int(self.condition) + if element.get('known'): + self.valueKind = 'known' + elif element.get('possible'): + self.valueKind = 'possible' + elif element.get('impossible'): + self.valueKind = 'impossible' + elif element.get('inconclusive'): + self.valueKind = 'inconclusive' + self.path = element.get('path') + + def setId(self, IdMap): + self.tokvalue = IdMap.get(self._tokvalueId) + self.lifetime = IdMap.get(self._lifetimeId) + self.symbolic = IdMap.get(self._symbolicId) + + def __repr__(self): + attrs = ["intvalue", "tokvalue", "floatvalue", "movedvalue", "uninit", + "bufferSize", "containerSize", "condition", "valueKind"] + return "{}({})".format( + "Value", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + +class ValueFlow: + """ + ValueFlow::Value class + Each possible value has a ValueFlow::Value item. + Each ValueFlow::Value either has a intvalue or tokvalue + C++ class: + https://cppcheck.sourceforge.io/devinfo/doxyoutput/classValueFlow_1_1Value.html + + Attributes: + values Possible values + """ + + Id = None + values = None + + def __init__(self, element): + self.Id = element.get('id') + self.values = [] + + def __repr__(self): + attrs = ["Id", "values"] + return "{}({})".format( + "ValueFlow", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + +class Suppression: + """ + Suppression class + This class contains a suppression entry to suppress a warning. + + Attributes + errorId The id string of the error to suppress, can be a wildcard + fileName The name of the file to suppress warnings for, can include wildcards + lineNumber The number of the line to suppress warnings from, can be 0 to represent any line + symbolName The name of the symbol to match warnings for, can include wildcards + lineBegin The first line to suppress warnings from + lineEnd The last line to suppress warnings from + suppressionType The type of suppression which is applied (unique = None (default), file, block, blockBegin, blockEnd, macro) + """ + + errorId = None + fileName = None + lineNumber = None + symbolName = None + lineBegin = None + lineEnd = None + suppressionType = None + + def __init__(self, element): + self.errorId = element.get('errorId') + self.fileName = element.get('fileName') + self.lineNumber = element.get('lineNumber') + self.symbolName = element.get('symbolName') + self.lineBegin = element.get('lineBegin') + self.lineEnd = element.get('lineEnd') + self.suppressionType = element.get('type') + + def __repr__(self): + attrs = ["errorId", "fileName", "lineNumber", "symbolName", "lineBegin", "lineEnd","suppressionType"] + return "{}({})".format( + "Suppression", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + def isMatch(self, file, line, message, errorId): + # Line Suppression + if ((self.fileName is None or fnmatch(file, self.fileName)) + and (self.suppressionType is None) # Verify use of default suppression type (None = unique) + and (self.lineNumber is not None and int(line) == int(self.lineNumber)) + and (self.symbolName is None or fnmatch(message, '*'+self.symbolName+'*')) + and fnmatch(errorId, self.errorId)): + return True + # File Suppression + if ((self.fileName is None or fnmatch(file, self.fileName)) + and (self.suppressionType is not None and self.suppressionType == "file") # Verify use of file (global) suppression type + and (self.symbolName is None or fnmatch(message, '*'+self.symbolName+'*')) + and fnmatch(errorId, self.errorId)): + return True + # Block Suppression Mode + if ((self.fileName is None or fnmatch(file, self.fileName)) + and (self.suppressionType is not None and self.suppressionType == "block") # Type for Block suppression + and (self.lineBegin is not None and int(line) > int(self.lineBegin)) # Code Match is between the Block suppression + and (self.lineEnd is not None and int(line) < int(self.lineEnd)) # Code Match is between the Block suppression + and (self.symbolName is None or fnmatch(message, '*'+self.symbolName+'*')) + and fnmatch(errorId, self.errorId)): + return True + # Other Suppression (Globally set via suppression file or cli command) + if ((self.fileName is None or fnmatch(file, self.fileName)) + and (self.suppressionType is None) + and (self.symbolName is None or fnmatch(message, '*'+self.symbolName+'*')) + and fnmatch(errorId, self.errorId)): + return True + return False + + +class Configuration: + """ + Configuration class + This class contains the directives, tokens, scopes, functions, + variables, value flows, and suppressions for one configuration. + + Attributes: + name Name of the configuration, "" for default + directives List of Directive items + macro_usage List of used macros + preprocessor_if_conditions List of preprocessor if conditions that was evaluated during preprocessing + tokenlist List of Token items + scopes List of Scope items + containers List of Container items + functions List of Function items + variables List of Variable items + valueflow List of ValueFlow values + standards List of Standards values + """ + + name = '' + directives = [] + macro_usage = [] + preprocessor_if_conditions = [] + tokenlist = [] + scopes = [] + containers = [] + functions = [] + variables = [] + typedefInfo = [] + valueflow = [] + standards = None + clang_warnings = [] + + def __init__(self, name): + self.name = name + self.directives = [] + self.macro_usage = [] + self.preprocessor_if_conditions = [] + self.tokenlist = [] + self.scopes = [] + self.containers = [] + self.functions = [] + self.variables = [] + self.typedefInfo = [] + self.valueflow = [] + self.standards = Standards() + self.clang_warnings = [] + + def set_tokens_links(self): + """Set next/previous links between tokens.""" + prev = None + for token in self.tokenlist: + token.previous = prev + if prev: + prev.next = token + prev = token + + def set_id_map(self, arguments): + IdMap = {None: None, '0': None, '00000000': None, '0000000000000000': None, '0x0': None} + for token in self.tokenlist: + IdMap[token.Id] = token + for scope in self.scopes: + IdMap[scope.Id] = scope + for container in self.containers: + IdMap[container.Id] = container + for function in self.functions: + IdMap[function.Id] = function + for variable in self.variables: + IdMap[variable.Id] = variable + for variable in arguments: + IdMap[variable.Id] = variable + for values in self.valueflow: + IdMap[values.Id] = values.values + for token in self.tokenlist: + token.setId(IdMap) + for scope in self.scopes: + scope.setId(IdMap) + #for container in self.containers: + # container.setId(IdMap) + for function in self.functions: + function.setId(IdMap) + for variable in self.variables: + variable.setId(IdMap) + for variable in arguments: + variable.setId(IdMap) + + def setIdMap(self, functions_arguments): + """Set relationships between objects stored in this configuration. + :param functions_arguments: List of Variable objects which are function arguments + """ + self.set_tokens_links() + self.set_id_map(functions_arguments) + + +class Platform: + """ + Platform class + This class contains type sizes + + Attributes: + name Name of the platform: unspecified/native/win32A/win32W/win64/unix32/unix64/platformFile + char_bit CHAR_BIT value + short_bit SHORT_BIT value + int_bit INT_BIT value + long_bit LONG_BIT value + long_long_bit LONG_LONG_BIT value + pointer_bit POINTER_BIT value + """ + + name = '' + char_bit = 0 + short_bit = 0 + int_bit = 0 + long_bit = 0 + long_long_bit = 0 + pointer_bit = 0 + + def __init__(self, platformnode): + self.name = platformnode.get('name') + self.char_bit = int(platformnode.get('char_bit')) + self.short_bit = int(platformnode.get('short_bit')) + self.int_bit = int(platformnode.get('int_bit')) + self.long_bit = int(platformnode.get('long_bit')) + self.long_long_bit = int(platformnode.get('long_long_bit')) + self.pointer_bit = int(platformnode.get('pointer_bit')) + + def __repr__(self): + attrs = ["name", "char_bit", "short_bit", "int_bit", + "long_bit", "long_long_bit", "pointer_bit"] + return "{}({})".format( + "Platform", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + +class Standards: + """ + Standards class + This class contains versions of standards that were used for the cppcheck + + Attributes: + c C Standard used + cpp C++ Standard used + posix If Posix was used + """ + + c = "" + cpp = "" + posix = False + + def set_c(self, node): + self.c = node.get("version") + + def set_cpp(self, node): + self.cpp = node.get("version") + + def set_posix(self, node): + self.posix = node.get("posix") is not None + + def __repr__(self): + attrs = ["c", "cpp", "posix"] + return "{}({})".format( + "Standards", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + +class CppcheckData: + """ + Class that makes cppcheck dump data available + Contains a list of Configuration instances + + Attributes: + filename Path to Cppcheck dump file + rawTokens List of rawToken elements + suppressions List of Suppressions + files Source files for elements occurred in this configuration + + To iterate through all configurations use such code: + @code + data = cppcheckdata.parsedump(...) + for cfg in data.configurations: + print('cfg: ' + cfg.name) + @endcode + + To iterate through all tokens in each configuration use such code: + @code + data = cppcheckdata.parsedump(...) + for cfg in data.configurations: + print('cfg: ' + cfg.name) + code = '' + for token in cfg.tokenlist: + code = code + token.str + ' ' + print(' ' + code) + @endcode + + To iterate through all scopes (functions, types, etc) use such code: + @code + data = cppcheckdata.parsedump(...) + for cfg in data.configurations: + print('cfg: ' + cfg.name) + for scope in cfg.scopes: + print(' type:' + scope.type + ' name:' + scope.className) + @endcode + """ + + def __init__(self, filename): + """ + :param filename: Path to Cppcheck dump file + """ + self.language = None + self.filename = filename + self.rawTokens = [] + self.platform = None + self.suppressions = [] + self.files = [] # source files for elements occurred in this configuration + + platform_done = False + rawtokens_done = False + suppressions_done = False + + # Parse general configuration options from node + # We intentionally don't clean node resources here because we + # want to serialize in memory only small part of the XML tree. + for event, node in ElementTree.iterparse(self.filename, events=('start', 'end')): + if platform_done and rawtokens_done and suppressions_done: + break + if node.tag == 'dumps': + self.language = node.get('language') + if node.tag == 'platform' and event == 'start': + self.platform = Platform(node) + platform_done = True + elif node.tag == 'rawtokens' and event == 'end': + for rawtokens_node in node: + if rawtokens_node.tag == 'file': + self.files.append(rawtokens_node.get('name')) + elif rawtokens_node.tag == 'tok': + tok = Token(rawtokens_node) + tok.file = self.files[int(rawtokens_node.get('fileIndex'))] + self.rawTokens.append(tok) + rawtokens_done = True + elif node.tag == 'suppressions' and event == 'end': + for suppressions_node in node: + self.suppressions.append(Suppression(suppressions_node)) + suppressions_done = True + + global current_dumpfile_suppressions + current_dumpfile_suppressions = self.suppressions + + # Set links between rawTokens. + for i in range(len(self.rawTokens)-1): + self.rawTokens[i+1].previous = self.rawTokens[i] + self.rawTokens[i].next = self.rawTokens[i+1] + + @property + def configurations(self): + """ + Return the list of all available Configuration objects. + """ + return list(self.iterconfigurations()) + + def iterconfigurations(self): + """ + Create and return iterator for the available Configuration objects. + The iterator loops over all Configurations in the dump file tree, in document order. + """ + cfg = None + cfg_arguments = [] # function arguments for Configuration node initialization + cfg_function = None + cfg_valueflow = None + + # Iterating in a . + iter_scope_varlist = False + + # Iterating + iter_typedef_info = False + + # Iterating + iter_directive = False + + # Use iterable objects to traverse XML tree for dump files incrementally. + # Iterative approach is required to avoid large memory consumption. + # Calling .clear() is necessary to let the element be garbage collected. + for event, node in ElementTree.iterparse(self.filename, events=('start', 'end')): + # Serialize new configuration node + if node.tag == 'dump': + if event == 'start': + cfg = Configuration(node.get('cfg')) + continue + if event == 'end': + cfg.setIdMap(cfg_arguments) + yield cfg + cfg = None + cfg_arguments = [] + + elif node.tag == 'clang-warning' and event == 'start': + cfg.clang_warnings.append({'file': node.get('file'), + 'line': int(node.get('line')), + 'column': int(node.get('column')), + 'message': node.get('message')}) + # Parse standards + elif node.tag == "standards" and event == 'start': + continue + elif node.tag == 'c' and event == 'start': + cfg.standards.set_c(node) + elif node.tag == 'cpp' and event == 'start': + cfg.standards.set_cpp(node) + elif node.tag == 'posix' and event == 'start': + cfg.standards.set_posix(node) + + # Parse directives list + elif node.tag == 'directive': + if event == 'start': + cfg.directives.append(Directive(node)) + iter_directive = True + elif event == 'end': + iter_directive = False + # Parse macro usage + elif node.tag == 'macro' and event == 'start': + cfg.macro_usage.append(MacroUsage(node)) + + # Preprocessor #if/#elif condition + elif node.tag == "if-cond" and event == 'start': + cfg.preprocessor_if_conditions.append(PreprocessorIfCondition(node)) + + # Parse tokens + elif node.tag == 'tokenlist' and event == 'start': + continue + elif node.tag == 'token' and event == 'start' and not iter_directive and not iter_typedef_info: + cfg.tokenlist.append(Token(node)) + + # Parse scopes + elif node.tag == 'scopes' and event == 'start': + continue + elif node.tag == 'scope' and event == 'start': + cfg.scopes.append(Scope(node)) + elif node.tag == 'varlist': + if event == 'start': + iter_scope_varlist = True + elif event == 'end': + iter_scope_varlist = False + + # Parse functions + elif node.tag == 'functionList' and event == 'start': + continue + elif node.tag == 'function': + if event == 'start': + cfg_function = Function(node, cfg.scopes[-1]) + continue + if event == 'end': + cfg.functions.append(cfg_function) + cfg_function = None + + # Parse function arguments + elif node.tag == 'arg' and event == 'start': + arg_nr = int(node.get('nr')) + arg_variable_id = node.get('variable') + cfg_function.argumentId[arg_nr] = arg_variable_id + + # Parse variables + elif node.tag == 'var' and event == 'start': + if iter_scope_varlist: + cfg.scopes[-1].varlistId.append(node.get('id')) + else: + var = Variable(node) + if var.nameTokenId: + cfg.variables.append(var) + else: + cfg_arguments.append(var) + + # Parse containers + elif node.tag == 'containers' and event == 'start': + continue + elif node.tag == 'container' and event == 'start': + cfg.containers.append(Container(node)) + + # Parse typedef info + elif node.tag == 'typedef-info': + iter_typedef_info = (event == 'start') + elif iter_typedef_info and node.tag == 'info' and event == 'start': + cfg.typedefInfo.append(TypedefInfo(node)) + + # Parse template-token + #elif node.tag == 'TokenAndName' and event == 'start': #todo add processing of containers + # cfg.containers.append(Container(node)) + + # Parse valueflows (list of values) + elif node.tag == 'valueflow' and event == 'start': + continue + elif node.tag == 'values': + if event == 'start': + cfg_valueflow = ValueFlow(node) + continue + if event == 'end': + cfg.valueflow.append(cfg_valueflow) + cfg_valueflow = None + + # Parse values + elif node.tag == 'value' and event == 'start': + cfg_valueflow.values.append(Value(node)) + + # Remove links to the sibling nodes + node.clear() + + def __repr__(self): + attrs = ["configurations", "platform"] + return "{}({})".format( + "CppcheckData", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + +# Get function arguments +def getArgumentsRecursive(tok, arguments): + if tok is None: + return + if tok.str == ',': + getArgumentsRecursive(tok.astOperand1, arguments) + getArgumentsRecursive(tok.astOperand2, arguments) + else: + arguments.append(tok) + + +def getArguments(ftok): + if (not ftok.isName) or (ftok.next is None) or ftok.next.str != '(': + return None + args = [] + getArgumentsRecursive(ftok.next.astOperand2, args) + return args + + +def parsedump(filename): + """ + parse a cppcheck dump file + """ + return CppcheckData(filename) + + +def astIsFloat(token): + """ + Check if type of ast node is float/double + """ + + if not token: + return False + if token.str == '.': + return astIsFloat(token.astOperand2) + if token.str in '+-*/%': + return astIsFloat(token.astOperand1) or astIsFloat(token.astOperand2) + if not token.variable: + # float literal? + if token.str[0].isdigit(): + for c in token.str: + if c == 'f' or c == '.' or c == 'E': + return True + return False + typeToken = token.variable.typeStartToken + endToken = token.variable.typeEndToken + while typeToken != endToken: + if typeToken.str == 'float' or typeToken.str == 'double': + return True + typeToken = typeToken.next + if typeToken.str == 'float' or typeToken.str == 'double': + return True + return False + + +class CppCheckFormatter(argparse.HelpFormatter): + """ + Properly formats multiline argument helps + """ + def _split_lines(self, text, width): + # this is the RawTextHelpFormatter._split_lines + if text.startswith('R|'): + return text[2:].splitlines() + return argparse.HelpFormatter._split_lines(self, text, width) + + +def ArgumentParser(): + """ + Returns an argparse argument parser with an already-added + argument definition for -t/--template + """ + parser = argparse.ArgumentParser(formatter_class=CppCheckFormatter) + parser.add_argument('-t', '--template', metavar='', + default='{callstack}: ({severity}) {message}', + help="R|Format the error messages. E.g.\n" + "'{file}:{line},{severity},{id},{message}' or\n" + "'{file}({line}):({severity}) {message}' or\n" + "'{callstack} {message}'\n" + "Pre-defined templates: gcc, vs, edit") + parser.add_argument("dumpfile", nargs='*', + help="Path of dump files from cppcheck.") + parser.add_argument("--cli", + help="Addon is executed from Cppcheck", + action="store_true") + parser.add_argument("--file-list", metavar='', + default=None, + help="file list in a text file") + parser.add_argument("-q", "--quiet", + help='do not print "Checking ..." lines', + action="store_true") + return parser + + +def get_files(args): + """Return dump_files, ctu_info_files""" + all_files = args.dumpfile + if args.file_list: + with open(args.file_list, 'rt') as f: + for line in f.readlines(): + all_files.append(line.rstrip()) + dump_files = [] + ctu_info_files = [] + for f in all_files: + if f.endswith('.ctu-info'): + ctu_info_files.append(f) + else: + dump_files.append(f) + return dump_files, ctu_info_files + +def simpleMatch(token, pattern): + for p in pattern.split(' '): + if not token or token.str != p: + return False + token = token.next + return True + +patterns = { + '%any%': lambda tok: tok, + '%assign%': lambda tok: tok if tok.isAssignmentOp else None, + '%comp%': lambda tok: tok if tok.isComparisonOp else None, + '%name%': lambda tok: tok if tok.isName else None, + '%op%': lambda tok: tok if tok.isOp else None, + '%or%': lambda tok: tok if tok.str == '|' else None, + '%oror%': lambda tok: tok if tok.str == '||' else None, + '%var%': lambda tok: tok if tok.variable else None, + '(*)': lambda tok: tok.link if tok.str == '(' else None, + '[*]': lambda tok: tok.link if tok.str == '[' else None, + '{*}': lambda tok: tok.link if tok.str == '{' else None, + '<*>': lambda tok: tok.link if tok.str == '<' and tok.link else None, +} + +def match_atom(token, p): + if not token: + return None + if not p: + return None + if token.str == p: + return token + if p in ['!', '|', '||', '%', '!=', '*']: + return None + if p in patterns: + return patterns[p](token) + if '|' in p: + for x in p.split('|'): + t = match_atom(token, x) + if t: + return t + elif p.startswith('!!'): + t = match_atom(token, p[2:]) + if not t: + return token + elif p.startswith('**'): + a = p[2:] + t = token + while t: + if match_atom(t, a): + return t + if t.link and t.str in ['(', '[', '<', '{']: + t = t.link + t = t.next + return None + +class MatchResult: + def __init__(self, matches, bindings=None, keys=None): + self.__dict__.update(bindings or {}) + self._matches = matches + self._keys = keys or [] + + def __bool__(self): + return self._matches + + def __nonzero__(self): + return self._matches + + def __getattr__(self, k): + if k in self._keys: + return None + raise AttributeError + +def bind_split(s): + if '@' in s: + p = s.partition('@') + return (p[0], p[2]) + return (s, None) + +def match(token, pattern): + if not pattern: + return MatchResult(False) + end = None + bindings = {} + words = [bind_split(word) for word in pattern.split()] + for p, b in words: + t = match_atom(token, p) + if b: + bindings[b] = token + if not t: + return MatchResult(False, keys=[xx for pp, xx in words]+['end']) + end = t + token = t.next + bindings['end'] = end + return MatchResult(True, bindings=bindings) + +def get_function_call_name_args(token): + """Get function name and arguments for function call + name, args = get_function_call_name_args(tok) + """ + if token is None: + return None, None + if not token.isName or not token.scope.isExecutable: + return None, None + if not simpleMatch(token.next, '('): + return None, None + if token.function: + nametok = token.function.token + if nametok is None: + nametok = token.function.tokenDef + if token in (token.function.token, token.function.tokenDef): + return None, None + name = nametok.str + while nametok.previous and nametok.previous.previous and nametok.previous.str == '::' and nametok.previous.previous.isName: + name = nametok.previous.previous.str + '::' + name + nametok = nametok.previous.previous + scope = token.function.nestedIn + while scope: + if scope.className: + name = scope.className + '::' + name + scope = scope.nestedIn + else: + nametok = token + name = nametok.str + while nametok.previous and nametok.previous.previous and nametok.previous.str == '::' and nametok.previous.previous.isName: + name = nametok.previous.previous.str + '::' + name + nametok = nametok.previous.previous + return name, getArguments(token) + +def is_suppressed(location, message, errorId): + for suppression in current_dumpfile_suppressions: + if suppression.isMatch(location.file, location.linenr, message, errorId): + return True + return False + +def log_checker(message, addon): + if '--cli' in sys.argv: + msg = { 'addon': addon, + 'severity': 'none', + 'message': message, + 'errorId': 'logChecker'} + sys.stdout.write(json.dumps(msg) + '\n') + +def reportError(location, severity, message, addon, errorId, extra='', columnOverride=None): + if '--cli' in sys.argv: + msg = { 'file': location.file, + 'linenr': location.linenr, + 'column': location.column if columnOverride is None else columnOverride, + 'severity': severity, + 'message': message, + 'addon': addon, + 'errorId': errorId, + 'extra': extra} + sys.stdout.write(json.dumps(msg) + '\n') + else: + if is_suppressed(location, message, '%s-%s' % (addon, errorId)): + return + loc = '[%s:%i]' % (location.file, location.linenr) + if len(extra) > 0: + message += ' (' + extra + ')' + sys.stderr.write('%s (%s) %s [%s-%s]\n' % (loc, severity, message, addon, errorId)) + global EXIT_CODE + EXIT_CODE = 1 + +def reportSummary(dumpfile, summary_type, summary_data): + msg = {'summary': summary_type, 'data': summary_data} + if '--cli' in sys.argv: + sys.stdout.write(json.dumps(msg) + '\n') + else: + # dumpfile ends with ".dump" + ctu_info_file = dumpfile[:-4] + "ctu-info" + with open(ctu_info_file, 'at') as f: + f.write(json.dumps(msg) + '\n') + + +def get_path_premium_addon(): + p = pathlib.Path(sys.argv[0]).parent.parent + + for ext in ('.exe', ''): + p1 = os.path.join(p, 'premiumaddon' + ext) + p2 = os.path.join(p, 'cppcheck' + ext) + if os.path.isfile(p1) and os.path.isfile(p2): + return p1 + return None + + +def cmd_output(cmd): + with subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as p: + stdout, stderr = p.communicate() + rc = p.returncode + out = stdout + if rc == 1 and len(stderr) > 2: + out = stderr + return out.decode(encoding='utf-8', errors='ignore') diff --git a/addons/doc/img/cppcheck-gui-addons.png b/addons/doc/img/cppcheck-gui-addons.png new file mode 100644 index 00000000000..b8a22ba953c Binary files /dev/null and b/addons/doc/img/cppcheck-gui-addons.png differ diff --git a/addons/doc/y2038.md b/addons/doc/y2038.md new file mode 100644 index 00000000000..5566c3936ba --- /dev/null +++ b/addons/doc/y2038.md @@ -0,0 +1,166 @@ +# README of the Y2038 cppcheck addon + +## Contents + +- [README of the Y2038 cppcheck addon](#readme-of-the-y2038-cppcheck-addon) + - [Contents](#contents) + - [What is Y2038?](#what-is-y2038) + - [What is the Y2038 cppcheck addon?](#what-is-the-y2038-cppcheck-addon) + - [How does the Y2038 cppcheck addon work?](#how-does-the-y2038-cppcheck-addon-work) + - [Primary Usage: Cppcheck Addon Integration (`y2038.py`)](#primary-usage-cppcheck-addon-integration-y2038py) + - [Implementation Details](#implementation-details) + - [Requirements](#requirements) + - [How to use the Y2038 cppcheck addon](#how-to-use-the-y2038-cppcheck-addon) + - [**Auditing Your Project for Y2038 Compliance**](#auditing-your-project-for-y2038-compliance) + - [**CI/CD Integration**](#cicd-integration) + - [Testing](#testing) + - [Running Y2038 Addon Tests](#running-y2038-addon-tests) + - [Test Coverage](#test-coverage) + - [Test Structure](#test-structure) + +--- + +## What is Y2038? + +In a few words: + +Most operating systems and programming environments represent the current time as the number of seconds since the Unix epoch. In C and C++ this is exposed by time() and std::time(), with the Unix epoch defined as 00:00:00 UTC on 1 January 1970. + +Typically this representation is stored as a 64-bit signed quantity. +Some systems, mainly embedded systems and older systems, still use a 32-bit signed +time_t representation. + +On January 19th, 2038 at 03:14:07 GMT, such 32-bit representations will reach +their maximum positive value. + +What happens then is unpredictable: system time might roll back to December +13th, 1901 at 19:55:13, or it might keep running on until February 7th, 2106 +at 06:28:15 GMT, or the computer may freeze, or just about anything you can +think of, plus a few ones you can't. + +The workaround for this is to switch to a 64-bit signed representation of time +as seconds from the Unix epoch. This representation will work for more than 250 +billion years. + +Working around Y2038 requires fixing the Linux kernel, the C libraries, and +any user code around which uses 32-bit epoch representations. + +There is Y2038-proofing work in progress on the Linux and GNU glibc front. + +## What is the Y2038 cppcheck addon? + +The Y2038 cppcheck addon is a tool to help detect code which might need fixing +because it is Y2038-unsafe. This may be because it uses types or functions from +GNU libc or from the Linux kernel which are known not to be Y2038-proof. + +## How does the Y2038 cppcheck addon work? + +The Y2038 addon is a comprehensive tool designed to audit your project for Y2038 compliance. It provides a streamlined, intelligent approach to Y2038 analysis. + +### Primary Usage: Cppcheck Integration with Project Files + +The Y2038 addon integrates seamlessly with cppcheck's core project parsing infrastructure. For optimal analysis, use the addon with project files: + +```bash +cppcheck --project=build/compile_commands.json --addon=y2038 +``` + +For single files, you can also use: +```bash +cppcheck --addon=y2038 source_file.c +``` + +#### Implementation Details + +The addon leverages cppcheck's built-in project parsing capabilities: + +- **Core Integration**: Y2038-related compiler flags are extracted by cppcheck core during project parsing and passed through dump file configuration +- **Automatic Flag Detection**: Cppcheck automatically detects Y2038-relevant flags (`-D_TIME_BITS=64`, `-D_FILE_OFFSET_BITS=64`, `-D_USE_TIME_BITS64`) from compilation commands +- **Clean Architecture**: No redundant file parsing - cppcheck handles project files once, addon focuses on analysis +- **Priority Logic**: Dump file configuration (from cppcheck's project parsing) takes precedence over source code `#define` statements +- **Source Fallback**: When no project configuration is available, the addon analyzes source code `#define` statements + +This architecture ensures optimal performance and maintains clean separation of concerns between cppcheck core (project parsing) and addon (analysis logic). + +The output is the standard Cppcheck analysis report, focused on Y2038-related issues. + +## Requirements + +The Y2038 addon works with any cppcheck installation and requires no additional dependencies beyond cppcheck itself. + +For optimal Y2038 analysis, ensure your project uses a supported build system that generates `compile_commands.json`: + +- **CMake**: Use `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` +- **Bear**: For Make/Autotools projects, use `bear` to generate compile commands +- **Ninja**: Use `ninja -t compdb` to generate compile commands +- **Bazel**: Use `bazel aquery` with appropriate flags + +If using `bear` for Make-based projects, install it via your package manager: + +```bash +# On Debian/Ubuntu +sudo apt-get install bear + +# On Fedora +sudo dnf install bear + +# On macOS (using Homebrew) +brew install bear +``` + +## How to use the Y2038 cppcheck addon + +### **Auditing Your Project for Y2038 Compliance** + +The Y2038 addon seamlessly integrates with your existing cppcheck workflow. + +**For projects with compile_commands.json (recommended):** + +```bash +cppcheck --project=build/compile_commands.json --addon=y2038 +``` + +**For single file analysis:** + +```bash +cppcheck --addon=y2038 source_file.c +``` + +**For project-wide analysis without compile_commands.json:** + +```bash +cppcheck --addon=y2038 src/ +``` + +The integration automatically: + +1. **Extracts Y2038 flags** from your project's compilation commands via cppcheck's project parsing +2. **Passes flag information** through dump file configuration to the addon +3. **Analyzes source code** with proper Y2038 context from both build system and source directives +4. **Reports Y2038 issues** using cppcheck's standard error reporting format + +### **CI/CD Integration** + +For CI/CD integration, use the Y2038 addon with your project's build configuration: + +```sh +# Example CI script with compile_commands.json +#!/bin/bash +# Generate compile_commands.json (if not already available) +cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build +# or: bear -- make + +# Run Y2038 analysis +cppcheck --project=build/compile_commands.json --addon=y2038 --error-exitcode=1 + +# The addon will return a non-zero exit code if Y2038 issues are found. +# The output is the standard Cppcheck report. +``` + +**For projects without compile_commands.json:** + +```sh +# Example CI script for source-only analysis +#!/bin/bash +cppcheck --addon=y2038 --error-exitcode=1 src/ +``` diff --git a/addons/findcasts.py b/addons/findcasts.py new file mode 100755 index 00000000000..d4842b229a6 --- /dev/null +++ b/addons/findcasts.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 +# +# Locate casts in the code +# + +import cppcheck + +@cppcheck.checker +def cast(cfg, data): + for token in cfg.tokenlist: + if token.str != '(' or not token.astOperand1 or token.astOperand2: + continue + + # Is it a lambda? + if token.astOperand1.str == '{': + continue + + # we probably have a cast.. if there is something inside the parentheses + # there is a cast. Otherwise this is a function call. + typetok = token.next + if not typetok.isName: + continue + + # cast number => skip output + if token.astOperand1.isNumber: + continue + + # void cast => often used to suppress compiler warnings + if typetok.str == 'void': + continue + + cppcheck.reportError(token, 'information', 'found a cast') diff --git a/addons/misc.py b/addons/misc.py new file mode 100644 index 00000000000..670d6152ff5 --- /dev/null +++ b/addons/misc.py @@ -0,0 +1,163 @@ +#!/usr/bin/env python3 +# +# Misc: Uncategorized checks that might be moved to some better addon later +# +# Example usage of this addon (scan a sourcefile main.cpp) +# cppcheck --dump main.cpp +# python misc.py main.cpp.dump + +import cppcheckdata +import sys +import re + +DEBUG = ('-debug' in sys.argv) +VERIFY = ('-verify' in sys.argv) +VERIFY_EXPECTED = [] +VERIFY_ACTUAL = [] + +def reportError(token, severity, msg, id): + if id == 'debug' and not DEBUG: + return + if VERIFY: + VERIFY_ACTUAL.append(str(token.linenr) + ':' + id) + else: + cppcheckdata.reportError(token, severity, msg, 'misc', id) + +def simpleMatch(token, pattern): + return cppcheckdata.simpleMatch(token, pattern) + +# Get function arguments +def getArgumentsRecursive(tok, arguments): + if tok is None: + return + if tok.str == ',': + getArgumentsRecursive(tok.astOperand1, arguments) + getArgumentsRecursive(tok.astOperand2, arguments) + else: + arguments.append(tok) + +def getArguments(ftok): + arguments = [] + getArgumentsRecursive(ftok.astOperand2, arguments) + return arguments + +def isStringLiteral(tokenString): + return tokenString.startswith('"') + +# check data +def stringConcatInArrayInit(data): + # Get all string macros + stringMacros = [] + for cfg in data.iterconfigurations(): + for directive in cfg.directives: + res = re.match(r'#define[ ]+([A-Za-z0-9_]+)[ ]+".*', directive.str) + if res: + macroName = res.group(1) + if macroName not in stringMacros: + stringMacros.append(macroName) + + # Check code + arrayInit = False + for i in range(len(data.rawTokens)): + if i < 2: + continue + tok1 = data.rawTokens[i-2].str + tok2 = data.rawTokens[i-1].str + tok3 = data.rawTokens[i-0].str + if tok3 == '}': + arrayInit = False + elif tok1 == ']' and tok2 == '=' and tok3 == '{': + arrayInit = True + elif arrayInit and (tok1 in [',', '{']): + isString2 = (isStringLiteral(tok2) or (tok2 in stringMacros)) + isString3 = (isStringLiteral(tok3) or (tok3 in stringMacros)) + if isString2 and isString3: + reportError(data.rawTokens[i], 'style', 'String concatenation in array initialization, missing comma?', 'stringConcatInArrayInit') + + +def implicitlyVirtual(data): + for cfg in data.iterconfigurations(): + for function in cfg.functions: + if function.isImplicitlyVirtual is None: + continue + if not function.isImplicitlyVirtual: + continue + reportError(function.tokenDef, 'style', 'Function \'' + function.name + '\' overrides base class function but is not marked with \'virtual\' keyword.', 'implicitlyVirtual') + +def ellipsisStructArg(data): + for cfg in data.iterconfigurations(): + for tok in cfg.tokenlist: + if tok.str != '(': + continue + if tok.astOperand1 is None or tok.astOperand2 is None: + continue + if tok.astOperand2.str != ',': + continue + if tok.scope.type in ['Global', 'Class']: + continue + if tok.astOperand1.function is None: + continue + for argnr, argvar in tok.astOperand1.function.argument.items(): + if argnr < 1: + continue + if not simpleMatch(argvar.typeStartToken, '...'): + continue + callArgs = getArguments(tok) + for i in range(argnr-1, len(callArgs)): + valueType = callArgs[i].valueType + if valueType is None: + argStart = callArgs[i].previous + while argStart.str != ',': + if argStart.str == ')': + argStart = argStart.link + argStart = argStart.previous + argEnd = callArgs[i] + while argEnd.str != ',' and argEnd.str != ')': + if argEnd.str == '(': + argEnd = argEnd.link + argEnd = argEnd.next + expression = '' + argStart = argStart.next + while argStart != argEnd: + expression = expression + argStart.str + argStart = argStart.next + reportError(tok, 'debug', 'Bailout, unknown argument type for argument \'' + expression + '\'.', 'debug') + continue + if valueType.pointer > 0: + continue + if valueType.type != 'record' and valueType.type != 'container': + continue + reportError(tok, 'style', 'Passing record to ellipsis function \'' + tok.astOperand1.function.name + '\'.', 'ellipsisStructArg') + break + +for arg in sys.argv[1:]: + if arg in ['-debug', '-verify', '--cli']: + continue + + print("Checking %s..." % arg) + data = cppcheckdata.CppcheckData(arg) + + if VERIFY: + VERIFY_ACTUAL = [] + VERIFY_EXPECTED = [] + for tok in data.rawTokens: + if tok.str.startswith('//'): + for word in tok.str[2:].split(' '): + if word in ['stringConcatInArrayInit', 'implicitlyVirtual', 'ellipsisStructArg']: + VERIFY_EXPECTED.append(str(tok.linenr) + ':' + word) + + stringConcatInArrayInit(data) + implicitlyVirtual(data) + ellipsisStructArg(data) + + if VERIFY: + for expected in VERIFY_EXPECTED: + if expected not in VERIFY_ACTUAL: + print('Expected but not seen: ' + expected) + sys.exit(1) + for actual in VERIFY_ACTUAL: + if actual not in VERIFY_EXPECTED: + print('Not expected: ' + actual) + sys.exit(1) + +sys.exit(cppcheckdata.EXIT_CODE) diff --git a/addons/misra.py b/addons/misra.py new file mode 100755 index 00000000000..933ef4c2025 --- /dev/null +++ b/addons/misra.py @@ -0,0 +1,5170 @@ +#!/usr/bin/env python3 +# +# MISRA C 2012 checkers (including amendment 1 and 2) +# +# Example usage of this addon (scan a sourcefile main.cpp) +# cppcheck --dump main.cpp +# python misra.py --rule-texts= main.cpp.dump +# +# Limitations: This addon is released as open source. We are not allowed by +# MISRA to distribute rule texts openly. +# +# The MISRA standard documents may be obtained from https://www.misra.org.uk +# +# Total number of rules: 143 + +from __future__ import print_function + +import cppcheckdata +import itertools +import json +import sys +import re +import os +import argparse +import string +import copy + +try: + from itertools import izip as zip +except ImportError: + pass + +import misra_9 + +def grouped(iterable, n): + """s -> (s0,s1,s2,...sn-1), (sn,sn+1,sn+2,...s2n-1), (s2n,s2n+1,s2n+2,...s3n-1), ...""" + return zip(*[iter(iterable)] * n) + + +INT_TYPES = ['bool', 'char', 'short', 'int', 'long', 'long long'] + + +STDINT_TYPES = ['%s%d_t' % (n, v) for n, v in itertools.product( + ['int', 'uint', 'int_least', 'uint_least', 'int_fast', 'uint_fast'], + [8, 16, 32, 64])] + +STDINT_H_DEFINES_MIN = ['%s%d_MIN' % (n, v) for n, v in itertools.product( + ['INT', 'INT_LEAST', 'INT_FAST',], + [8, 16, 32, 64])] + +STDINT_H_DEFINES_MAX = ['%s%d_MAX' % (n, v) for n, v in itertools.product( + ['INT', 'UINT','INT_LEAST','UINT_LEAST', 'INT_FAST', 'UINT_FAST',], + [8, 16, 32, 64])] + +STDINT_H_DEFINES_C = ['%s%d_C' % (n, v) for n, v in itertools.product( + ['INT', 'UINT'], + [8, 16, 32, 64])] + + +INTTYPES_H_DEFINES = ['%s%d' % (n, v) for n, v in itertools.product( + ['PRId', 'PRIi', 'PRIo', 'PRIu', 'PRIx', 'PRIX', 'SCNd', + 'SCNi', 'SCNo', 'SCNu', 'SCNx', 'PRIdLEAST', 'PRIiLEAST', + 'PRIoLEAST', 'PRIuLEAST', 'PRIxLEAST', 'PRIXLEAST', + 'SCNdLEAST', 'SCNiLEAST', 'SCNoLEAST', 'SCNuLEAST', + 'SCNxLEAST', 'PRIdFAST', 'PRIiFAST', 'PRIoFAST', 'PRIuFAST', + 'PRIxFAST', 'PRIXFAST', 'SCNdFAST', 'SCNiFAST', 'SCNoFAST', + 'SCNuFAST', 'SCNxFAST', ], + [8, 16, 32, 64])] +typeBits = { + 'CHAR': None, + 'SHORT': None, + 'INT': None, + 'LONG': None, + 'LONG_LONG': None, + 'POINTER': None +} + + +def isUnsignedType(ty): + return ty == 'unsigned' or ty.startswith('uint') + + +def simpleMatch(token, pattern): + return cppcheckdata.simpleMatch(token, pattern) + + +def rawlink(rawtoken): + if rawtoken.str == '}': + indent = 0 + while rawtoken: + if rawtoken.str == '}': + indent = indent + 1 + elif rawtoken.str == '{': + indent = indent - 1 + if indent == 0: + break + rawtoken = rawtoken.previous + else: + rawtoken = None + return rawtoken + + +# Identifiers described in Section 7 "Library" of C90 Standard +# Based on ISO/IEC9899:1990 Annex D -- Library summary and +# Annex E -- Implementation limits. +C90_STDLIB_IDENTIFIERS = { + # D.1 Errors + 'errno.h': ['EDOM', 'ERANGE', 'errno'], + # D.2 Common definitions + 'stddef.h': ['NULL', 'offsetof', 'ptrdiff_t', 'size_t', 'wchar_t'], + # D.3 Diagnostics + 'assert.h': ['NDEBUG', 'assert'], + # D.4 Character handling + 'ctype.h': [ + 'isalnum', 'isalpha', 'isblank', 'iscntrl', 'isdigit', + 'isgraph', 'islower', 'isprint', 'ispunct', 'isspace', + 'isupper', 'isxdigit', 'tolower', 'toupper', + ], + # D.5 Localization + 'locale.h': [ + 'LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', + 'LC_NUMERIC', 'LC_TIME', 'NULL', 'lconv', + 'setlocale', 'localeconv', + ], + # D.6 Mathematics + 'math.h': [ + 'HUGE_VAL', 'acos', 'asin' , 'atan2', 'cos', 'sin', 'tan', 'cosh', + 'sinh', 'tanh', 'exp', 'frexp', 'ldexp', 'log', 'loglO', 'modf', + 'pow', 'sqrt', 'ceil', 'fabs', 'floor', 'fmod', + ], + # D.7 Nonlocal jumps + 'setjmp.h': ['jmp_buf', 'setjmp', 'longjmp'], + # D.8 Signal handling + 'signal.h': [ + 'sig_atomic_t', 'SIG_DFL', 'SIG_ERR', 'SIG_IGN', 'SIGABRT', 'SIGFPE', + 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'signal', 'raise', + ], + # D.9 Variable arguments + 'stdarg.h': ['va_list', 'va_start', 'va_arg', 'va_end'], + # D.10 Input/output + 'stdio.h': [ + '_IOFBF', '_IOLBF', '_IONBF', 'BUFSIZ', 'EOF', 'FILE', 'FILENAME_MAX', + 'FOPEN_MAX', 'fpos_t', 'L_tmpnam', 'NULL', 'SEEK_CUR', 'SEEK_END', + 'SEEK_SET', 'size_t', 'stderr', 'stdin', 'stdout', 'TMP_MAX', + 'remove', 'rename', 'tmpfile', 'tmpnam', 'fclose', 'fflush', 'fopen', + 'freopen', 'setbuf', 'setvbuf', 'fprintf', 'fscanf', 'printf', + 'scanf', 'sprintf', 'sscanf', 'vfprintf', 'vprintf', 'vsprintf', + 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', + 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fgetpos', 'fseek', + 'fsetpos', 'rewind', 'clearerr', 'feof', 'ferror', 'perror', + ], + # D.11 General utilities + 'stdlib.h': [ + 'EXIT_FAILURE', 'EXIT_SUCCESS', 'MB_CUR_MAX', 'NULL', 'RAND_MAX', + 'div_t', 'ldiv_t', 'wchar_t', 'atof', 'atoi', 'strtod', 'rand', + 'srand', 'calloc', 'free', 'malloc', 'realloc', 'abort', 'atexit', + 'exit', 'getenv', 'system', 'bsearch', 'qsort', 'abs', 'div', 'ldiv', + 'mblen', 'mbtowc', 'wctomb', 'mbstowcs', 'wcstombs', + ], + # D.12 String handling + 'string.h': [ + 'NULL', 'size_t', 'memcpy', 'memmove', 'strcpy', 'strncpy', 'strcat', + 'strncat', 'memcmp', 'strcmp', 'strcoll', 'strncmp', 'strxfrm', + 'memchr', 'strchr', 'strcspn', 'strpbrk', 'strrchr', 'strspn', + 'strstr', 'strtok', 'memset', 'strerror', 'strlen', + ], + # D.13 Date and time + 'time.h': [ + 'CLK_TCK', 'NULL', 'clock_t', 'time_t', 'size_t', 'tm', 'clock', + 'difftime', 'mktime', 'time', 'asctime', 'ctime', 'gmtime', + 'localtime', 'strftime', + ], + # Annex E: Implementation limits + 'limits.h': [ + 'CHAR_BIT', 'SCHAR_MIN', 'SCHAR_MAX', 'UCHAR_MAX', 'CHAR_MIN', + 'CHAR_MAX', 'MB_LEN_MAX', 'SHRT_MIN', 'SHRT_MAX', 'USHRT_MAX', + 'INT_MIN', 'INT_MAX', 'UINT_MAX', 'LONG_MIN', 'LONG_MAX', 'ULONG_MAX', + ], + 'float.h': [ + 'FLT_ROUNDS', 'FLT_RADIX', 'FLT_MANT_DIG', 'DBL_MANT_DIG', + 'LDBL_MANT_DIG', 'DECIMAL_DIG', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', + 'DBL_MIN_EXP', 'LDBL_MIN_EXP', 'FLT_MIN_10_EXP', 'DBL_MIN_10_EXP', + 'LDBL_MIN_10_EXP', 'FLT_MAX_EXP', 'DBL_MAX_EXP', 'LDBL_MAX_EXP', + 'FLT_MAX_10_EXP', 'DBL_MAX_10_EXP', 'LDBL_MAX_10_EXP', 'FLT_MAX', + 'DBL_MAX', 'LDBL_MAX', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', + 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON' + ], +} + + +# Identifiers described in Section 7 "Library" of C99 Standard +# Based on ISO/IEC 9899:1999 (E) Annex B -- Library summary +# (https://www.dii.uchile.cl/~daespino/files/Iso_C_1999_definition.pdf) +C99_STDLIB_IDENTIFIERS = { + # B.1 Diagnostics + 'assert.h': C90_STDLIB_IDENTIFIERS['assert.h'], + # B.2 Complex + 'complex.h': [ + 'complex', 'imaginary', 'I', '_Complex_I', '_Imaginary_I', + 'CX_LIMITED_RANGE', + 'cacos', 'cacosf', 'cacosl', + 'casin', 'casinf', 'casinl', + 'catan', 'catanf', 'catanl', + 'ccos', 'ccosf', 'ccosl', + 'csin', 'csinf', 'csinl', + 'ctan', 'ctanf', 'ctanl', + 'cacosh', 'cacoshf', 'cacoshl', + 'casinh', 'casinhf', 'casinhl', + 'catanh', 'catanhf', 'catanhl', + 'ccosh', 'ccoshf', 'ccoshl', + 'csinh', 'csinhf', 'csinhl', + 'ctanh', 'ctanhf', 'ctanhl', + 'cexp', 'cexpf', 'cexpl', + 'clog', 'clogf', 'clogl', + 'cabs', 'cabsf', 'cabsl', + 'cpow', 'cpowf', 'cpowl', + 'csqrt', 'csqrtf', 'csqrtl', + 'carg', 'cargf', 'cargl', + 'cimag', 'cimagf', 'cimagl', + 'conj', 'conjf', 'conjl', + 'cproj', 'cprojf', 'cprojl', + 'creal', 'crealf', 'creall', + ], + # B.3 Character handling + 'ctype.h': C90_STDLIB_IDENTIFIERS['ctype.h'], + # B.4 Errors + 'errno.h': C90_STDLIB_IDENTIFIERS['errno.h'] + ['EILSEQ'], + # B.5 Floating-point environment + 'fenv.h': [ + 'fenv_t', 'FE_OVERFLOW', 'FE_TOWARDZERO', + 'fexcept_t', 'FE_UNDERFLOW', 'FE_UPWARD', + 'FE_DIVBYZERO', 'FE_ALL_EXCEPT', 'FE_DFL_ENV', + 'FE_INEXACT', 'FE_DOWNWARD', + 'FE_INVALID', 'FE_TONEAREST', + 'FENV_ACCESS', + 'feclearexcept', 'fegetexceptflag', 'fegetround', + 'fesetround', 'fegetenv', 'feholdexcept', + 'fesetenv', 'feupdateenv', + ], + # B.6 Characteristics of floating types + 'float.h': C90_STDLIB_IDENTIFIERS['float.h'] + ['FLT_EVAL_METHOD'], + # B.7 Format conversion of integer types + 'inttypes.h': [ + 'PRIdMAX', 'PRIiMAX', 'PRIoMAX', 'PRIuMAX', 'PRIxMAX', 'PRIXMAX', + 'SCNdMAX', 'SCNiMAX', 'SCNoMAX', 'SCNuMAX', 'SCNxMAX', 'PRIdPTR', + 'PRIiPTR', 'PRIoPTR', 'PRIuPTR', 'PRIxPTR', 'PRIXPTR', 'SCNdPTR', + 'SCNiPTR', 'SCNoPTR', 'SCNuPTR', 'SCNxPTR', + 'imaxdiv_t', 'imaxabs', 'imaxdiv', 'strtoimax', + 'strtoumax', 'wcstoimax', 'wcstoumax', + ] + INTTYPES_H_DEFINES, + # B.8 Alternative spellings + 'iso646.h': [ + 'and', 'and_eq', 'bitand', 'bitor', 'compl', 'not', 'not_eq', + 'or', 'or_eq', 'xor', 'xor_eq', + ], + # B.9 Size of integer types + 'limits.h': C90_STDLIB_IDENTIFIERS['limits.h'] + + ['LLONG_MIN', 'LLONG_MAX', 'ULLONG_MAX'], + # B.10 Localization + 'locale.h': C90_STDLIB_IDENTIFIERS['locale.h'], + # B.11 Mathematics + 'math.h': C90_STDLIB_IDENTIFIERS['math.h'] + [ + 'float_t', 'double_t', 'HUGE_VAL', 'HUGE_VALF', 'HUGE_VALL', + 'INFINITY', 'NAN', 'FP_INFINITE', 'FP_NAN', 'FP_NORMAL', + 'FP_SUBNORMAL', 'FP_ZERO', 'FP_FAST_FMA', 'FP_FAST_FMAF', + 'FP_FAST_FMAL', 'FP_ILOGB0', 'FP_ILOGBNAN', 'MATH_ERRNO', + 'MATH_ERREXCEPT', 'math_errhandling', 'FP_CONTRACT', 'fpclassify', + 'isfinite', 'isinf', 'isnan', 'isnormal', 'signbit', 'acosf', 'acosl', + 'asinf', 'asinl', 'atanf', 'atanl', 'atan2', 'atan2f', 'atan2l', + 'cosf', 'cosl', 'sinf', 'sinl', 'tanf', 'tanl', 'acosh', 'acoshf', + 'acoshl', 'asinh', 'asinhf', 'asinhl', 'atanh', 'atanhf', 'atanhl', + 'cosh', 'coshf', 'coshl', 'sinh', 'sinhf', 'sinhl', 'tanh', 'tanhf', + 'tanhl', 'expf', 'expl', 'exp2', 'exp2f', 'exp2l', 'expm1', 'expm1f', + 'expm1l', 'frexpf', 'frexpl', 'ilogb', 'ilogbf', 'ilogbl', 'ldexpf', + 'ldexpl', 'logf', 'logl', 'log10f', 'log10l', 'log1p', 'log1pf', + 'log1pl', 'log2', 'log2f', 'log2l', 'logb', 'logbf', 'logbl', 'modff', + 'modfl', 'scalbn', 'scalbnf', 'scalbnl', 'scalbln', 'scalblnf', + 'scalblnl','cbrt', 'cbrtf','cbrtl', 'fabs', 'fabsf', 'fabsl', + 'hypotl', 'hypotf', 'powf', 'powl', 'sqrtf', 'sqrtl', 'erf', 'erff', + 'erfl', 'erfc', 'erfcf', 'erfcl', 'lgamma', 'lgammaf', 'lgammal', + 'tgamma', 'tgammaf', 'tgammal', 'ceilf', 'ceill', 'floorf', 'floorl', + 'nearbyint', 'nearbyintf', 'nearbyintl', 'rint', 'rintf', 'rintl', + 'lrint', 'lrintf', 'lrintl', 'llrint', 'llrintf', 'llrintl', 'round', + 'roundf', 'roundl', 'lround', 'lroundf', 'lroundl', 'llround', + 'llroundf', 'llroundl', 'trunc', 'truncf', 'truncl', 'fmodf', 'fmodl', + 'remainder', 'remainderf', 'remainderl', 'remquo', 'remquof', + 'remquol', 'copysign', 'copysignf', 'copysignl', 'nan', 'nanf', + 'nanl', 'nextafter', 'nextafterf', 'nextafterl', 'nexttoward', + 'nexttowardf', 'nexttowardl', 'fdim', 'fdimf', 'fdiml', 'fmax', + 'fmaxf', 'fmaxl', 'fmin', 'fminf', 'fminl', 'fmaf','fmal', 'isgreater', + 'isgreaterequal', 'isless', 'islessequal', 'islessgreater', + 'isunordered', + ], + # B.12 Nonlocal jumps + 'setjmp.h': C90_STDLIB_IDENTIFIERS['setjmp.h'], + # B.13 Signal handling + 'signal.h': C90_STDLIB_IDENTIFIERS['signal.h'], + # B.14 Variable arguments + 'stdarg.h': C90_STDLIB_IDENTIFIERS['stdarg.h'] + ['va_copy'], + # B.15 Boolean type and values + 'stdbool.h': ['bool', 'true', 'false', '__bool_true_false_are_defined'], + # B.16 Common definitions + 'stddef.h': C90_STDLIB_IDENTIFIERS['stddef.h'], + # B.17 Integer types + 'stdint.h': [ + 'intptr_t', 'uintptr_t', 'intmax_t', 'uintmax_t', 'INTN_MIN', + 'INTN_MAX', 'UINTN_MAX', 'INT_LEASTN_MIN', 'INT_LEASTN_MAX', + 'UINT_LEASTN_MAX', 'INT_FASTN_MIN', 'INT_FASTN_MAX', 'UINT_FASTN_MAX', + 'INTPTR_MIN', 'INTPTR_MAX', 'UINTPTR_MAX', 'INTMAX_MIN', 'INTMAX_MAX', + 'UINTMAX_MAX', 'PTRDIFF_MIN', 'PTRDIFF_MAX', 'SIG_ATOMIC_MIN', + 'SIG_ATOMIC_MAX', 'SIZE_MAX', 'WCHAR_MIN', 'WCHAR_MAX', 'WINT_MIN', + 'WINT_MAX', 'INTN_C', 'UINTN_C', 'INTMAX_C', 'UINTMAX_C', + ] + STDINT_TYPES + STDINT_H_DEFINES_MIN + STDINT_H_DEFINES_MAX + STDINT_H_DEFINES_C, + # B.18 Input/output + 'stdio.h': C90_STDLIB_IDENTIFIERS['stdio.h'] + [ + 'mode', 'restrict', 'snprintf', 'vfscanf', 'vscanf', + 'vsnprintf', 'vsscanf','ftell' + ], + # B.19 General utilities + 'stdlib.h': C90_STDLIB_IDENTIFIERS['stdlib.h'] + [ + '_Exit', 'labs', 'llabs', 'lldiv', 'lldiv_t', 'strtof', 'strtol', + 'strtold', 'strtoll', 'strtoul', 'strtoull' + ], + # B.20 String handling + 'string.h': C90_STDLIB_IDENTIFIERS['string.h'], + # B.21 Type-generic math + 'tgmath.h': [ + 'acos', 'asin', 'atan', 'acosh', 'asinh', 'atanh', 'cos', 'sin', 'tan', + 'cosh', 'sinh', 'tanh', 'exp', 'log', 'pow', 'sqrt', 'fabs', 'atan2', + 'cbrt', 'ceil', 'copysign', 'erf', 'erfc', 'exp2', 'expm1', 'fdim', + 'floor', 'fma', 'fmax', 'fmin', 'fmod', 'frexp', 'hypot', 'ilogb', + 'ldexp', 'lgamma', 'llrint', 'llround', 'log10', 'log1p', 'log2', + 'logb', 'lrint', 'lround', 'nearbyint', 'nextafter', 'nexttoward', + 'remainder', 'remquo', 'rint', 'round', 'scalbn', 'scalbln', 'tgamma', + 'trunc', 'carg', 'cimag', 'conj', 'cproj', 'creal', + ], + # B.22 Date and time + 'time.h': C90_STDLIB_IDENTIFIERS['time.h'] + ['CLOCKS_PER_SEC'], + # B.23 Extended multibyte/wide character utilities + 'wchar.h': [ + 'wchar_t', 'size_t', 'mbstate_t', 'wint_t', 'tm', 'NULL', 'WCHAR_MAX', + 'WCHAR_MIN', 'WEOF', 'fwprintf', 'fwscanf', 'swprintf', 'swscanf', + 'vfwprintf', 'vfwscanf', 'vswprintf', 'vswscanf', 'vwprintf', + 'vwscanf', 'wprintf', 'wscanf', 'fgetwc', 'fgetws', 'fputwc', 'fputws', + 'fwide', 'getwc', 'getwchar', 'putwc', 'putwchar', 'ungetwc', 'wcstod', + 'wcstof', 'wcstold', 'wcstol', 'wcstoll', 'wcstoul', 'wcstoull', 'wcscpy', + 'wcsncpy', 'wmemcpy', 'wmemmove', 'wcscat', 'wcsncat', 'wcscmp', 'wcscoll', + 'wcsncmp', 'wcsxfrm', 'wmemcmp', 'wcschr', 'wcscspn', 'wcspbrk', + 'wcsrchr', 'wcsspn', 'wcsstr', 'wcstok', 'wmemchr', 'wcslen', + 'wmemset', 'wcsftime', 'btowc', 'wctob', 'mbsinit', 'mbrlen', + 'mbrtowc', 'wcrtomb', 'mbsrtowcs', 'wcsrtombs', + ], + # B.24 Wide character classification and mapping utilities + 'wctype.h': ['wint_t', 'wctrans_t', 'wctype_t', 'WEOF', + 'iswalnum', 'iswalpha', 'iswblank', 'iswcntrl', 'iswdigit', + 'iswgraph', 'iswlower', 'iswprint', 'iswpunct', 'iswspace', 'iswupper', + 'iswxdigit', 'iswctype', 'wctype', 'towlower', 'towupper', 'towctrans', + 'wctrans'], +} + +# Identifiers described in Section 7 "Library" of C11 Standard +# Based on ISO/IEC 9899:201x N1570 (Draft 12.04.2011) Annex B -- Library summary +# (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf) +C11_STDLIB_IDENTIFIERS = { + # B.1 Diagnostics + 'assert.h': C99_STDLIB_IDENTIFIERS['assert.h']+ ['static_assert'], + # B.2 Complex + 'complex.h': C99_STDLIB_IDENTIFIERS['complex.h']+['__STDC_NO_COMPLEX__','CMPLX','CMPLXF','CMPLXL'], + # B.3 Character handling + 'ctype.h': C99_STDLIB_IDENTIFIERS['ctype.h'], + # B.4 Errors + 'errno.h': C99_STDLIB_IDENTIFIERS['errno.h']+['__STDC_WANT_LIB_EXT1__', 'errno_t'], + # B.5 Floating-point environment + 'fenv.h': C99_STDLIB_IDENTIFIERS['fenv.h'], + # B.6 Characteristics of floating types + 'float.h': C99_STDLIB_IDENTIFIERS['float.h']+[ + 'FLT_HAS_SUBNORM','DBL_HAS_SUBNORM','LDBL_HAS_SUBNORM', + 'FLT_DECIMAL_DIG','DBL_DECIMAL_DIG','LDBL_DECIMAL_DIG', + 'FLT_TRUE_MIN','DBL_TRUE_MIN','LDBL_TRUE_MIN'], + # B.7 Format conversion of integer types + 'inttypes.h': C99_STDLIB_IDENTIFIERS["inttypes.h"], + # B.8 Alternative spellings + 'iso646.h': C99_STDLIB_IDENTIFIERS["iso646.h"], + # B.9 Size of integer types + 'limits.h': C99_STDLIB_IDENTIFIERS['limits.h'], + # B.10 Localization + 'locale.h': C99_STDLIB_IDENTIFIERS['locale.h'], + # B.11 Mathematics + 'math.h': C99_STDLIB_IDENTIFIERS['math.h'], + # B.12 Nonlocal jumps + 'setjmp.h': C99_STDLIB_IDENTIFIERS['setjmp.h'], + # B.13 Signal handling + 'signal.h': C99_STDLIB_IDENTIFIERS['signal.h'], + # B.14 Alignment + 'stdalign.h': ['alignas','__alignas_is_defined'], + # B.15 Variable arguments + 'stdarg.h': C99_STDLIB_IDENTIFIERS['stdarg.h'], + # B.16 Atomics + 'stdatomic.h': ['ATOMIC_BOOL_LOCK_FREE', 'ATOMIC_CHAR_LOCK_FREE', + 'ATOMIC_CHAR16_T_LOCK_FREE', 'ATOMIC_CHAR32_T_LOCK_FREE', 'ATOMIC_WCHAR_T_LOCK_FREE', + 'ATOMIC_SHORT_LOCK_FREE', 'ATOMIC_INT_LOCK_FREE', 'ATOMIC_LONG_LOCK_FREE', + 'ATOMIC_LLONG_LOCK_FREE', 'ATOMIC_POINTER_LOCK_FREE', 'ATOMIC_FLAG_INIT', + 'memory_order', 'atomic_flag', 'memory_order_relaxed', 'memory_order_consume', + 'memory_order_acquire', 'memory_order_release', 'memory_order_acq_rel', 'memory_order_seq_cst', + 'atomic_bool', 'atomic_char', 'atomic_schar', 'atomic_uchar', 'atomic_short', 'atomic_ushort', + 'atomic_int', 'atomic_uint', 'atomic_long', 'atomic_ulong', 'atomic_llong', 'atomic_ullong', + 'atomic_char16_t', 'atomic_char32_t', 'atomic_wchar_t', 'atomic_int_least8_t', + 'atomic_uint_least8_t', 'atomic_int_least16_t', 'atomic_uint_least16_t', + 'atomic_int_least32_t', 'atomic_uint_least32_t', 'atomic_int_least64_t', + 'atomic_uint_least64_t', 'atomic_int_fast8_t', 'atomic_uint_fast8_t', + 'atomic_int_fast16_t', 'atomic_uint_fast16_t', 'atomic_int_fast32_t', + 'atomic_uint_fast32_t', 'atomic_int_fast64_t', 'atomic_uint_fast64_t', + 'atomic_intptr_t', 'atomic_uintptr_t', 'atomic_size_t', 'atomic_ptrdiff_t', + 'atomic_intmax_t', 'atomic_uintmax_t', 'ATOMIC_VAR_INIT', 'type kill_dependency', + 'atomic_thread_fence', 'atomic_signal_fence', 'atomic_is_lock_free', + 'atomic_store', 'atomic_store_explicit', 'atomic_load', 'atomic_load_explicit', + 'atomic_exchange', 'atomic_exchange_explicit', 'atomic_compare_exchange_strong', + 'atomic_compare_exchange_strong_explicit', 'atomic_compare_exchange_weak', + 'atomic_compare_exchange_weak_explicit', 'atomic_fetch_key', 'atomic_fetch_key_explicit', + 'atomic_flag_test_and_set', 'atomic_flag_test_and_set_explicit', + 'atomic_flag_clear', 'atomic_flag_clear_explicit', ], + # B.17 Boolean type and values + 'stdbool.h': C99_STDLIB_IDENTIFIERS['stdbool.h'], + # B.18 Common definitions + 'stddef.h': C99_STDLIB_IDENTIFIERS['stddef.h'] + + ['max_align_t','__STDC_WANT_LIB_EXT1__', 'rsize_t'], + # B.19 Integer types + 'stdint.h': C99_STDLIB_IDENTIFIERS['stdint.h']+ + ['__STDC_WANT_LIB_EXT1__', 'RSIZE_MAX'], + # B.20 Input/output + 'stdio.h': C99_STDLIB_IDENTIFIERS['stdio.h'] + + ['__STDC_WANT_LIB_EXT1__', 'L_tmpnam_s', 'TMP_MAX_S', 'errno_t', 'rsize_t', + 'tmpfile_s', 'tmpnam_s', 'fopen_s', 'freopen_s', 'fprintf_s', 'fscanf_s', + 'printf_s','scanf_s','snprintf_s','sprintf_s','sscanf_s','vfprintf_s', + 'vfscanf_s', 'vsprintf_s', 'vsscanf_s', 'gets_s' + ], + # B.21 General utilities + 'stdlib.h': C99_STDLIB_IDENTIFIERS['stdlib.h'] + + ['constraint_handler_t', 'set_constraint_handler_s', 'abort_handler_s', + 'ignore_handler_s', 'getenv_s', 'bsearch_s', 'qsort_s', 'wctomb_s', + 'mbstowcs_s', 'wcstombs_s'], + # B.22 Noretrun + 'stdnoreturn.h': ['noreturn'], + # B.23 String handling + 'string.h': C99_STDLIB_IDENTIFIERS['string.h'] + + ['memcpy_s', 'memmoce_s', 'strcpy_s', 'strncpy_s','strcat_s', + 'strtok_s', 'memset_s', 'strerror_s', 'strerrorlen_s', 'strnlen_s'], + # B.24 Type-generic math + 'tgmath.h': C99_STDLIB_IDENTIFIERS['tgmath.h'], + # B.25 Threads + 'threads.h': ['thread_local', 'ONCE_FLAG_INIT', 'TSS_DTOR_ITERATIONS', + 'cnd_t', 'thrd_t', 'tss_t', 'mtx_t', 'tss_dtor_t', 'thrd_start_t', + 'once_flag', 'mtx_plain', 'mtx_recursive', 'mtx_timed', 'thrd_timedout', + 'thrd_success', 'thrd_busy', 'thrd_error', 'thrd_nomem', 'call_once', + 'cnd_broadcast', 'cnd_destroy','cnd_init', 'cnd_signal', 'cnd_timedwait', + 'cnd_wait','mtx_destroy', 'mtx_init', 'mtx_lock', 'mtx_timedlock', + 'mtx_trylock', 'mtx_unlock', 'thrd_create', 'thrd_current', + 'thrd_detach', 'thrd_equal', 'thrd_exit', 'thrd_join', 'thrd_sleep', + 'thrd_yield', 'tss_create', 'tss_delete', 'tss_get', 'tss_set' ], + # B.26 Date and time + 'time.h': C99_STDLIB_IDENTIFIERS['time.h'] + [ + 'asctime_s', 'ctime_s', 'gmtime_s', 'localtime_s' + ], + # B.27 Unicode utilities + 'uchar.h': ['mbstate_t', 'size_t', 'char16_t', 'char32_t', + 'mbrtoc16', 'c16rtomb', 'mbrtoc32', 'c32rtomb' + ], + # B.28 Extended multibyte/wide character utilities + 'wchar.h': C99_STDLIB_IDENTIFIERS["wchar.h"]+[ + 'fwprintf_s', 'fwscanf_s', 'snwprintf_s', 'swprintf_s', 'swscanf_s', + 'vfwprintf_s', 'vfwscanf_s', 'vsnwprintf_s', 'vswprintf_s', 'vswscanf_s', + 'vwprintf_s', 'vwscanf_s', 'wprintf_s', 'wscanf_s', 'wcscpy_s', 'wcsncpy_s', + 'wmemcpy_s', 'wmemmove_s', 'wcscat_s', 'wcsncat_s', 'wcstok_s', 'wcsnlen_s', + 'wcrtomb_s', 'mbsrtowcs_s', 'wcsrtombs_s', + ], + # B.29 Wide character classification and mapping utilities + 'wctype.h': C99_STDLIB_IDENTIFIERS['wctype.h'], +} + +def getStdLib(standard): + if standard == 'c89': + return C90_STDLIB_IDENTIFIERS + if standard == 'c99': + return C99_STDLIB_IDENTIFIERS + return C11_STDLIB_IDENTIFIERS + +def isStdLibId(id_, standard='c99'): + id_lists = getStdLib(standard).values() + for l in id_lists: + if id_ in l: + return True + return False + +# Reserved keywords defined in ISO/IEC9899:1990 -- ch 6.1.1 +C90_KEYWORDS = { + 'auto', 'break', 'case', 'char', 'const', 'continue', 'default', 'do', + 'double', 'else', 'enum', 'extern', 'float', 'for', 'goto', 'if', + 'int', 'long', 'register', 'return', 'short', 'signed', + 'sizeof', 'static', 'struct', 'switch', 'typedef', 'union', 'unsigned', + 'void', 'volatile', 'while' +} + + +# Reserved keywords defined in Section 6.4.1 "Language" of C99 Standard +# Based on ISO/IEC 9899:1999 (E) 6.4.1 Keywords +# Adding the expanding macros from Section 7 too +# (https://www.dii.uchile.cl/~daespino/files/Iso_C_1999_definition.pdf) +C99_ADDED_KEYWORDS = { + 'inline', 'restrict', '_Bool', '_Complex', '_Imaginary', + 'bool', 'complex', 'imaginary' +} + +# Reserved keywords defined in Section 6.4.1 "Language" of C11 Standard +# Based on ISO/IEC 9899:201x N1570 (Draft 12.04.2011) 6.4.1 Keywords +# Adding the expanding macros from Section 7 too +# (https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf) +C11_ADDED_KEYWORDS = { + '_Alignas', '_Alignof', '_Atomic', '_Generic', '_Noreturn', + '_Static_assert', '_Thread_local' , + 'alignas', 'alignof', 'noreturn', 'static_assert','thread_local' +} + +def isKeyword(keyword, standard='c99'): + kw_set = {} + if standard == 'c89': + kw_set = C90_KEYWORDS + elif standard == 'c99': + kw_set = copy.copy(C90_KEYWORDS) + kw_set.update(C99_ADDED_KEYWORDS) + else: + kw_set = copy.copy(C90_KEYWORDS) + kw_set.update(C99_ADDED_KEYWORDS) + kw_set.update(C11_ADDED_KEYWORDS) + return keyword in kw_set + + +def is_source_file(file): + return file.endswith('.c') + + +def is_header(file): + return file.endswith('.h') + + +def is_errno_setting_function(function_name): + return function_name and \ + function_name in ('ftell', 'fgetpos', 'fsetpos', 'fgetwc', 'fputwc' + 'strtoimax', 'strtoumax', 'strtol', 'strtoul', + 'strtoll', 'strtoull', 'strtof', 'strtod', 'strtold' + 'wcstoimax', 'wcstoumax', 'wcstol', 'wcstoul', + 'wcstoll', 'wcstoull', 'wcstof', 'wcstod', 'wcstold' + 'wcrtomb', 'wcsrtombs', 'mbrtowc') + + +def get_type_conversion_to_from(token): + def get_vartok(expr): + while expr: + if isCast(expr): + if expr.astOperand2 is None: + expr = expr.astOperand1 + else: + expr = expr.astOperand2 + elif expr.str in ('.', '::'): + expr = expr.astOperand2 + elif expr.str == '[': + expr = expr.astOperand1 + else: + break + return expr if (expr and expr.variable) else None + + if isCast(token): + vartok = get_vartok(token) + if vartok: + return (token.next, vartok.variable.typeStartToken) + + elif token.str == '=': + lhs = get_vartok(token.astOperand1) + rhs = get_vartok(token.astOperand2) + if lhs and rhs: + return (lhs.variable.typeStartToken, rhs.variable.typeStartToken) + + return None + + +def is_composite_expr(expr, composite_operator=False): + """MISRA C 2012, section 8.10.3""" + if expr is None: + return False + + if not composite_operator: + if expr.str == '?' and simpleMatch(expr.astOperand2, ':'): + colon = expr.astOperand2 + return is_composite_expr(colon.astOperand1,True) or is_composite_expr(colon.astOperand2, True) + if (expr.str in ('+', '-', '*', '/', '%', '&', '|', '^', '>>', "<<", "?", ":", '~')): + return is_composite_expr(expr.astOperand1,True) or is_composite_expr(expr.astOperand2, True) + return False + + # non constant expression? + if expr.isNumber: + return False + if expr.astOperand1 or expr.astOperand2: + return is_composite_expr(expr.astOperand1,True) or is_composite_expr(expr.astOperand2, True) + return True + + +def getEssentialTypeCategory(expr): + if not expr: + return None + if expr.str == ',': + return getEssentialTypeCategory(expr.astOperand2) + if expr.str in ('<', '<=', '==', '!=', '>=', '>', '&&', '||', '!'): + return 'bool' + if expr.str in ('<<', '>>'): + # TODO this is incomplete + return getEssentialTypeCategory(expr.astOperand1) + if len(expr.str) == 1 and expr.str in '+-*/%&|^': + # TODO this is incomplete + e1 = getEssentialTypeCategory(expr.astOperand1) + e2 = getEssentialTypeCategory(expr.astOperand2) + # print('{0}: {1} {2}'.format(expr.str, e1, e2)) + if e1 and e2 and e1 == e2: + return e1 + if expr.valueType: + return expr.valueType.sign + if expr.valueType and expr.valueType.typeScope and expr.valueType.typeScope.className: + return "enum<" + expr.valueType.typeScope.className + ">" + # Unwrap membership, dereferences and array indexing + vartok = expr + while True: + if simpleMatch(vartok, '[') or (vartok and vartok.str == '*' and vartok.astOperand2 is None): + vartok = vartok.astOperand1 + elif simpleMatch(vartok, '.'): + vartok = vartok.astOperand2 + else: + break + if vartok and vartok.variable: + typeToken = vartok.variable.typeStartToken + while typeToken and typeToken.isName: + if typeToken.str == 'char' and not typeToken.isSigned and not typeToken.isUnsigned: + return 'char' + if typeToken.valueType: + if typeToken.valueType.type == 'bool': + return typeToken.valueType.type + if typeToken.valueType.type in ('float', 'double', 'long double'): + return "float" + if typeToken.valueType.sign: + return typeToken.valueType.sign + typeToken = typeToken.next + + # See Appendix D, section D.6, Character constants + if expr.str[0] == "'" and expr.str[-1] == "'": + if len(expr.str) == 3 or (len(expr.str) == 4 and expr.str[1] == '\\'): + return 'char' + return expr.valueType.sign + + if (expr.isCast and expr.str == "("): + castTok = expr.next + while castTok.isName or castTok.str == "*": + if castTok.str == 'char' and not castTok.isSigned and not castTok.isUnsigned: + return 'char' + castTok = castTok.next + + if expr.valueType: + return expr.valueType.sign + return None + + +def getEssentialCategorylist(operand1, operand2): + if not operand1 or not operand2: + return None, None + if (operand1.str in ('++', '--') or + operand2.str in ('++', '--')): + return None, None + if ((operand1.valueType and operand1.valueType.pointer) or + (operand2.valueType and operand2.valueType.pointer)): + return None, None + e1 = getEssentialTypeCategory(operand1) + e2 = getEssentialTypeCategory(operand2) + return e1, e2 + + +def get_essential_type_from_value(value, is_signed): + if value is None: + return None + for t in ('char', 'short', 'int', 'long', 'long long'): + bits = bitsOfEssentialType(t) + if bits >= 64: + continue + if is_signed: + range_min = -(1 << (bits - 1)) + range_max = (1 << (bits - 1)) - 1 + else: + range_min = 0 + range_max = (1 << bits) - 1 + sign = 'signed' if is_signed else 'unsigned' + if is_signed and value < 0 and value >= range_min: + return '%s %s' % (sign, t) + if value >= 0 and value <= range_max: + return '%s %s' % (sign, t) + return None + +def getEssentialType(expr): + if not expr: + return None + + # See Appendix D, section D.6, Character constants + if expr.str[0] == "'" and expr.str[-1] == "'": + if len(expr.str) == 3 or (len(expr.str) == 4 and expr.str[1] == '\\'): + return 'char' + return '%s %s' % (expr.valueType.sign, expr.valueType.type) + + if expr.variable or isCast(expr): + typeToken = expr.variable.typeStartToken if expr.variable else expr.next + while typeToken and typeToken.isName: + if typeToken.str == 'char' and not typeToken.isSigned and not typeToken.isUnsigned: + return 'char' + typeToken = typeToken.next + if expr.valueType: + if expr.valueType.type == 'bool': + return 'bool' + if expr.valueType.isFloat(): + return expr.valueType.type + if expr.valueType.isIntegral(): + if (expr.valueType.sign is None) and expr.valueType.type == 'char': + return 'char' + return '%s %s' % (expr.valueType.sign, expr.valueType.type) + + elif expr.isNumber: + # Appendix D, D.6 The essential type of literal constants + # Integer constants + if expr.valueType.type == 'bool': + return 'bool' + if expr.valueType.isFloat(): + return expr.valueType.type + if expr.valueType.isIntegral(): + if expr.valueType.type != 'int': + return '%s %s' % (expr.valueType.sign, expr.valueType.type) + return get_essential_type_from_value(expr.getKnownIntValue(), expr.valueType.sign == 'signed') + + elif expr.str in ('<', '<=', '>=', '>', '==', '!=', '&&', '||', '!'): + return 'bool' + + elif expr.astOperand1 and expr.astOperand2 and expr.str in ( + '+', '-', '*', '/', '%', '&', '|', '^', '>>', "<<", "?", ":"): + if expr.astOperand1.valueType and expr.astOperand1.valueType.pointer > 0: + return None + if expr.astOperand2.valueType and expr.astOperand2.valueType.pointer > 0: + return None + e1 = getEssentialType(expr.astOperand1) + e2 = getEssentialType(expr.astOperand2) + if e1 is None or e2 is None: + return None + if is_constant_integer_expression(expr): + sign1 = e1.split(' ')[0] + sign2 = e2.split(' ')[0] + if sign1 == sign2 and sign1 in ('signed', 'unsigned'): + e = get_essential_type_from_value(expr.getKnownIntValue(), sign1 == 'signed') + if e: + return e + if bitsOfEssentialType(e2) >= bitsOfEssentialType(e1): + return e2 + return e1 + + elif expr.str == "~": + e1 = getEssentialType(expr.astOperand1) + return e1 + + return None + + +def bitsOfEssentialType(ty): + if ty is None: + return 0 + last_type = ty.split(' ')[-1] + if last_type == 'Boolean': + return 1 + if last_type == 'char': + return typeBits['CHAR'] + if last_type == 'short': + return typeBits['SHORT'] + if last_type == 'int': + return typeBits['INT'] + if ty.endswith('long long'): + return typeBits['LONG_LONG'] + if last_type == 'long': + return typeBits['LONG'] + for sty in STDINT_TYPES: + if ty == sty: + return int(''.join(filter(str.isdigit, sty))) + return 0 + + +def get_function_pointer_type(tok): + ret = '' + while tok and (tok.isName or tok.str == '*'): + ret += ' ' + tok.str + tok = tok.next + if tok is None or tok.str != '(': + return None + tok = tok.link + if not simpleMatch(tok, ') ('): + return None + ret += '(' + tok = tok.next.next + while tok and (tok.str not in '()'): + ret += ' ' + tok.str + tok = tok.next + if (tok is None) or tok.str != ')': + return None + return ret[1:] + ')' + +def isCast(expr): + if not expr or expr.str != '(' or not expr.astOperand1 or expr.astOperand2: + return False + if simpleMatch(expr, '( )'): + return False + return True + +def is_constant_integer_expression(expr): + if expr is None: + return False + if expr.isInt: + return True + if not expr.isArithmeticalOp: + return False + if expr.astOperand1 and not is_constant_integer_expression(expr.astOperand1): + return False + if expr.astOperand2 and not is_constant_integer_expression(expr.astOperand2): + return False + return True + +def isFunctionCall(expr, std='c99'): + if not expr: + return False + if expr.str != '(' or not expr.astOperand1: + return False + if expr.astOperand1 != expr.previous: + return False + if isKeyword(expr.astOperand1.str, std): + return False + return True + + +def hasExternalLinkage(var): + return var.isGlobal and not var.isStatic + + +def countSideEffects(expr): + if not expr or expr.str in (',', ';'): + return 0 + ret = 0 + if expr.str in ('++', '--', '='): + ret = 1 + return ret + countSideEffects(expr.astOperand1) + countSideEffects(expr.astOperand2) + + +def getForLoopExpressions(forToken): + if not forToken or forToken.str != 'for': + return None + lpar = forToken.next + if not lpar or lpar.str != '(': + return None + if not lpar.astOperand2 or lpar.astOperand2.str != ';': + return None + if not lpar.astOperand2.astOperand2 or lpar.astOperand2.astOperand2.str != ';': + return None + return [lpar.astOperand2.astOperand1, + lpar.astOperand2.astOperand2.astOperand1, + lpar.astOperand2.astOperand2.astOperand2] + + +def get_function_scope(cfg, func): + if func: + for scope in cfg.scopes: + if scope.function == func: + return scope + return None + + +def is_variable_changed(start_token, end_token, var): + """Check if variable is updated between body_start and body_end""" + tok = start_token + while tok != end_token: + if tok.isAssignmentOp: + vartok = tok.astOperand1 + while vartok.astOperand1: + vartok = vartok.astOperand1 + if vartok and vartok.variable == var: + return True + tok = tok.next + return False + +def getForLoopCounterVariables(forToken, cfg): + """ Return a set of Variable objects defined in ``for`` statement and + satisfy requirements to loop counter term from section 8.14 of MISRA + document. + """ + if not forToken or forToken.str != 'for': + return None + tn = forToken.next + if not tn or tn.str != '(': + return None + vars_defined = set() + vars_initialized = set() + vars_exit = set() + vars_modified = set() + cur_clause = 1 + te = tn.link + while tn and tn != te: + if tn.variable: + if cur_clause == 1 and tn.variable.nameToken == tn: + vars_defined.add(tn.variable) + elif cur_clause == 2: + vars_exit.add(tn.variable) + elif cur_clause == 3: + if tn.next and countSideEffectsRecursive(tn.next) > 0: + vars_modified.add(tn.variable) + elif tn.previous and tn.previous.str in ('++', '--'): + tn_ast = tn.astParent + if tn_ast and tn_ast == tn.previous: + vars_modified.add(tn.variable) + elif tn_ast and tn_ast.str == '.' and tn_ast.astOperand2 and tn_ast.astOperand2.variable: + vars_modified.add(tn_ast.astOperand2.variable) + if cur_clause == 1 and tn.isAssignmentOp: + var_token = tn.astOperand1 + while var_token and var_token.str == '.': + var_token = var_token.astOperand2 + if var_token and var_token.variable: + vars_initialized.add(var_token.variable) + if cur_clause == 1 and tn.isName and tn.next.str == '(': + function_args_in_init = getArguments(tn.next) + function_scope = get_function_scope(cfg, tn.function) + for arg_nr in range(len(function_args_in_init)): + init_arg = function_args_in_init[arg_nr] + if init_arg is None or not init_arg.isUnaryOp('&'): + continue + var_token = init_arg.astOperand1 + while var_token and var_token.str == '.': + var_token = var_token.astOperand2 + if var_token is None or var_token.variable is None: + continue + changed = False + if function_scope is None: + changed = True + elif tn.function is None: + changed = True + else: + function_body_start = function_scope.bodyStart + function_body_end = function_scope.bodyEnd + args = tn.function.argument[arg_nr + 1] + if function_scope is None or is_variable_changed(function_body_start, function_body_end, args): + changed = True + if changed: + vars_initialized.add(var_token.variable) + + if tn.str == ';': + cur_clause += 1 + tn = tn.next + return vars_defined | vars_initialized, vars_exit & vars_modified + + +def findCounterTokens(cond): + if not cond: + return [] + if cond.str in ['&&', '||']: + c = findCounterTokens(cond.astOperand1) + c.extend(findCounterTokens(cond.astOperand2)) + return c + ret = [] + if ((cond.isArithmeticalOp and cond.astOperand1 and cond.astOperand2) or + (cond.isComparisonOp and cond.astOperand1 and cond.astOperand2)): + if cond.astOperand1.isName: + ret.append(cond.astOperand1) + if cond.astOperand2.isName: + ret.append(cond.astOperand2) + if cond.astOperand1.isOp: + ret.extend(findCounterTokens(cond.astOperand1)) + if cond.astOperand2.isOp: + ret.extend(findCounterTokens(cond.astOperand2)) + return ret + + +def isFloatCounterInWhileLoop(whileToken): + if not simpleMatch(whileToken, 'while ('): + return False + lpar = whileToken.next + rpar = lpar.link + counterTokens = findCounterTokens(lpar.astOperand2) + tok_varid = tuple(tok.varId for tok in counterTokens if tok.varId) + whileBodyStart = None + if simpleMatch(rpar, ') {'): + whileBodyStart = rpar.next + elif simpleMatch(whileToken.previous, '} while') and simpleMatch(whileToken.previous.link.previous, 'do {'): + whileBodyStart = whileToken.previous.link + else: + return False + token = whileBodyStart + while token != whileBodyStart.link: + token = token.next + if not token.varId: + continue + if token.varId not in tok_varid: + continue + if not token.astParent or not token.valueType or not token.valueType.isFloat(): + continue + parent = token.astParent + if parent.str in ('++', '--'): + return True + while parent: + if parent.isAssignmentOp and parent.str != "=" and parent.astOperand1 == token: + return True + if parent.str == "=" and parent.astOperand1.str == token.str and parent.astOperand1 != token: + return True + parent = parent.astParent + return False + + +def countSideEffectsRecursive(expr): + if not expr or expr.str == ';': + return 0 + if expr.str == '=' and expr.astOperand1 and expr.astOperand1.str == '[': + prev = expr.astOperand1.previous + if prev and (prev.str == '{' or prev.str == '{'): + return countSideEffectsRecursive(expr.astOperand2) + if expr.str == '=' and expr.astOperand1 and expr.astOperand1.str == '.': + e = expr.astOperand1 + while e and e.str == '.' and e.astOperand2: + e = e.astOperand1 + if e and e.str == '.': + return 0 + if expr.isAssignmentOp or expr.str in {'++', '--'}: + return 1 + # Todo: Check function calls + return countSideEffectsRecursive(expr.astOperand1) + countSideEffectsRecursive(expr.astOperand2) + + +def isBoolExpression(expr): + if not expr: + return False + if expr.valueType and (expr.valueType.type == 'bool' or expr.valueType.bits == 1): + return True + return expr.str in ['!', '==', '!=', '<', '<=', '>', '>=', '&&', '||', '0', '1', 'true', 'false'] + + +def isEnumConstant(expr): + if not expr or not expr.values: + return False + values = expr.values + return len(values) == 1 and values[0].valueKind == 'known' + + +def isConstantExpression(expr): + if expr.isNumber: + return True + if expr.isName and not isEnumConstant(expr): + return False + if simpleMatch(expr.previous, 'sizeof ('): + return True + if expr.astOperand1 and not isConstantExpression(expr.astOperand1): + return False + if expr.astOperand2 and not isConstantExpression(expr.astOperand2): + return False + return True + +def isUnknownConstantExpression(expr): + if expr.isName and not isEnumConstant(expr) and expr.variable is None: + return True + if expr.astOperand1 and isUnknownConstantExpression(expr.astOperand1): + return True + if expr.astOperand2 and isUnknownConstantExpression(expr.astOperand2): + return True + return False + +def isUnsignedInt(expr): + return expr and expr.valueType and expr.valueType.type in ('short', 'int') and expr.valueType.sign == 'unsigned' + + +def getPrecedence(expr): + if not expr: + return 16 + if not expr.astOperand1 or not expr.astOperand2: + return 16 + if expr.str in ('*', '/', '%'): + return 12 + if expr.str in ('+', '-'): + return 11 + if expr.str in ('<<', '>>'): + return 10 + if expr.str in ('<', '>', '<=', '>='): + return 9 + if expr.str in ('==', '!='): + return 8 + if expr.str == '&': + return 7 + if expr.str == '^': + return 6 + if expr.str == '|': + return 5 + if expr.str == '&&': + return 4 + if expr.str == '||': + return 3 + if expr.str in ('?', ':'): + return 2 + if expr.isAssignmentOp: + return 1 + if expr.str == ',': + return 0 + return -1 + + +def findRawLink(token): + tok1 = None + tok2 = None + forward = False + + if token.str in '{([': + tok1 = token.str + tok2 = '})]'['{(['.find(token.str)] + forward = True + elif token.str in '})]': + tok1 = token.str + tok2 = '{(['['})]'.find(token.str)] + forward = False + else: + return None + + # try to find link + indent = 0 + while token: + if token.str == tok1: + indent = indent + 1 + elif token.str == tok2: + if indent <= 1: + return token + indent = indent - 1 + if forward is True: + token = token.next + else: + token = token.previous + + # raw link not found + return None + + +def numberOfParentheses(tok1, tok2): + while tok1 and tok1 != tok2: + if tok1.str == '(' or tok1.str == ')': + return False + tok1 = tok1.next + return tok1 == tok2 + + +def findGotoLabel(gotoToken): + label = gotoToken.next.str + tok = gotoToken.next.next + while tok: + if tok.str == '}' and tok.scope.type == 'Function': + break + if tok.str == label and tok.next.str == ':': + return tok + tok = tok.next + return None + + +def findInclude(directives, header): + for directive in directives: + if directive.str == '#include ' + header: + return directive + return None + + +# Get function arguments +def getArgumentsRecursive(tok, arguments): + if tok is None: + return + if tok.str == ',': + getArgumentsRecursive(tok.astOperand1, arguments) + getArgumentsRecursive(tok.astOperand2, arguments) + else: + arguments.append(tok) + + +def getArguments(ftok): + arguments = [] + getArgumentsRecursive(ftok.astOperand2, arguments) + return arguments + + +def isalnum(c): + return c in string.digits or c in string.ascii_letters + + +def isHexEscapeSequence(symbols): + """Checks that given symbols are valid hex escape sequence. + + hexadecimal-escape-sequence: + \\x hexadecimal-digit + hexadecimal-escape-sequence hexadecimal-digit + + Reference: n1570 6.4.4.4""" + if len(symbols) < 3 or symbols[:2] != '\\x': + return False + return all([s in string.hexdigits for s in symbols[2:]]) + + +def isOctalEscapeSequence(symbols): + r"""Checks that given symbols are valid octal escape sequence: + + octal-escape-sequence: + \ octal-digit + \ octal-digit octal-digit + \ octal-digit octal-digit octal-digit + + Reference: n1570 6.4.4.4""" + if len(symbols) not in range(2, 5) or symbols[0] != '\\': + return False + return all([s in string.octdigits for s in symbols[1:]]) + + +def isSimpleEscapeSequence(symbols): + """Checks that given symbols are simple escape sequence. + Reference: n1570 6.4.4.4""" + if len(symbols) != 2 or symbols[0] != '\\': + return False + return symbols[1] in ("'", '"', '?', '\\', 'a', 'b', 'f', 'n', 'r', 't', 'v') + + +def isTernaryOperator(token): + if not token: + return False + if not token.astOperand2: + return False + return token.str == '?' and token.astOperand2.str == ':' + + +def getTernaryOperandsRecursive(token): + """Returns list of ternary operands including nested ones.""" + if not isTernaryOperator(token): + return [] + result = [] + result += getTernaryOperandsRecursive(token.astOperand2.astOperand1) + if token.astOperand2.astOperand1 and not isTernaryOperator(token.astOperand2.astOperand1): + result += [token.astOperand2.astOperand1] + result += getTernaryOperandsRecursive(token.astOperand2.astOperand2) + if token.astOperand2.astOperand2 and not isTernaryOperator(token.astOperand2.astOperand2): + result += [token.astOperand2.astOperand2] + return result + + +def hasNumericEscapeSequence(symbols): + """Check that given string contains octal or hexadecimal escape sequences.""" + if '\\' not in symbols: + return False + for c, cn in grouped(symbols, 2): + if c == '\\' and cn in ('x' + string.octdigits): + return True + return False + + +def isNoReturnScope(tok): + if tok is None or tok.str != '}': + return False + if tok.previous is None or tok.previous.str != ';': + return False + if simpleMatch(tok.previous.previous, 'break ;'): + return True + prev = tok.previous.previous + while prev and prev.str not in ';{}': + if prev.str in '])': + prev = prev.link + prev = prev.previous + if prev and prev.next.str in ['throw', 'return']: + return True + return False + + +# Return the token which the value is assigned to +def getAssignedVariableToken(vartok): + if not vartok: + return None + parent = vartok.astParent + while parent and parent.isArithmeticalOp: + parent = parent.astParent + if parent and parent.isAssignmentOp: + return parent.astOperand1 + return None + +# If the value is used as a return value, return the function definition +def getFunctionUsingReturnValue(valueToken): + if not valueToken: + return None + if not valueToken.astParent: + return None + operator = valueToken.astParent + if operator.str == 'return': + return operator.scope.function + if operator.isArithmeticalOp: + return getFunctionUsingReturnValue(operator) + return None + +# Return true if the token follows a specific sequence of token str values +def tokenFollowsSequence(token, sequence): + if not token: + return False + for i in reversed(sequence): + prev = token.previous + if not prev: + return False + if prev.str != i: + return False + token = prev + return True + +class Define: + def __init__(self, directive): + self.name = '' + self.args = [] + self.expansionList = '' + + res = re.match(r'#define ([A-Za-z0-9_]+)\(([A-Za-z0-9_, ]+)\)[ ]+(.*)', directive.str) + if res: + self.name = res.group(1) + self.args = res.group(2).strip().split(',') + self.expansionList = res.group(3) + else: + res = re.match(r'#define ([A-Za-z0-9_]+)[ ]+(.*)', directive.str) + if res: + self.name = res.group(1) + self.expansionList = res.group(2) + + def __repr__(self): + attrs = ["name", "args", "expansionList"] + return "{}({})".format( + "Define", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + +def getAddonRules(): + """Returns dict of MISRA rules handled by this addon.""" + addon_rules = [] + compiled = re.compile(r'.*def[ ]+misra_([0-9]+)_([0-9]+)[(].*') + with open(__file__) as f: + for line in f: + res = compiled.match(line) + if res is None: + continue + addon_rules.append(res.group(1) + '.' + res.group(2)) + return addon_rules + + +def getCppcheckRules(): + """Returns list of rules handled by cppcheck.""" + return ['1.3', # + '2.1', # alwaysFalse, duplicateBreak + '2.2', # alwaysTrue, redundantCondition, redundantAssignment, redundantAssignInSwitch, unreadVariable + '2.6', # unusedLabel + '5.3', # shadowVariable + '8.3', # funcArgNamesDifferent + '8.13', # constPointer + '9.1', # uninitvar + '14.3', # alwaysTrue, alwaysFalse, compareValueOutOfTypeRangeError + '13.2', # unknownEvaluationOrder + '13.6', # sizeofCalculation + '17.4', # missingReturn + '17.5', # argumentSize + '18.1', # pointerOutOfBounds + '18.2', # comparePointers + '18.3', # comparePointers + '18.6', # danglingLifetime + '19.1', # overlappingWriteUnion, overlappingWriteFunction + '20.6', # preprocessorErrorDirective + '21.13', # invalidFunctionArg + '21.17', # bufferAccessOutOfBounds + '21.18', # bufferAccessOutOfBounds + '22.1', # memleak, resourceLeak, memleakOnRealloc, leakReturnValNotUsed, leakNoVarFunctionCall + '22.2', # autovarInvalidDeallocation + '22.3', # incompatibleFileOpen + '22.4', # writeReadOnlyFile + '22.6' # useClosedFile + ] + + +def generateTable(): + # print table + numberOfRules = {} + numberOfRules[1] = 3 + numberOfRules[2] = 7 + numberOfRules[3] = 2 + numberOfRules[4] = 2 + numberOfRules[5] = 9 + numberOfRules[6] = 2 + numberOfRules[7] = 4 + numberOfRules[8] = 14 + numberOfRules[9] = 5 + numberOfRules[10] = 8 + numberOfRules[11] = 9 + numberOfRules[12] = 4 + numberOfRules[13] = 6 + numberOfRules[14] = 4 + numberOfRules[15] = 7 + numberOfRules[16] = 7 + numberOfRules[17] = 8 + numberOfRules[18] = 8 + numberOfRules[19] = 2 + numberOfRules[20] = 14 + numberOfRules[21] = 21 + numberOfRules[22] = 10 + + # Rules that can be checked with compilers: + # compiler = ['1.1', '1.2'] + + addon = getAddonRules() + cppcheck = getCppcheckRules() + for i1 in range(1, 23): + for i2 in range(1, numberOfRules[i1] + 1): + num = str(i1) + '.' + str(i2) + s = '' + if num in addon: + s = 'X (Addon)' + elif num in cppcheck: + s = 'X (Cppcheck)' + num = num + ' ' + print(num[:8] + s) + + +def remove_file_prefix(file_path, prefix): + """ + Remove a file path prefix from a give path. leftover + directory separators at the beginning of a file + after the removal are also stripped. + + Example: + '/remove/this/path/file.c' + with a prefix of: + '/remove/this/path' + becomes: + file.c + """ + result = None + if file_path.startswith(prefix): + result = file_path[len(prefix):] + # Remove any leftover directory separators at the + # beginning + result = result.lstrip('\\/') + else: + result = file_path + return result + + +class Rule(): + """Class to keep rule text and metadata""" + + MISRA_SEVERITY_LEVELS = ['Required', 'Mandatory', 'Advisory'] + + def __init__(self, num1, num2): + self.num1 = num1 + self.num2 = num2 + self.text = '' + self.misra_severity = '' + + @property + def num(self): + return self.num1 * 100 + self.num2 + + @property + def misra_severity(self): + return self._misra_severity + + @misra_severity.setter + def misra_severity(self, val): + if val in self.MISRA_SEVERITY_LEVELS: + self._misra_severity = val + else: + self._misra_severity = '' + + @property + def cppcheck_severity(self): + return 'style' + + def __repr__(self): + return "%d.%d (%s)" % (self.num1, self.num2, self.misra_severity) + + +class MisraSettings(): + """Hold settings for misra.py script.""" + + __slots__ = ["verify", "quiet", "show_summary"] + + def __init__(self, args): + """ + :param args: Arguments given by argparse. + """ + self.verify = False + self.quiet = False + self.show_summary = True + + if args.verify: + self.verify = True + if args.cli: + self.quiet = True + self.show_summary = False + if args.quiet: + self.quiet = True + if args.no_summary: + self.show_summary = False + + def __repr__(self): + attrs = ["verify", "quiet", "show_summary", "verify"] + return "{}({})".format( + "MisraSettings", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + +class MisraChecker: + + def __init__(self, settings, stdversion="c89"): + """ + :param settings: misra.py script settings. + """ + + self.settings = settings + + # Test validation rules lists + self.verify_expected = [] + self.verify_actual = [] + + # List of formatted violation messages + self.violations = {} + + # if --rule-texts is specified this dictionary + # is loaded with descriptions of each rule + # by rule number (in hundreds). + # ie rule 1.2 becomes 102 + self.ruleTexts = {} + self.ruleText_filename = None + + # Dictionary of dictionaries for rules to suppress + # Dict1 is keyed by rule number in the hundreds format of + # Major * 100 + minor. ie Rule 5.2 = (5*100) + 2 + # Dict 2 is keyed by filename. An entry of None means suppress globally. + # Each file name entry contains a list of tuples of (lineNumber, symbolName) + # or an item of None which indicates suppress rule for the entire file. + # The line and symbol name tuple may have None as either of its elements but + # should not be None for both. + self.suppressedRules = {} + + # Prefix to ignore when matching suppression files. + self.filePrefix = None + + # Number of all violations suppressed per rule + self.suppressionStats = {} + + self.stdversion = stdversion + + self.severity = None + + self.existing_violations = set() + + self._ctu_summary_typedefs = False + self._ctu_summary_tagnames = False + self._ctu_summary_identifiers = False + self._ctu_summary_usage = False + + self.path_premium_addon = None + + def __repr__(self): + attrs = ["settings", "verify_expected", "verify_actual", "violations", + "ruleTexts", "suppressedRules", "filePrefix", + "suppressionStats", "stdversion", "severity"] + return "{}({})".format( + "MisraChecker", + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + def get_num_significant_naming_chars(self, cfg): + if cfg.standards and cfg.standards.c == "c89": + return 31 + return 63 + + def _save_ctu_summary_typedefs(self, dumpfile, typedef_info): + if self._ctu_summary_typedefs: + return + + self._ctu_summary_typedefs = True + + summary = [] + for ti in typedef_info: + summary.append({ 'name': ti.name, 'file': ti.file, 'line': ti.linenr, 'column': ti.column, 'used': ti.used }) + if len(summary) > 0: + cppcheckdata.reportSummary(dumpfile, 'MisraTypedefInfo', summary) + + def _save_ctu_summary_tagnames(self, dumpfile, cfg): + if self._ctu_summary_tagnames: + return + + self._ctu_summary_tagnames = True + + summary = [] + # structs/enums + for scope in cfg.scopes: + if scope.className is None: + continue + if scope.className.startswith('Anonymous'): + continue + if scope.type not in ('Struct', 'Enum'): + continue + used = False + tok = scope.bodyEnd + while tok: + if tok.str == scope.className: + used = True + break + tok = tok.next + summary.append({'name': scope.className, 'used':used, 'file': scope.bodyStart.file, 'line': scope.bodyStart.linenr, 'column': scope.bodyStart.column}) + if len(summary) > 0: + cppcheckdata.reportSummary(dumpfile, 'MisraTagName', summary) + + def _save_ctu_summary_identifiers(self, dumpfile, cfg): + if self._ctu_summary_identifiers: + return + self._ctu_summary_identifiers = True + + external_identifiers = [] + internal_identifiers = [] + local_identifiers = [] + + def identifier(nameToken): + return {'name':nameToken.str, 'file':nameToken.file, 'line':nameToken.linenr, 'column':nameToken.column} + + names = [] + + for var in cfg.variables: + if var.nameToken is None: + continue + if var.access != 'Global': + if var.nameToken.str in names: + continue + names.append(var.nameToken.str) + local_identifiers.append(identifier(var.nameToken)) + elif var.isStatic: + names.append(var.nameToken.str) + i = identifier(var.nameToken) + i['inlinefunc'] = False + internal_identifiers.append(i) + else: + names.append(var.nameToken.str) + i = identifier(var.nameToken) + i['decl'] = var.isExtern + external_identifiers.append(i) + + for func in cfg.functions: + if func.tokenDef is None: + continue + if func.isStatic: + i = identifier(func.tokenDef) + i['inlinefunc'] = func.isInlineKeyword + internal_identifiers.append(i) + else: + if func.token is None: + i = identifier(func.tokenDef) + else: + i = identifier(func.token) + i['decl'] = func.token is None + external_identifiers.append(i) + + cppcheckdata.reportSummary(dumpfile, 'MisraExternalIdentifiers', external_identifiers) + cppcheckdata.reportSummary(dumpfile, 'MisraInternalIdentifiers', internal_identifiers) + cppcheckdata.reportSummary(dumpfile, 'MisraLocalIdentifiers', local_identifiers) + + def _save_ctu_summary_usage(self, dumpfile, cfg): + if self._ctu_summary_usage: + return + self._ctu_summary_usage = True + + names = [] + for token in cfg.tokenlist: + if not token.isName: + continue + if token.function and token != token.function.tokenDef: + if (not token.function.isStatic) and (token.str not in names): + names.append({'name': token.str, 'file': token.file}) + elif token.variable: + if token == token.variable.nameToken: + continue + if token.variable.access == 'Global' and (not token.variable.isStatic) and (token.str not in names): + names.append({'name': token.str, 'file': token.file}) + + if len(names) > 0: + cppcheckdata.reportSummary(dumpfile, 'MisraUsage', names) + + + def misra_1_2(self, cfg): + # gcc language extensions: https://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html + for token in cfg.tokenlist: + if simpleMatch(token, '? :'): + self.reportError(token, 1, 2) + elif simpleMatch(token, '( {') and simpleMatch(token.next.link.previous, '; } )'): + self.reportError(token, 1, 2) + + + def misra_1_4(self, cfg): + for token in cfg.tokenlist: + if token.str in ('_Atomic', '_Noreturn', '_Generic', '_Thread_local', '_Alignas', '_Alignof'): + self.reportError(token, 1, 4) + if token.str.endswith('_s') and isFunctionCall(token.next, cfg.standards.c): + # See C specification C11 - Annex K, page 578 + if token.str in ('tmpfile_s', 'tmpnam_s', 'fopen_s', 'freopen_s', 'fprintf_s', 'fscanf_s', 'printf_s', 'scanf_s', + 'snprintf_s', 'sprintf_s', 'sscanf_s', 'vfprintf_s', 'vfscanf_s', 'vprintf_s', 'vscanf_s', + 'vsnprintf_s', 'vsprintf_s', 'vsscanf_s', 'gets_s', 'set_constraint_handler_s', 'abort_handler_s', + 'ignore_handler_s', 'getenv_s', 'bsearch_s', 'qsort_s', 'wctomb_s', 'mbstowcs_s', 'wcstombs_s', + 'memcpy_s', 'memmove_s', 'strcpy_s', 'strncpy_s', 'strcat_s', 'strncat_s', 'strtok_s', 'memset_s', + 'strerror_s', 'strerrorlen_s', 'strnlen_s', 'asctime_s', 'ctime_s', 'gmtime_s', 'localtime_s', + 'fwprintf_s', 'fwscanf_s', 'snwprintf_s', 'swprintf_s', 'swscanf_s', 'vfwprintf_s', 'vfwscanf_s', + 'vsnwprintf_s', 'vswprintf_s', 'vswscanf_s', 'vwprintf_s', 'vwscanf_s', 'wprintf_s', 'wscanf_s', + 'wcscpy_s', 'wcsncpy_s', 'wmemcpy_s', 'wmemmove_s', 'wcscat_s', 'wcsncat_s', 'wcstok_s', 'wcsnlen_s', + 'wcrtomb_s', 'mbsrtowcs_s', 'wcsrtombs_s'): + self.reportError(token, 1, 4) + + def misra_2_2(self, cfg): + for token in cfg.tokenlist: + if token.isExpandedMacro: + continue + if (token.str in '+-') and token.astOperand2: + if simpleMatch(token.astOperand1, '0'): + self.reportError(token.astOperand1, 2, 2) + elif simpleMatch(token.astOperand2, '0'): + self.reportError(token.astOperand2, 2, 2) + if token.str == '*' and token.astOperand2: + if simpleMatch(token.astOperand2, '0'): + self.reportError(token.astOperand1, 2, 2) + elif simpleMatch(token.astOperand1, '0'): + self.reportError(token.astOperand2, 2, 2) + elif simpleMatch(token.astOperand1, '1'): + self.reportError(token.astOperand1, 2, 2) + elif simpleMatch(token.astOperand2, '1'): + self.reportError(token.astOperand2, 2, 2) + + def misra_2_3(self, dumpfile, typedefInfo): + self._save_ctu_summary_typedefs(dumpfile, typedefInfo) + + def misra_2_4(self, dumpfile, cfg): + self._save_ctu_summary_tagnames(dumpfile, cfg) + + def misra_2_5(self, dumpfile, cfg): + used_macros = [] + unused_macro = {} + for m in cfg.macro_usage: + used_macros.append(m.name) + for directive in cfg.directives: + res_define = re.match(r'#define[ \t]+([a-zA-Z_][a-zA-Z_0-9]*).*', directive.str) + res_undef = re.match(r'#undef[ \t]+([a-zA-Z_][a-zA-Z_0-9]*).*', directive.str) + if res_define: + macro_name = res_define.group(1) + unused_macro[macro_name] = {'name': macro_name, 'used': (macro_name in used_macros), + 'file': directive.file, 'line': directive.linenr, 'column': directive.column} + elif res_undef: + macro_name = res_undef.group(1) + # assuming that if we have #undef, we also have #define somewhere + if macro_name in unused_macro: + unused_macro[macro_name]['used'] = True + else: + unused_macro[macro_name] = {'name': macro_name, 'used': True, 'file': directive.file, + 'line': directive.linenr, 'column': directive.column} + used_macros.append(macro_name) + + if unused_macro: + cppcheckdata.reportSummary(dumpfile, 'MisraMacro', list(unused_macro.values())) + + def misra_2_7(self, data): + for func in data.functions: + # Skip function with no parameter + if len(func.argument) == 0: + continue + # Setup list of function parameters + func_param_list = [] + for arg in func.argument: + func_arg = func.argument[arg] + if func_arg.typeStartToken and func_arg.typeStartToken.str == '...': + continue + func_param_list.append(func_arg) + # Search for scope of current function + for scope in data.scopes: + if (scope.type == "Function") and (scope.function == func): + # Search function body: remove referenced function parameter from list + token = scope.bodyStart + while token.next is not None and token != scope.bodyEnd and len(func_param_list) > 0: + if token.variable is not None and token.variable in func_param_list: + func_param_list.remove(token.variable) + token = token.next + # Emit a warning for each unused variable, but no more that one warning per line + reported_linenrs = set() + for func_param in func_param_list: + if func_param.nameToken: + linenr = func_param.nameToken + if linenr not in reported_linenrs: + self.reportError(func_param.nameToken, 2, 7) + reported_linenrs.add(linenr) + else: + linenr = func.tokenDef.linenr + if linenr not in reported_linenrs: + self.reportError(func.tokenDef, 2, 7) + reported_linenrs.add(linenr) + + def misra_3_1(self, rawTokens): + for token in rawTokens: + starts_with_double_slash = token.str.startswith('//') + starts_with_block_comment = token.str.startswith("/*") + s = token.str.lstrip('/') + if (starts_with_double_slash or starts_with_block_comment) and "/*" in s: + # Block comment inside of regular comment, violation + self.reportError(token, 3, 1) + elif starts_with_block_comment and "//" in s: + # "//" in block comment, check if it's a uri + while "//" in s: + possible_uri, s = s.split("//", 1) + if not re.search(r"\w+:$", possible_uri): + # Violation if no uri was found + self.reportError(token, 3, 1) + break + + def misra_4_1(self, rawTokens): + for token in rawTokens: + if (token.str[0] != '"') and (token.str[0] != '\''): + continue + if len(token.str) < 3: + continue + + delimiter = token.str[0] + symbols = token.str[1:-1] + + # No closing delimiter. This will not compile. + if token.str[-1] != delimiter: + continue + + if len(symbols) < 2: + continue + + if not hasNumericEscapeSequence(symbols): + continue + + # String literals that contains one or more escape sequences. All of them should be + # terminated. + for sequence in ['\\' + t for t in symbols.split('\\')][1:]: + if (isHexEscapeSequence(sequence) or isOctalEscapeSequence(sequence) or + isSimpleEscapeSequence(sequence)): + continue + self.reportError(token, 4, 1) + + def misra_4_2(self, rawTokens): + for token in rawTokens: + if (token.str[0] != '"') or (token.str[-1] != '"'): + continue + # Check for trigraph sequence as defined by ISO/IEC 9899:1999 + for sequence in ['??=', '??(', '??/', '??)', '??\'', '??<', '??!', '??>', '??-']: + if sequence in token.str[1:-1]: + # First trigraph sequence match, report error and leave loop. + self.reportError(token, 4, 2) + break + + def misra_5_1(self, data): + long_vars = {} + num_sign_chars = self.get_num_significant_naming_chars(data) + for var in data.variables: + if var.nameToken is None: + continue + if len(var.nameToken.str) <= num_sign_chars: + continue + if not hasExternalLinkage(var): + continue + long_vars.setdefault(var.nameToken.str[:num_sign_chars], []).append(var.nameToken) + for name_prefix in long_vars: + tokens = long_vars[name_prefix] + if len(tokens) < 2: + continue + for tok in sorted(tokens, key=lambda t: (t.linenr, t.column))[1:]: + self.reportError(tok, 5, 1) + + def misra_5_2(self, data): + scopeVars = {} + num_sign_chars = self.get_num_significant_naming_chars(data) + for var in data.variables: + if var.nameToken is None: + continue + if len(var.nameToken.str) <= num_sign_chars: + continue + if var.nameToken.scope not in scopeVars: + scopeVars.setdefault(var.nameToken.scope, {})["varlist"] = [] + scopeVars.setdefault(var.nameToken.scope, {})["scopelist"] = [] + scopeVars[var.nameToken.scope]["varlist"].append(var) + for scope in data.scopes: + if scope.nestedIn and scope.className: + if scope.nestedIn not in scopeVars: + scopeVars.setdefault(scope.nestedIn, {})["varlist"] = [] + scopeVars.setdefault(scope.nestedIn, {})["scopelist"] = [] + scopeVars[scope.nestedIn]["scopelist"].append(scope) + for scope in scopeVars: + if len(scopeVars[scope]["varlist"]) <= 1: + continue + for i, variable1 in enumerate(scopeVars[scope]["varlist"]): + for variable2 in scopeVars[scope]["varlist"][i + 1:]: + if variable1.isArgument and variable2.isArgument: + continue + if hasExternalLinkage(variable1) or hasExternalLinkage(variable2): + continue + if (variable1.nameToken.str[:num_sign_chars] == variable2.nameToken.str[:num_sign_chars] and + variable1 is not variable2): + if int(variable1.nameToken.linenr) > int(variable2.nameToken.linenr): + self.reportError(variable1.nameToken, 5, 2) + else: + self.reportError(variable2.nameToken, 5, 2) + for innerscope in scopeVars[scope]["scopelist"]: + if variable1.nameToken.str[:num_sign_chars] == innerscope.className[:num_sign_chars]: + if int(variable1.nameToken.linenr) > int(innerscope.bodyStart.linenr): + self.reportError(variable1.nameToken, 5, 2) + else: + self.reportError(innerscope.bodyStart, 5, 2) + if len(scopeVars[scope]["scopelist"]) <= 1: + continue + for i, scopename1 in enumerate(scopeVars[scope]["scopelist"]): + for scopename2 in scopeVars[scope]["scopelist"][i + 1:]: + if scopename1.className[:num_sign_chars] == scopename2.className[:num_sign_chars]: + if int(scopename1.bodyStart.linenr) > int(scopename2.bodyStart.linenr): + self.reportError(scopename1.bodyStart, 5, 2) + else: + self.reportError(scopename2.bodyStart, 5, 2) + + def misra_5_4(self, data): + num_sign_chars = self.get_num_significant_naming_chars(data) + macro = {} + compile_name = re.compile(r'#define ([a-zA-Z0-9_]+)') + compile_param = re.compile(r'#define ([a-zA-Z0-9_]+)[(]([a-zA-Z0-9_, ]+)[)]') + short_names = {} + macro_w_arg = [] + for dir in data.directives: + res1 = compile_name.match(dir.str) + if res1: + if dir not in macro: + macro.setdefault(dir, {})["name"] = [] + macro.setdefault(dir, {})["params"] = [] + full_name = res1.group(1) + macro[dir]["name"] = full_name + short_name = full_name[:num_sign_chars] + if short_name in short_names: + _dir = short_names[short_name] + if full_name != macro[_dir]["name"]: + self.reportError(dir, 5, 4) + else: + short_names[short_name] = dir + res2 = compile_param.match(dir.str) + if res2: + res_gp2 = res2.group(2).split(",") + res_gp2 = [macroname.replace(" ", "") for macroname in res_gp2] + macro[dir]["params"].extend(res_gp2) + macro_w_arg.append(dir) + for mvar in macro_w_arg: + for i, macroparam1 in enumerate(macro[mvar]["params"]): + for j, macroparam2 in enumerate(macro[mvar]["params"]): + if j > i and macroparam1[:num_sign_chars] == macroparam2[:num_sign_chars]: + self.reportError(mvar, 5, 4) + param = macroparam1 + if param[:num_sign_chars] in short_names: + m_var1 = short_names[param[:num_sign_chars]] + if m_var1.linenr > mvar.linenr: + self.reportError(m_var1, 5, 4) + else: + self.reportError(mvar, 5, 4) + + def misra_5_5(self, data): + num_sign_chars = self.get_num_significant_naming_chars(data) + macroNames = {} + compiled = re.compile(r'#define ([A-Za-z0-9_]+)') + for dir in data.directives: + res = compiled.match(dir.str) + if res: + macroNames[res.group(1)[:num_sign_chars]] = dir + for var in data.variables: + if var.nameToken and var.nameToken.str[:num_sign_chars] in macroNames: + self.reportError(var.nameToken, 5, 5) + for scope in data.scopes: + if scope.className and scope.className[:num_sign_chars] in macroNames: + self.reportError(scope.bodyStart, 5, 5) + + + def misra_5_6(self, dumpfile, typedefInfo): + self._save_ctu_summary_typedefs(dumpfile, typedefInfo) + + def misra_5_7(self, dumpfile, cfg): + self._save_ctu_summary_tagnames(dumpfile, cfg) + + def misra_5_8(self, dumpfile, cfg): + self._save_ctu_summary_identifiers(dumpfile, cfg) + + def misra_5_9(self, dumpfile, cfg): + self._save_ctu_summary_identifiers(dumpfile, cfg) + + def misra_6_1(self, data): + # Bitfield type must be bool or explicitly signed/unsigned int + for token in data.tokenlist: + if not token.valueType: + continue + if token.valueType.bits is None: + continue + if not token.variable: + continue + if not token.scope: + continue + if token.scope.type not in 'Struct': + continue + + if data.standards.c == 'c89': + if token.valueType.type != 'int' and not isUnsignedType(token.variable.typeStartToken.str): + self.reportError(token, 6, 1) + elif data.standards.c in ('c99', 'c11', 'c17', 'c18'): + if token.valueType.type == 'bool': + continue + + isExplicitlySignedOrUnsigned = False + typeToken = token.variable.typeStartToken + while typeToken: + if typeToken.isUnsigned or typeToken.isSigned or isUnsignedType(typeToken.str): + isExplicitlySignedOrUnsigned = True + break + + if typeToken is token.variable.typeEndToken: + break + + typeToken = typeToken.next + + if not isExplicitlySignedOrUnsigned: + self.reportError(token, 6, 1) + + + def misra_6_2(self, data): + # Bitfields of size 1 can not be signed + for token in data.tokenlist: + if not token.valueType: + continue + if not token.scope: + continue + if token.scope.type not in 'Struct': + continue + if token.valueType.bits == 1 and token.valueType.sign == 'signed': + self.reportError(token, 6, 2) + + + def misra_7_1(self, rawTokens): + compiled = re.compile(r'^0[0-7]+$') + for tok in rawTokens: + if compiled.match(tok.str): + self.reportError(tok, 7, 1) + + def misra_7_2(self, data): + for token in data.tokenlist: + if token.isInt and ('U' not in token.str.upper()) and token.valueType and token.valueType.sign == 'unsigned': + self.reportError(token, 7, 2) + + def misra_7_3(self, rawTokens): + # Match decimal digits, hex digits, decimal point, and e/E p/P floating + # point constant exponent separators. + compiled = re.compile(r'^(0[xX])?[0-9a-fA-FpP.]+[Uu]*l+[Uu]*$') + for tok in rawTokens: + if compiled.match(tok.str): + self.reportError(tok, 7, 3) + + def misra_7_4(self, data): + # A string literal shall not be assigned to an object unless the object's type + # is constant. + def reportErrorIfVariableIsNotConst(variable, stringLiteral): + if variable.valueType: + if (variable.valueType.constness % 2) != 1: + self.reportError(stringLiteral, 7, 4) + + for token in data.tokenlist: + if token.isString: + # Check normal variable assignment + variable = getAssignedVariableToken(token) + if variable: + reportErrorIfVariableIsNotConst(variable, token) + + # Check use as return value + function = getFunctionUsingReturnValue(token) + if function: + # "Primitive" test since there is no info available on return value type + if not tokenFollowsSequence(function.tokenDef, ['const', 'char', '*']): + self.reportError(token, 7, 4) + + # Check use as function parameter + if isFunctionCall(token, data.standards.c) and token.astOperand1 and token.astOperand1.function: + functionDeclaration = token.astOperand1.function + + if functionDeclaration.tokenDef: + if functionDeclaration.tokenDef is token.astOperand1: + # Token is not a function call, but it is the definition of the function + continue + + parametersUsed = getArguments(token) + for i in range(len(parametersUsed)): + usedParameter = parametersUsed[i] + parameterDefinition = functionDeclaration.argument.get(i+1) + + if usedParameter.isString and parameterDefinition and parameterDefinition.nameToken: + reportErrorIfVariableIsNotConst(parameterDefinition.nameToken, usedParameter) + + def misra_8_1(self, cfg): + for token in cfg.tokenlist: + if token.isImplicitInt and not token.isUnsigned and not token.isSigned: + self.reportError(token, 8, 1) + + def misra_8_2(self, data, rawTokens): + def getFollowingRawTokens(rawTokens, token, count): + following =[] + for rawToken in rawTokens: + if (rawToken.file == token.file and + rawToken.linenr == token.linenr and + rawToken.column == token.column): + for _ in range(count): + rawToken = rawToken.next + # Skip comments + while rawToken and (rawToken.str.startswith('/*') or rawToken.str.startswith('//')): + rawToken = rawToken.next + if rawToken is None: + break + following.append(rawToken) + return following + + # Zero arguments should be in form ( void ) + def checkZeroArguments(func, startCall, endCall): + if not startCall.isRemovedVoidParameter and len(func.argument) == 0: + if func.tokenDef.next: + self.reportError(func.tokenDef.next, 8, 2) + else: + self.reportError(func.tokenDef, 8, 2) + + def checkDeclarationArgumentsViolations(func, startCall, endCall): + # Collect the tokens for the arguments in function definition + argNameTokens = set() + for arg in func.argument: + argument = func.argument[arg] + typeStartToken = argument.typeStartToken + if typeStartToken is None: + continue + nameToken = argument.nameToken + if nameToken is None: + continue + argNameTokens.add(nameToken) + + # Check if we have the same number of variables in both the + # declaration and the definition. + # + # TODO: We actually need to check if the names of the arguments are + # the same. But we can't do this because we have no links to + # variables in the arguments in function definition in the dump file. + foundVariables = 0 + while startCall and startCall != endCall: + if startCall.varId: + foundVariables += 1 + startCall = startCall.next + + if len(argNameTokens) != foundVariables: + if func.tokenDef.next: + self.reportError(func.tokenDef.next, 8, 2) + else: + self.reportError(func.tokenDef, 8, 2) + + def checkDefinitionArgumentsViolations(func, startCall, endCall): + for arg in func.argument: + argument = func.argument[arg] + typeStartToken = argument.typeStartToken + if typeStartToken is None: + continue + + # Arguments should have a name unless variable length arg + nameToken = argument.nameToken + if nameToken is None and typeStartToken.str != '...': + self.reportError(typeStartToken, 8, 2) + + # Type declaration on next line (old style declaration list) is not allowed + if typeStartToken.linenr > endCall.linenr: + self.reportError(typeStartToken, 8, 2) + + # Check arguments in function declaration + for func in data.functions: + + # Check arguments in function definition + tokenImpl = func.token + if tokenImpl: + startCall = tokenImpl.next + if startCall is None or startCall.str != '(': + continue + endCall = startCall.link + if endCall is None or endCall.str != ')': + continue + checkZeroArguments(func, startCall, endCall) + checkDefinitionArgumentsViolations(func, startCall, endCall) + + # Check arguments in function declaration + tokenDef = func.tokenDef + if tokenDef: + startCall = func.tokenDef.next + if startCall is None or startCall.str != '(': + continue + endCall = startCall.link + if endCall is None or endCall.str != ')': + continue + checkZeroArguments(func, startCall, endCall) + if tokenImpl: + checkDeclarationArgumentsViolations(func, startCall, endCall) + else: + # When there is no function definition, we should execute + # its checks for the declaration token. The point is that without + # a known definition we have no Function.argument list required + # for declaration check. + checkDefinitionArgumentsViolations(func, startCall, endCall) + + # Check arguments in pointer declarations + for var in data.variables: + if not var.isPointer: + continue + + if var.nameToken is None: + continue + + rawTokensFollowingPtr = getFollowingRawTokens(rawTokens, var.nameToken, 3) + if len(rawTokensFollowingPtr) != 3: + continue + + # Compliant: returnType (*ptrName) ( ArgType ) + # Non-compliant: returnType (*ptrName) ( ) + if (rawTokensFollowingPtr[0].str == ')' and + rawTokensFollowingPtr[1].str == '(' and + rawTokensFollowingPtr[2].str == ')'): + self.reportError(var.nameToken, 8, 2) + + def insert_in_dict(self, dict_name,key, value): + if key not in dict_name: + dict_name[key] = [] + dict_name[key].append(value) + def misra_8_4(self, cfg): + for func in cfg.functions: + if func.isStatic: + continue + if func.token is None: + continue + if not is_source_file(func.token.file): + continue + if func.token != func.tokenDef: + continue + if func.tokenDef.str == 'main': + continue + self.reportError(func.tokenDef, 8, 4) + extern_var_with_def = {} + extern_var_without_def = {} + for var in cfg.variables: + if not var.isGlobal: + continue + if var.isStatic: + continue + if var.nameToken is None: + continue + tok = var.nameToken + if tok.next.str == ";": + if tok.next.isSplittedVarDeclEq: + self.insert_in_dict(extern_var_with_def, tok.str, tok) + else: + self.insert_in_dict(extern_var_without_def, tok.str, tok) + else: + self.insert_in_dict(extern_var_without_def, var.nameToken.str, var.nameToken) + + for var in extern_var_with_def: + if var not in extern_var_without_def: + for t in extern_var_with_def[var]: + self.reportError(t, 8, 4) + + for var_str, var_tok in extern_var_without_def.items(): + warn = True + if var_str not in extern_var_with_def: + for t in var_tok: + if t.variable.isExtern: + warn = False + break + if warn: + for t in var_tok: + self.reportError(t, 8, 4) + + def misra_8_5(self, dumpfile, cfg): + self._save_ctu_summary_identifiers(dumpfile, cfg) + + def misra_8_6(self, dumpfile, cfg): + self._save_ctu_summary_identifiers(dumpfile, cfg) + + def misra_8_7(self, dumpfile, cfg): + self._save_ctu_summary_usage(dumpfile, cfg) + + def misra_8_8(self, cfg): + vars = {} + for var in cfg.variables: + if var.access != 'Global': + continue + if var.nameToken is None: + continue + varname = var.nameToken.str + if varname in vars: + vars[varname].append(var) + else: + vars[varname] = [var] + for varname, varlist in vars.items(): + static_var = None + extern_var = None + for var in varlist: + if var.isStatic: + static_var = var + elif var.isExtern: + extern_var = var + if static_var and extern_var: + self.reportError(extern_var.nameToken, 8, 8) + + def misra_8_9(self, cfg): + variables = {} + for scope in cfg.scopes: + if scope.type != 'Function': + continue + variables_used_in_scope = [] + tok = scope.bodyStart + while tok != scope.bodyEnd: + if tok.variable and tok.variable.access == 'Global' and tok.variable.isStatic: + if tok.variable not in variables_used_in_scope: + variables_used_in_scope.append(tok.variable) + tok = tok.next + for var in variables_used_in_scope: + if var in variables: + variables[var] += 1 + else: + variables[var] = 1 + for var, count in variables.items(): + if count == 1: + self.reportError(var.nameToken, 8, 9) + + + def misra_8_10(self, cfg): + for func in cfg.functions: + if func.isInlineKeyword and not func.isStatic: + self.reportError(func.tokenDef, 8, 10) + + def misra_8_11(self, data): + for var in data.variables: + if var.isExtern and simpleMatch(var.nameToken.next, '[ ]') and var.nameToken.scope.type == 'Global': + self.reportError(var.nameToken, 8, 11) + + def misra_8_12(self, data): + for scope in data.scopes: + if scope.type != 'Enum': + continue + enum_values = [] + implicit_enum_values = [] + e_token = scope.bodyStart.next + while e_token != scope.bodyEnd: + if e_token.str == '(': + e_token = e_token.link + continue + if e_token.previous.str not in ',{': + e_token = e_token.next + continue + if e_token.isName and e_token.values and e_token.valueType and e_token.valueType.typeScope == scope: + token_values = [v.intvalue for v in e_token.values] + enum_values += token_values + if e_token.next.str != "=": + implicit_enum_values += token_values + e_token = e_token.next + for implicit_enum_value in implicit_enum_values: + if enum_values.count(implicit_enum_value) != 1: + self.reportError(scope.bodyStart, 8, 12) + + def misra_8_14(self, rawTokens): + for token in rawTokens: + if token.str == 'restrict': + self.reportError(token, 8, 14) + + def misra_9_2(self, data): + misra_9.misra_9_x(self, data, 902) + + def misra_9_3(self, data): + misra_9.misra_9_x(self, data, 903) + + def misra_9_4(self, data): + misra_9.misra_9_x(self, data, 904) + + def misra_9_5(self, data, rawTokens): + misra_9.misra_9_x(self, data, 905, rawTokens) + #for token in rawTokens: + # if simpleMatch(token, '[ ] = { ['): + # self.reportError(token, 9, 5) + + def misra_10_1(self, data): + for token in data.tokenlist: + if not token.isOp: + continue + + for t1, t2 in itertools.product( + list(getTernaryOperandsRecursive(token.astOperand1) or [token.astOperand1]), + list(getTernaryOperandsRecursive(token.astOperand2) or [token.astOperand2]), + ): + e1 = getEssentialTypeCategory(t1) + e2 = getEssentialTypeCategory(t2) + if not e1 or not e2: + continue + if token.str in ('<<', '>>'): + if not isUnsignedType(e1): + self.reportError(token, 10, 1) + elif not isUnsignedType(e2) and not token.astOperand2.isNumber: + self.reportError(token, 10, 1) + elif token.str in ('~', '&', '|', '^'): + e1_et = getEssentialType(token.astOperand1) + e2_et = getEssentialType(token.astOperand2) + if e1_et == 'char' or e2_et == 'char': + self.reportError(token, 10, 1) + + def misra_10_2(self, data): + def isEssentiallySignedOrUnsigned(op): + e = getEssentialType(op) + return e and (e.split(' ')[0] in ('unsigned', 'signed')) + + def isEssentiallyChar(op): + if op is None: + return False + if op.str == '+': + return isEssentiallyChar(op.astOperand1) or isEssentiallyChar(op.astOperand2) + return op.isChar + + for token in data.tokenlist: + if token.str not in ('+', '-'): + continue + + if (not isEssentiallyChar(token.astOperand1)) and (not isEssentiallyChar(token.astOperand2)): + continue + + if token.str == '+': + if isEssentiallyChar(token.astOperand1) and not isEssentiallySignedOrUnsigned(token.astOperand2): + self.reportError(token, 10, 2) + if isEssentiallyChar(token.astOperand2) and not isEssentiallySignedOrUnsigned(token.astOperand1): + self.reportError(token, 10, 2) + + if token.str == '-': + e1 = getEssentialType(token.astOperand1) + if e1 and e1.split(' ')[-1] != 'char': + self.reportError(token, 10, 2) + if not isEssentiallyChar(token.astOperand2) and not isEssentiallySignedOrUnsigned(token.astOperand2): + self.reportError(token, 10, 2) + + def misra_10_3(self, cfg): + def get_category(essential_type): + if essential_type: + if essential_type in ('bool', 'char'): + return essential_type + if essential_type.split(' ')[-1] in ('float', 'double'): + return 'floating' + if essential_type.split(' ')[0] in ('unsigned', 'signed'): + return essential_type.split(' ')[0] + return None + + for tok in cfg.tokenlist: + if not tok.isAssignmentOp: + continue + + lhs = getEssentialType(tok.astOperand1) + rhs = getEssentialType(tok.astOperand2) + if lhs is None or rhs is None: + continue + + find_std = cfg.standards.c if cfg.standards and cfg.standards.c else self.stdversion + + rhs_tok = tok.astOperand2 + rhs_macro_name = rhs_tok.macroName if rhs_tok else None + rhs_spelling = rhs_macro_name if rhs_macro_name in ('true', 'false') else rhs_tok.str + + rhs_is_source_bool_literal = rhs_spelling in ('true', 'false') + rhs_is_source_int_literal_0_1 = rhs_spelling in ('0', '1') + + if lhs == 'bool': + if rhs_is_source_bool_literal: + continue + if find_std == 'c89' and rhs_is_source_int_literal_0_1: + continue + + lhs_category = get_category(lhs) + rhs_category = get_category(rhs) + if lhs_category and rhs_category and lhs_category != rhs_category and rhs_category not in ('signed', 'unsigned'): + self.reportError(tok, 10, 3) + + if bitsOfEssentialType(lhs) < bitsOfEssentialType(rhs): + self.reportError(tok, 10, 3) + + def misra_10_4(self, data): + op = {'+', '-', '*', '/', '%', '&', '|', '^', '+=', '-=', ':'} + for token in data.tokenlist: + if token.str not in op and not token.isComparisonOp: + continue + if not token.astOperand1 or not token.astOperand2: + continue + if not token.astOperand1.valueType or not token.astOperand2.valueType: + continue + if ((token.astOperand1.str in op or token.astOperand1.isComparisonOp) and + (token.astOperand2.str in op or token.astOperand2.isComparisonOp)): + e1, e2 = getEssentialCategorylist(token.astOperand1.astOperand2, token.astOperand2.astOperand1) + elif token.astOperand1.str in op or token.astOperand1.isComparisonOp: + e1, e2 = getEssentialCategorylist(token.astOperand1.astOperand2, token.astOperand2) + elif token.astOperand2.str in op or token.astOperand2.isComparisonOp: + e1, e2 = getEssentialCategorylist(token.astOperand1, token.astOperand2.astOperand1) + else: + e1, e2 = getEssentialCategorylist(token.astOperand1, token.astOperand2) + if token.str == "+=" or token.str == "+": + if e1 == "char" and (e2 == "signed" or e2 == "unsigned"): + continue + if e2 == "char" and (e1 == "signed" or e1 == "unsigned"): + continue + if token.str == "-=" or token.str == "-": + if e1 == "char" and (e2 == "signed" or e2 == "unsigned"): + continue + if e1 and e2 and (e1.find('Anonymous') != -1 and (e2 == "signed" or e2 == "unsigned")): + continue + if e1 and e2 and (e2.find('Anonymous') != -1 and (e1 == "signed" or e1 == "unsigned")): + continue + if e1 and e2 and e1 != e2: + self.reportError(token, 10, 4) + + def misra_10_5(self, cfg): + def _get_essential_category(token): + essential_type = getEssentialType(token) + #print(essential_type) + if essential_type: + if essential_type in ('bool', 'char'): + return essential_type + if essential_type.split(' ')[-1] in ('float', 'double'): + return 'floating' + if essential_type.split(' ')[0] in ('unsigned', 'signed'): + return essential_type.split(' ')[0] + return None + for token in cfg.tokenlist: + if not isCast(token): + continue + to_type = _get_essential_category(token) + #print(to_type) + if to_type is None: + continue + from_type = _get_essential_category(token.astOperand1) + #print(from_type) + if from_type is None: + continue + if to_type == from_type: + continue + if to_type == 'bool' or from_type == 'bool': + if token.astOperand1.isInt and token.astOperand1.getKnownIntValue() == 1: + # Exception + continue + self.reportError(token, 10, 5) + continue + if to_type == 'enum': + self.reportError(token, 10, 5) + continue + if from_type == 'float' and to_type == 'char': + self.reportError(token, 10, 5) + continue + if from_type == 'char' and to_type == 'float': + self.reportError(token, 10, 5) + continue + + def misra_10_6(self, data): + for token in data.tokenlist: + if token.str != '=' or not token.astOperand1 or not token.astOperand2: + continue + if not is_composite_expr(token.astOperand2): + continue + vt1 = token.astOperand1.valueType + vt2 = token.astOperand2.valueType + if not vt1 or vt1.pointer > 0: + continue + if not vt2 or vt2.pointer > 0: + continue + try: + if isCast(token.astOperand2): + e = vt2.type + else: + e = getEssentialType(token.astOperand2) + if not e: + continue + if e == "char" and vt1.type == "int": + # When arithmetic operations are performed on char values, they are usually promoted to int + continue + lhsbits = vt1.bits if vt1.bits else bitsOfEssentialType(vt1.type) + if lhsbits > bitsOfEssentialType(e): + self.reportError(token, 10, 6) + except ValueError: + pass + + def misra_10_7(self, cfg): + for token in cfg.tokenlist: + if token.astOperand1 is None or token.astOperand2 is None: + continue + if not token.isArithmeticalOp: + continue + if not is_composite_expr(token): + continue + parent = token.astParent + if parent is None: + continue + if not parent.isArithmeticalOp: + if not parent.isAssignmentOp: + continue + if parent.str == '=': + continue + token_type = getEssentialType(token) + if token_type is None: + continue + sibling = parent.astOperand1 if (token == parent.astOperand2) else parent.astOperand2 + sibling_type = getEssentialType(sibling) + if sibling_type is None: + continue + b1 = bitsOfEssentialType(token_type) + b2 = bitsOfEssentialType(sibling_type) + if b1 > 0 and b1 < b2: + self.reportError(token, 10, 7) + + def misra_10_8(self, data): + for token in data.tokenlist: + if not isCast(token): + continue + if not token.valueType or token.valueType.pointer > 0: + continue + if not token.astOperand1.valueType or token.astOperand1.valueType.pointer > 0: + continue + if not token.astOperand1.astOperand1: + continue + if token.astOperand1.str not in ('+', '-', '*', '/', '%', '&', '|', '^', '>>', "<<", "?", ":", '~'): + continue + if token.astOperand1.str != '~' and not token.astOperand1.astOperand2: + continue + if token.astOperand1.str == '~': + e2 = getEssentialTypeCategory(token.astOperand1.astOperand1) + else: + e2, e3 = getEssentialCategorylist(token.astOperand1.astOperand1, token.astOperand1.astOperand2) + if e2 != e3: + continue + e1 = getEssentialTypeCategory(token) + if e1 != e2: + self.reportError(token, 10, 8) + else: + try: + e = getEssentialType(token.astOperand1) + if not e: + continue + if bitsOfEssentialType(token.valueType.type) > bitsOfEssentialType(e): + self.reportError(token, 10, 8) + except ValueError: + pass + + def misra_11_1(self, data): + for token in data.tokenlist: + to_from = get_type_conversion_to_from(token) + if to_from is None: + continue + from_type = get_function_pointer_type(to_from[1]) + if from_type is None: + continue + to_type = get_function_pointer_type(to_from[0]) + if to_type is None or to_type != from_type: + self.reportError(token, 11, 1) + + def misra_11_2(self, data): + def get_pointer_type(type_token): + while type_token and (type_token.str in ('const', 'struct')): + type_token = type_token.next + if type_token is None: + return None + if not type_token.isName: + return None + return type_token if (type_token.next and type_token.next.str == '*') else None + + incomplete_types = [] + + for token in data.tokenlist: + if token.str == 'struct' and token.next and token.next.next and token.next.isName and token.next.next.str == ';': + incomplete_types.append(token.next.str) + to_from = get_type_conversion_to_from(token) + if to_from is None: + continue + to_pointer_type_token = get_pointer_type(to_from[0]) + if to_pointer_type_token is None: + continue + from_pointer_type_token = get_pointer_type(to_from[1]) + if from_pointer_type_token is None: + continue + if to_pointer_type_token.str == from_pointer_type_token.str: + continue + if from_pointer_type_token.typeScope is None and (from_pointer_type_token.str in incomplete_types): + self.reportError(token, 11, 2) + elif to_pointer_type_token.typeScope is None and (to_pointer_type_token.str in incomplete_types): + self.reportError(token, 11, 2) + + def misra_11_3(self, data): + for token in data.tokenlist: + if not isCast(token): + continue + vt1 = token.valueType + vt2 = token.astOperand1.valueType + if not vt1 or not vt2: + continue + if vt1.type == 'void' or vt2.type == 'void': + continue + if (vt1.pointer > 0 and vt1.type == 'record' and + vt2.pointer > 0 and vt2.type == 'record' and + vt1.typeScopeId != vt2.typeScopeId): + self.reportError(token, 11, 3) + elif (vt1.pointer == vt2.pointer and vt1.pointer > 0 and + vt1.type != vt2.type and vt1.type != 'char'): + self.reportError(token, 11, 3) + + def misra_11_4(self, data): + # Get list of macro definitions + macros = {} + for directive in data.directives: + #define X ((peripheral_t *)0x40000U) + res = re.match(r'#define ([A-Za-z0-9_]+).*', directive.str) + if res: + if res.group(1) in macros: + macros[res.group(1)].append(directive) + else: + macros[res.group(1)] = [directive] + + # If macro definition is non-compliant then warn about the macro definition instead of + # the macro usages. To reduce diagnostics for a non-compliant macro. + bad_macros = [] + for token in data.tokenlist: + if not isCast(token): + continue + vt1 = token.valueType + vt2 = token.astOperand1.valueType + if not vt1 or not vt2: + continue + if vt2.pointer > 0 and vt1.pointer == 0 and (vt1.isIntegral() or vt1.isEnum()) and vt2.type != 'void': + self.reportError(token, 11, 4) + elif vt1.pointer > 0 and vt2.pointer == 0 and (vt2.isIntegral() or vt2.isEnum()) and vt1.type != 'void': + if token.macroName is not None and \ + token.macroName == token.astOperand1.macroName and \ + token.astOperand1.isInt and \ + token.link.previous.str == '*' and \ + token.macroName == token.link.previous.macroName and \ + token.macroName in macros and \ + len(macros[token.macroName]) == 1: + if token.macroName not in bad_macros: + bad_macros.append(token.macroName) + self.reportError(macros[token.macroName][0], 11, 4) + continue + self.reportError(token, 11, 4) + + def misra_11_5(self, data): + for token in data.tokenlist: + if not isCast(token): + if token.astOperand1 and token.astOperand2 and token.str == "=" and token.next.str != "(": + vt1 = token.astOperand1.valueType + vt2 = token.astOperand2.valueType + if not vt1 or not vt2: + continue + if vt1.pointer > 0 and vt1.type != 'void' and vt2.pointer == vt1.pointer and vt2.type == 'void': + self.reportError(token, 11, 5) + continue + if token.astOperand1.astOperand1 and token.astOperand1.astOperand1.str in ( + 'malloc', 'calloc', 'realloc', 'free'): + continue + vt1 = token.valueType + vt2 = token.astOperand1.valueType + if not vt1 or not vt2: + continue + if vt1.pointer > 0 and vt1.type != 'void' and vt2.pointer == vt1.pointer and vt2.type == 'void': + self.reportError(token, 11, 5) + + def misra_11_6(self, data): + for token in data.tokenlist: + if not isCast(token): + continue + vt1 = token.valueType + vt2 = token.astOperand1.valueType + if not vt1 or not vt2: + continue + if vt1.pointer == 1 and vt1.type == 'void' and vt2.pointer == 0 and token.astOperand1.getKnownIntValue() != 0: + self.reportError(token, 11, 6) + elif vt1.pointer == 0 and vt1.type != 'void' and vt2.pointer == 1 and vt2.type == 'void': + self.reportError(token, 11, 6) + + def misra_11_7(self, data): + for token in data.tokenlist: + if not isCast(token): + continue + vt1 = token.valueType + vt2 = token.astOperand1.valueType + if not vt1 or not vt2: + continue + if token.astOperand1.astOperand1: + continue + if (vt2.pointer > 0 and vt1.pointer == 0 and + not vt1.isIntegral() and not vt1.isEnum() and + vt1.type != 'void'): + self.reportError(token, 11, 7) + elif (vt1.pointer > 0 and vt2.pointer == 0 and + not vt2.isIntegral() and not vt2.isEnum() and + vt1.type != 'void'): + self.reportError(token, 11, 7) + + def misra_11_8(self, data): + # TODO: reuse code in CERT-EXP05 + for token in data.tokenlist: + if isCast(token): + # C-style cast + if not token.valueType: + continue + if not token.astOperand1.valueType: + continue + if token.valueType.pointer == 0: + continue + if token.astOperand1.valueType.pointer == 0: + continue + const1 = token.valueType.constness + const2 = token.astOperand1.valueType.constness + if (const1 % 2) < (const2 % 2): + self.reportError(token, 11, 8) + + elif token.str == '(' and token.astOperand1 and token.astOperand2 and token.astOperand1.function: + # Function call + function = token.astOperand1.function + arguments = getArguments(token) + for argnr, argvar in function.argument.items(): + if argnr < 1 or argnr > len(arguments): + continue + if not argvar.isPointer: + continue + argtok = arguments[argnr - 1] + if not argtok.valueType: + continue + if argtok.valueType.pointer == 0: + continue + const1 = argvar.constness + const2 = arguments[argnr - 1].valueType.constness + if (const1 % 2) < (const2 % 2): + self.reportError(token, 11, 8) + + def misra_11_9(self, data): + for token in data.tokenlist: + if token.astOperand1 and token.astOperand2 and token.str in ["=", "==", "!=", "?", ":"]: + vt1 = token.astOperand1.valueType + vt2 = token.astOperand2.valueType + if not vt1 or not vt2: + continue + if vt1.pointer > 0 and vt2.pointer == 0 and token.astOperand2.str == "NULL": + continue + if (token.astOperand2.values and vt1.pointer > 0 and + vt2.pointer == 0 and token.astOperand2.values): + if token.astOperand2.getValue(0): + self.reportError(token, 11, 9) + + def misra_12_1_sizeof(self, rawTokens): + state = 0 + compiled = re.compile(r'^[a-zA-Z_]') + for tok in rawTokens: + if tok.str.startswith('//') or tok.str.startswith('/*'): + continue + if tok.str == 'sizeof': + state = 1 + elif state == 1: + if compiled.match(tok.str): + state = 2 + else: + state = 0 + elif state == 2: + if tok.str in ('+', '-', '*', '/', '%'): + self.reportError(tok, 12, 1) + else: + state = 0 + + def misra_12_1(self, data): + for token in data.tokenlist: + p = getPrecedence(token) + if p < 2 or p > 12: + continue + p1 = getPrecedence(token.astOperand1) + if p < p1 <= 12 and numberOfParentheses(token.astOperand1, token): + self.reportError(token, 12, 1) + continue + p2 = getPrecedence(token.astOperand2) + if p < p2 <= 12 and numberOfParentheses(token, token.astOperand2): + self.reportError(token, 12, 1) + continue + + def misra_12_2(self, data): + for token in data.tokenlist: + if not (token.str in ('<<', '>>')): + continue + if (not token.astOperand2) or (not token.astOperand2.values): + continue + maxval = 0 + for val in token.astOperand2.values: + if val.intvalue and val.intvalue > maxval: + maxval = val.intvalue + if maxval == 0: + continue + sz = bitsOfEssentialType(getEssentialType(token.astOperand1)) + if sz <= 0: + continue + if maxval >= sz: + self.reportError(token, 12, 2) + + def misra_12_3(self, data): + for token in data.tokenlist: + if token.str == ';' and (token.isSplittedVarDeclComma is True): + self.reportError(token, 12, 3) + if token.str == ',' and token.astParent and token.astParent.str == ';': + self.reportError(token, 12, 3) + if token.str == ',' and token.astParent is None: + if token.scope.type in ('Class', 'Struct'): + # Is this initlist.. + tok = token + while tok and tok.str == ',': + tok = tok.next + if tok and tok.next and tok.isName and tok.next.str == '(': + tok = tok.next.link.next + if tok.str == '{': + # This comma is used in initlist, do not warn + continue + prev = token.previous + while prev: + if prev.str == ';': + self.reportError(token, 12, 3) + break + if prev.str in '({[': + break + if prev.str in ')}]': + prev = prev.link + prev = prev.previous + + def misra_12_4_check_expr(self, expr): + if not expr.astOperand2 or not expr.astOperand1: + return + if expr.valueType is None: + return + if expr.valueType.sign is None or expr.valueType.sign != 'unsigned': + return + if expr.valueType.pointer > 0: + return + if not expr.valueType.isIntegral(): + return + op1 = expr.astOperand1.getKnownIntValue() + if op1 is None: + return + op2 = expr.astOperand2.getKnownIntValue() + if op2 is None: + return + bits = bitsOfEssentialType('unsigned ' + expr.valueType.type) + if bits <= 0 or bits >= 64: + return + max_value = (1 << bits) - 1 + if not is_constant_integer_expression(expr): + return + if expr.str == '+' and op1 + op2 > max_value: + self.reportError(expr, 12, 4) + elif expr.str == '-' and op1 - op2 < 0: + self.reportError(expr, 12, 4) + elif expr.str == '*' and op1 * op2 > max_value: + self.reportError(expr, 12, 4) + def misra_12_4(self, cfg): + if not cfg.tokenlist: + return + expr = cfg.tokenlist[0] + while expr.next: + expr = expr.next + if expr.str == "?" and expr.astOperand2.str == ":": + known_value = expr.astOperand1.getKnownIntValue() + if known_value == 1: + tok = expr + while tok != expr.astOperand2: + self.misra_12_4_check_expr(tok) + tok = tok.next + expr = tok + while expr.str not in (";", "{", "}"): + expr = expr.next + continue + if known_value == 0: + expr = expr.astOperand2 + self.misra_12_4_check_expr(expr) + + + def misra_13_1(self, data): + for token in data.tokenlist: + if simpleMatch(token, ") {") and token.next.astParent == token.link: + pass + elif not simpleMatch(token, '= {'): + continue + init = token.next + end = init.link + if not end: + continue # syntax is broken + + tn = init + while tn and tn != end: + if tn.str == '[' and tn.link: + tn = tn.link + if tn and tn.next and tn.next.str == '=': + tn = tn.next.next + continue + break + if tn.str == '.' and tn.next and tn.next.isName: + tn = tn.next + if tn.next and tn.next.str == '=': + tn = tn.next.next + continue + if tn.str in {'++', '--'} or tn.isAssignmentOp: + self.reportError(init, 13, 1) + tn = tn.next + + def misra_13_3(self, data): + for token in data.tokenlist: + if token.str not in ('++', '--'): + continue + astTop = token + while astTop.astParent and astTop.astParent.str not in (',', ';'): + astTop = astTop.astParent + if countSideEffects(astTop) >= 2: + self.reportError(astTop, 13, 3) + + def misra_13_4(self, data): + for token in data.tokenlist: + if token.str != '=': + continue + if not token.astParent: + continue + if (token.astOperand1 is None) or (token.astOperand2 is None): + continue + if token.astOperand1.str == '[' and token.astOperand1.previous.str in ('{', ','): + continue + if not (token.astParent.str in [',', ';', '{']): + self.reportError(token, 13, 4) + + def misra_13_5(self, data): + for token in data.tokenlist: + if token.isLogicalOp and countSideEffectsRecursive(token.astOperand2) > 0: + self.reportError(token, 13, 5) + + def misra_13_6(self, data): + for token in data.tokenlist: + if token.str == 'sizeof' and countSideEffectsRecursive(token.next) > 0: + self.reportError(token, 13, 6) + + def misra_14_1(self, data): + for token in data.tokenlist: + if token.str == 'for': + exprs = getForLoopExpressions(token) + if not exprs: + continue + for counter in findCounterTokens(exprs[1]): + if counter.valueType and counter.valueType.isFloat(): + self.reportError(token, 14, 1) + elif token.str == 'while': + if isFloatCounterInWhileLoop(token): + self.reportError(token, 14, 1) + + def misra_14_2(self, data): + for token in data.tokenlist: + if token.str == 'for': + expressions = getForLoopExpressions(token) + if not expressions: + continue + if expressions[0] and not expressions[0].isAssignmentOp: + if expressions[0].str != "(" or not expressions[0].previous.isName: + self.reportError(token, 14, 2) + if countSideEffectsRecursive(expressions[1]) > 0: + self.reportError(token, 14, 2) + if countSideEffectsRecursive(expressions[2]) > 1: + self.reportError(token, 14, 2) + + counter_vars_first_clause, counter_vars_exit_modified = getForLoopCounterVariables(token, data) + if len(counter_vars_exit_modified) == 0: + # if it's not possible to identify a loop counter, all 3 clauses must be empty + for idx in range(len(expressions)): + if expressions[idx]: + self.reportError(token, 14, 2) + break + elif len(counter_vars_exit_modified) > 1: + # there shall be a single loop counter + self.reportError(token, 14, 2) + else: # len(counter_vars_exit_modified) == 1: + loop_counter = counter_vars_exit_modified.pop() + # if the first clause is not empty, then it shall (declare and) initialize the loop counter + if expressions[0] is not None and loop_counter not in counter_vars_first_clause: + self.reportError(token, 14, 2) + + # Inspect modification of loop counter in loop body + body_scope = token.next.link.next.scope + if not body_scope: + continue + tn = body_scope.bodyStart + while tn and tn != body_scope.bodyEnd: + if tn.variable == loop_counter: + if tn.next: + # TODO: Check modifications in function calls + if countSideEffectsRecursive(tn.next) > 0: + self.reportError(tn, 14, 2) + tn = tn.next + + def misra_14_4(self, data): + for token in data.tokenlist: + if token.str != '(': + continue + if not token.astOperand1 or not (token.astOperand1.str in ['if', 'while']): + continue + if isBoolExpression(token.astOperand2): + continue + if token.astOperand2.valueType: + self.reportError(token, 14, 4) + + def misra_15_1(self, data): + for token in data.tokenlist: + if token.str == "goto": + self.reportError(token, 15, 1) + + def misra_15_2(self, data): + for token in data.tokenlist: + if token.str != 'goto': + continue + if (not token.next) or (not token.next.isName): + continue + if not findGotoLabel(token): + self.reportError(token, 15, 2) + + def misra_15_3(self, data): + for token in data.tokenlist: + if token.str != 'goto': + continue + if (not token.next) or (not token.next.isName): + continue + tok = findGotoLabel(token) + if not tok: + continue + scope = token.scope + while scope and scope != tok.scope: + scope = scope.nestedIn + if not scope: + self.reportError(token, 15, 3) + # Jump crosses from one switch-clause to another is non-compliant + elif scope.type == 'Switch': + # Search for start of a current case block + tcase_start = token + while tcase_start and tcase_start.str not in ('case', 'default'): + tcase_start = tcase_start.previous + # Make sure that goto label doesn't occurs in the other + # switch-clauses + if tcase_start: + t = scope.bodyStart + in_this_case = False + while t and t != scope.bodyEnd: + if t == tcase_start: + in_this_case = True + if in_this_case and t.str not in ('case', 'default'): + in_this_case = False + if t == tok and not in_this_case: + self.reportError(token, 15, 3) + break + t = t.next + + def misra_15_4(self, data): + # Return a list of scopes affected by a break or goto + def getLoopsAffectedByBreak(knownLoops, scope, isGoto): + if scope and scope.type and scope.type not in ['Global', 'Function']: + if not isGoto and scope.type == 'Switch': + return + if scope.type in ['For', 'While', 'Do']: + knownLoops.append(scope) + if not isGoto: + return + getLoopsAffectedByBreak(knownLoops, scope.nestedIn, isGoto) + + loopWithBreaks = {} + for token in data.tokenlist: + if token.str not in ['break', 'goto']: + continue + + affectedLoopScopes = [] + getLoopsAffectedByBreak(affectedLoopScopes, token.scope, token.str == 'goto') + for scope in affectedLoopScopes: + if scope in loopWithBreaks: + loopWithBreaks[scope] += 1 + else: + loopWithBreaks[scope] = 1 + + for scope, breakCount in loopWithBreaks.items(): + if breakCount > 1: + self.reportError(scope.bodyStart, 15, 4) + + def misra_15_5(self, data): + for token in data.tokenlist: + if token.str == 'return' and token.scope.type != 'Function': + self.reportError(token, 15, 5) + + def misra_15_6(self, rawTokens): + state = 0 + indent = 0 + tok1 = None + def tokAt(tok,i): + while i < 0 and tok: + tok = tok.previous + if tok.str.startswith('//') or tok.str.startswith('/*'): + continue + i += 1 + while i > 0 and tok: + tok = tok.next + if tok.str.startswith('//') or tok.str.startswith('/*'): + continue + i -= 1 + return tok + + def strtokens(tok, i1, i2): + tok1 = tokAt(tok, i1) + tok2 = tokAt(tok, i2) + tok = tok1 + s = '' + while tok != tok2: + if tok.str.startswith('//') or tok.str.startswith('/*'): + tok = tok.next + continue + s += ' ' + tok.str + tok = tok.next + s += ' ' + tok.str + return s[1:] + + for token in rawTokens: + if token.str in ['if', 'for', 'while']: + if strtokens(token,-1,0) == '# if': + continue + if strtokens(token,-1,0) == "} while": + # is there a 'do { .. } while'? + start = rawlink(tokAt(token,-1)) + if start and strtokens(start, -1, 0) == 'do {': + continue + if state == 2: + self.reportError(tok1, 15, 6) + state = 1 + indent = 0 + tok1 = token + elif token.str == 'else': + if strtokens(token,-1,0) == '# else': + continue + if strtokens(token,0,1) == 'else if': + continue + if state == 2: + self.reportError(tok1, 15, 6) + state = 2 + indent = 0 + tok1 = token + elif state == 1: + if indent == 0 and token.str != '(': + state = 0 + continue + if token.str == '(': + indent = indent + 1 + elif token.str == ')': + if indent == 0: + state = 0 + elif indent == 1: + state = 2 + indent = indent - 1 + elif state == 2: + if token.str.startswith('//') or token.str.startswith('/*'): + continue + state = 0 + if token.str not in ('{', '#'): + self.reportError(tok1, 15, 6) + + def misra_15_7(self, data): + for scope in data.scopes: + if scope.type != 'Else': + continue + if not simpleMatch(scope.bodyStart, '{ if ('): + continue + if scope.bodyStart.column > 0: + continue + tok = scope.bodyStart.next.next.link + if not simpleMatch(tok, ') {'): + continue + tok = tok.next.link + if not simpleMatch(tok, '} else'): + self.reportError(tok, 15, 7) + + def misra_16_1(self, cfg): + for scope in cfg.scopes: + if scope.type != 'Switch': + continue + in_case_or_default = False + tok = scope.bodyStart.next + while tok != scope.bodyEnd: + if not in_case_or_default: + if tok.str not in ('case', 'default'): + self.reportError(tok, 16, 1) + else: + in_case_or_default = True + else: + if simpleMatch(tok, 'break ;'): + in_case_or_default = False + tok = tok.next + if tok.str == '{': + tok = tok.link + if tok.scope.type == 'Unconditional' and simpleMatch(tok.previous.previous, 'break ;'): + in_case_or_default = False + tok = tok.next + + def misra_16_2(self, data): + for token in data.tokenlist: + if token.str == 'case' and token.scope.type != 'Switch': + self.reportError(token, 16, 2) + + def misra_16_3(self, rawTokens): + STATE_NONE = 0 # default state, not in switch case/default block + STATE_BREAK = 1 # break/comment is seen but not its ';' + STATE_OK = 2 # a case/default is allowed (we have seen 'break;'/'comment'/'{'/attribute) + STATE_SWITCH = 3 # walking through switch statement scope + + directive = None + state = STATE_NONE + end_switch_token = None # end '}' for the switch scope + for token in rawTokens: + if simpleMatch(token, '# define') or simpleMatch(token, '# pragma'): + directive = token + if directive: + if token.linenr != directive.linenr: + directive = None + else: + continue + + # Find switch scope borders + if token.str == 'switch': + state = STATE_SWITCH + if state == STATE_SWITCH: + if token.str == '{': + end_switch_token = findRawLink(token) + else: + continue + + if token.str == 'break' or token.str == 'return' or token.str == 'throw': + state = STATE_BREAK + elif token.str == ';': + if state == STATE_BREAK: + state = STATE_OK + elif token.next and token.next == end_switch_token: + self.reportError(token.next, 16, 3) + else: + state = STATE_NONE + elif token.str.startswith('/*') or token.str.startswith('//'): + if 'fallthrough' in token.str.lower(): + state = STATE_OK + elif simpleMatch(token, '[ [ fallthrough ] ] ;'): + state = STATE_BREAK + elif token.str == '{': + state = STATE_OK + elif token.str == '}' and state == STATE_OK: + # is this {} an unconditional block of code? + prev = findRawLink(token) + if prev: + prev = prev.previous + while prev and prev.str[:2] in ('//', '/*'): + prev = prev.previous + if (prev is None) or (prev.str not in ':;{}'): + state = STATE_NONE + elif token.str == 'case' or token.str == 'default': + if state != STATE_OK: + self.reportError(token, 16, 3) + state = STATE_OK + + def misra_16_4(self, data): + for token in data.tokenlist: + if token.str != 'switch': + continue + if not simpleMatch(token, 'switch ('): + continue + if not simpleMatch(token.next.link, ') {'): + continue + startTok = token.next.link.next + tok = startTok.next + while tok and tok.str != '}': + if tok.str == '{': + tok = tok.link + elif tok.str == 'default': + break + tok = tok.next + if tok and tok.str != 'default': + self.reportError(token, 16, 4) + + def misra_16_5(self, data): + for token in data.tokenlist: + if token.str != 'default': + continue + if token.previous and (token.previous.str == '{'): + continue + tok2 = token + while tok2: + if tok2.str in ('}', 'case'): + break + if tok2.str == '{': + tok2 = tok2.link + tok2 = tok2.next + if tok2 and tok2.str == 'case': + self.reportError(token, 16, 5) + + def misra_16_6(self, data): + for token in data.tokenlist: + if not (simpleMatch(token, 'switch (') and simpleMatch(token.next.link, ') {')): + continue + tok = token.next.link.next.next + count = 0 + while tok: + if tok.str in ['break', 'return', 'throw']: + count = count + 1 + elif tok.str == '{': + tok = tok.link + if isNoReturnScope(tok): + count = count + 1 + elif tok.str == '}': + break + tok = tok.next + if count < 2: + self.reportError(token, 16, 6) + + def misra_16_7(self, data): + for token in data.tokenlist: + if simpleMatch(token, 'switch (') and isBoolExpression(token.next.astOperand2): + self.reportError(token, 16, 7) + + def misra_17_1(self, data): + for token in data.tokenlist: + if isFunctionCall(token, data.standards.c) and token.astOperand1.str in ( + 'va_list', 'va_arg', 'va_start', 'va_end', 'va_copy'): + self.reportError(token, 17, 1) + elif token.str == 'va_list': + self.reportError(token, 17, 1) + + def misra_17_2(self, data): + # find recursions.. + def find_recursive_call(search_for_function, direct_call, calls_map, visited=None): + if visited is None: + visited = set() + if direct_call == search_for_function: + return True + for indirect_call in calls_map.get(direct_call, []): + if indirect_call == search_for_function: + return True + if indirect_call in visited: + # This has already been handled + continue + visited.add(indirect_call) + if find_recursive_call(search_for_function, indirect_call, calls_map, visited): + return True + return False + + # List functions called in each function + function_calls = {} + for scope in data.scopes: + if scope.type != 'Function': + continue + calls = [] + tok = scope.bodyStart + while tok != scope.bodyEnd: + tok = tok.next + if not isFunctionCall(tok, data.standards.c): + continue + f = tok.astOperand1.function + if f is not None and f not in calls: + calls.append(f) + function_calls[scope.function] = calls + + # Report warnings for all recursions.. + for func in function_calls: + for call in function_calls[func]: + if not find_recursive_call(func, call, function_calls): + # Function call is not recursive + continue + # Warn about all functions calls.. + for scope in data.scopes: + if scope.type != 'Function' or scope.function != func: + continue + tok = scope.bodyStart + while tok != scope.bodyEnd: + if tok.function and tok.function == call: + self.reportError(tok, 17, 2) + tok = tok.next + + def misra_17_3(self, cfg): + # Check for Clang warnings related to implicit function declarations + for w in cfg.clang_warnings: + if w['message'].endswith('[-Wimplicit-function-declaration]'): + self.reportError(cppcheckdata.Location(w), 17, 3) + + # Additional check for implicit function calls in expressions + for token in cfg.tokenlist: + if token.isName and token.function is None and token.valueType is None: + if token.next and token.next.str == "(" and token.next.valueType is None: + if token.next.next.str == "*" and \ + token.next.next.next.isName and token.next.next.next.valueType is not None and \ + token.next.next.next.valueType.pointer > 0 : + # this is a function pointer definition the tokens look like this int16_t ( * misra_8_2_p_a ) () + # and the int16_t causes the detection as the '(' follows + continue + if not isKeyword(token.str,cfg.standards.c) and not isStdLibId(token.str,cfg.standards.c): + self.reportError(token, 17, 3) + + def misra_config(self, data): + for var in data.variables: + if not var.isArray or var.nameToken is None or not cppcheckdata.simpleMatch(var.nameToken.next, '['): + continue + tok = var.nameToken.next + while tok.str == '[': + sz = tok.astOperand2 + if sz and sz.getKnownIntValue() is None: + has_var = False + unknown_constant = False + tokens = [sz] + while len(tokens) > 0: + t = tokens[-1] + tokens = tokens[:-1] + if t: + if t.isName and t.getKnownIntValue() is None: + if t.varId or t.variable: + has_var = True + continue + unknown_constant = True + self.report_config_error(tok, 'Unknown constant {}, please review configuration'.format(t.str)) + if t.isArithmeticalOp: + tokens += [t.astOperand1, t.astOperand2] + if not unknown_constant and not has_var: + self.report_config_error(tok, 'Unknown array size, please review configuration') + tok = tok.link.next + + for token in data.tokenlist: + if token.str not in ("while", "if"): + continue + tok = token.next + if token is None or tok.str != "(": + continue + end_token = tok.link + while tok != end_token: + tok = tok.next + if tok.str == 'sizeof' and tok.next.str == '(': + tok = tok.next.link + continue + if tok.str == "(" and tok.isCast: + tok = tok.link + continue + if not tok.isName: + continue + if tok.function or tok.variable or tok.varId or tok.valueType or tok.typeScope: + continue + if tok.next.str == "(" or tok.str in ["EOF"]: + continue + if isKeyword(tok.str, data.standards.c) or isStdLibId(tok.str, data.standards.c): + continue + if tok.astParent is None: + continue + if tok.astParent.str == "." and tok.astParent.valueType: + continue + self.report_config_error(tok, "Variable '%s' is unknown" % tok.str) + + def misra_17_6(self, rawTokens): + for token in rawTokens: + if simpleMatch(token, '[ static'): + self.reportError(token, 17, 6) + + def misra_17_7(self, data): + for token in data.tokenlist: + if not token.scope.isExecutable: + continue + if token.str != '(' or token.astParent: + continue + if token.astOperand1 is None or not token.astOperand1.isName: + continue + if token.astOperand1.varId and (token.astOperand1.variable is None or get_function_pointer_type(token.astOperand1.variable.typeStartToken) is None): + continue + if token.valueType is None: + continue + if token.valueType.type == 'void' and token.valueType.pointer == 0: + continue + self.reportError(token, 17, 7) + + def misra_17_8(self, data): + for token in data.tokenlist: + if not (token.isAssignmentOp or (token.str in ('++', '--'))): + continue + if not token.astOperand1: + continue + var = token.astOperand1.variable + if var and var.isArgument: + self.reportError(token, 17, 8) + + def misra_18_4(self, data): + for token in data.tokenlist: + if token.str not in ('+', '-', '+=', '-='): + continue + if token.astOperand1 is None or token.astOperand2 is None: + continue + vt1 = token.astOperand1.valueType + vt2 = token.astOperand2.valueType + if vt1 and vt1.pointer > 0: + self.reportError(token, 18, 4) + elif vt2 and vt2.pointer > 0: + self.reportError(token, 18, 4) + + def misra_18_5(self, data): + for var in data.variables: + if not var.isPointer: + continue + typetok = var.nameToken + count = 0 + while typetok: + if typetok.str == '*': + count = count + 1 + elif not typetok.isName: + break + typetok = typetok.previous + if count > 2: + self.reportError(var.nameToken, 18, 5) + + def misra_18_7(self, data): + for scope in data.scopes: + if scope.type != 'Struct': + continue + + token = scope.bodyStart.next + while token != scope.bodyEnd and token is not None: + # Handle nested structures to not duplicate an error. + if token.str == '{': + token = token.link + + # skip function pointer parameter types + if token.astOperand1 is None: + pass + elif cppcheckdata.simpleMatch(token, "[ ]"): + self.reportError(token, 18, 7) + break + token = token.next + + def misra_18_8(self, data): + for var in data.variables: + if not var.isArray or not var.isLocal: + continue + # TODO Array dimensions are not available in dump, must look in tokens + typetok = var.nameToken.next + if not typetok or typetok.str != '[': + continue + # Unknown define or syntax error + if not typetok.astOperand2: + continue + if not isConstantExpression(typetok.astOperand2) and not isUnknownConstantExpression(typetok.astOperand2): + self.reportError(var.nameToken, 18, 8) + + def misra_19_2(self, data): + for token in data.tokenlist: + if token.str == 'union': + self.reportError(token, 19, 2) + + def misra_20_1(self, data): + token_in_file = {} + for token in data.tokenlist: + if token.file not in token_in_file: + token_in_file[token.file] = int(token.linenr) + else: + token_in_file[token.file] = min(token_in_file[token.file], int(token.linenr)) + + for directive in data.directives: + if not directive.str.startswith('#include'): + continue + if directive.file not in token_in_file: + continue + if token_in_file[directive.file] < int(directive.linenr): + self.reportError(directive, 20, 1) + + def misra_20_2(self, data): + for directive in data.directives: + if not directive.str.startswith('#include '): + continue + for pattern in ('\\', '//', '/*', ',', "'"): + if pattern in directive.str: + self.reportError(directive, 20, 2) + break + + def misra_20_3(self, data): + for directive in data.directives: + if not directive.str.startswith('#include '): + continue + + words = directive.str.split(' ') + + # If include directive contains more than two words, here would be + # violation anyway. + if len(words) > 2: + self.reportError(directive, 20, 3) + + # Handle include directives with not quoted argument + elif len(words) > 1: + filename = words[1] + if not ((filename.startswith('"') and + filename.endswith('"')) or + (filename.startswith('<') and + filename.endswith('>'))): + # We are handle only directly included files in the + # following format: #include file.h + # Cases with macro expansion provided by MISRA document are + # skipped because we don't always have access to directive + # definition. + if '.' in filename: + self.reportError(directive, 20, 3) + + def misra_20_4(self, data): + for directive in data.directives: + res = re.search(r'#define ([a-z][a-z0-9_]+)', directive.str) + if res and isKeyword(res.group(1), data.standards.c): + self.reportError(directive, 20, 4) + + def misra_20_5(self, data): + for directive in data.directives: + if directive.str.startswith('#undef '): + self.reportError(directive, 20, 5) + + def misra_20_7(self, data): + def find_string_concat(exp, arg, directive_args): + # Handle concatenation of string literals, e.g.: + # #define MACRO(A, B) (A " " B) + # Addon should not report errors for both macro arguments. + arg_pos = exp.find(arg, 0) + need_check = False + skip_next = False + state_in_string = False + pos_search = arg_pos + 1 + directive_args = [a.strip() for a in directive_args if a != arg] + arg = arg.strip() + while pos_search < len(exp): + if exp[pos_search] == '"': + if state_in_string: + state_in_string = False + else: + state_in_string = True + pos_search += 1 + elif exp[pos_search].isalnum(): + word = "" + while pos_search < len(exp) and exp[pos_search].isalnum(): + word += exp[pos_search] + pos_search += 1 + if word == arg: + pos_search += 1 + elif word in directive_args: + skip_next = True + break + elif exp[pos_search] == ' ': + pos_search += 1 + elif state_in_string: + pos_search += 1 + else: + need_check = True + break + return need_check, skip_next + + for directive in data.directives: + d = Define(directive) + exp = '(' + d.expansionList + ')' + skip_next = False + for arg in d.args: + if skip_next: + _, skip_next = find_string_concat(exp, arg, d.args) + continue + need_check, skip_next = find_string_concat(exp, arg, d.args) + if not need_check: + continue + + pos = 0 + while pos < len(exp): + pos = exp.find(arg, pos) + if pos < 0: + break + # is 'arg' used at position pos + pos1 = pos - 1 + pos2 = pos + len(arg) + pos = pos2 + if pos1 >= 0 and (isalnum(exp[pos1]) or exp[pos1] == '_'): + continue + if pos2 < len(exp) and (isalnum(exp[pos2]) or exp[pos2] == '_'): + continue + + while pos1 >= 0 and exp[pos1] == ' ': + pos1 -= 1 + if exp[pos1] == '#': + continue + if exp[pos1] not in '([,.': + self.reportError(directive, 20, 7) + break + while pos2 < len(exp) and exp[pos2] == ' ': + pos2 += 1 + if pos2 < len(exp) and exp[pos2] not in ')]#,': + self.reportError(directive, 20, 7) + break + + def misra_20_8(self, cfg): + for cond in cfg.preprocessor_if_conditions: + #print(cond) + if cond.result and cond.result not in (0,1): + self.reportError(cond, 20, 8) + + def misra_20_9(self, cfg): + for cond in cfg.preprocessor_if_conditions: + if cond.E is None: + continue + defined = [] + for directive in cfg.directives: + if directive.file == cond.file and directive.linenr == cond.linenr: + for name in re.findall(r'[^_a-zA-Z0-9]defined[ ]*\([ ]*([_a-zA-Z0-9]+)[ ]*\)', directive.str): + defined.append(name) + for name in re.findall(r'[^_a-zA-Z0-9]defined[ ]*([_a-zA-Z0-9]+)', directive.str): + defined.append(name) + break + for s in cond.E.split(' '): + if (s[0] >= 'A' and s[0] <= 'Z') or (s[0] >= 'a' and s[0] <= 'z'): + if isKeyword(s, cfg.standards.c): + continue + if s in defined: + continue + self.reportError(cond, 20, 9) + + def misra_20_10(self, data): + for directive in data.directives: + d = Define(directive) + if d.expansionList.find('#') >= 0: + self.reportError(directive, 20, 10) + + def misra_20_11(self, cfg): + for directive in cfg.directives: + d = Define(directive) + for arg in d.args: + res = re.search(r'[^#]#[ ]*%s[ ]*##' % arg, ' ' + d.expansionList) + if res: + self.reportError(directive, 20, 11) + + def misra_20_12(self, cfg): + def _is_hash_hash_op(expansion_list, arg): + return re.search(r'##[ ]*%s[^a-zA-Z0-9_]' % arg, expansion_list) or \ + re.search(r'[^a-zA-Z0-9_]%s[ ]*##' % arg, expansion_list) + + def _is_other_op(expansion_list, arg): + pos = expansion_list.find(arg) + while pos >= 0: + pos1 = pos - 1 + pos2 = pos + len(arg) + pos = expansion_list.find(arg, pos2) + if isalnum(expansion_list[pos1]) or expansion_list[pos1] == '_': + continue + if isalnum(expansion_list[pos2]) or expansion_list[pos2] == '_': + continue + while expansion_list[pos1] == ' ': + pos1 = pos1 - 1 + if expansion_list[pos1] == '#': + continue + while expansion_list[pos2] == ' ': + pos2 = pos2 + 1 + if expansion_list[pos2] == '#': + continue + return True + return False + + def _is_arg_macro_usage(directive, arg): + for macro_usage in cfg.macro_usage: + if macro_usage.file == directive.file and macro_usage.linenr == directive.linenr: + for macro_usage_arg in cfg.macro_usage: + if macro_usage_arg == macro_usage: + continue + if (macro_usage.usefile == macro_usage_arg.usefile and + macro_usage.uselinenr == macro_usage_arg.uselinenr and + macro_usage.usecolumn == macro_usage_arg.usecolumn): + # TODO: check arg better + return True + return False + + for directive in cfg.directives: + define = Define(directive) + expansion_list = '(%s)' % define.expansionList + for arg in define.args: + if not _is_hash_hash_op(expansion_list, arg): + continue + if not _is_other_op(expansion_list, arg): + continue + if _is_arg_macro_usage(directive, arg): + self.reportError(directive, 20, 12) + break + + def misra_20_13(self, data): + dir_pattern = re.compile(r'#[ ]*([^ (<]*)') + for directive in data.directives: + dir = directive.str + mo = dir_pattern.match(dir) + if mo: + dir = mo.group(1) + if dir not in ['define', 'elif', 'else', 'endif', 'error', 'if', 'ifdef', 'ifndef', 'include', + 'pragma', 'undef', 'warning']: + self.reportError(directive, 20, 13) + + def misra_20_14(self, data): + # stack for #if blocks. contains the #if directive until the corresponding #endif is seen. + # the size increases when there are inner #if directives. + ifStack = [] + for directive in data.directives: + if directive.str.startswith('#if ') or directive.str.startswith('#ifdef ') or directive.str.startswith( + '#ifndef '): + ifStack.append(directive) + elif directive.str == '#else' or directive.str.startswith('#elif '): + if len(ifStack) == 0: + self.reportError(directive, 20, 14) + ifStack.append(directive) + elif directive.file != ifStack[-1].file: + self.reportError(directive, 20, 14) + elif directive.str == '#endif': + if len(ifStack) == 0: + self.reportError(directive, 20, 14) + elif directive.file != ifStack[-1].file: + self.reportError(directive, 20, 14) + ifStack.pop() + + def misra_21_1(self, data): + re_forbidden_macro = re.compile(r'#(?:define|undef) _[_A-Z]+') + re_macro_name = re.compile(r'#(?:define|undef) (.+)[ $]') + + for d in data.directives: + # Search for forbidden identifiers + m = re.search(re_forbidden_macro, d.str) + if m: + self.reportError(d, 21, 1) + continue + + # Search standard library identifiers in macro names + m = re.search(re_macro_name, d.str) + if not m: + continue + name = m.group(1) + if isStdLibId(name, data.standards.c): + self.reportError(d, 21, 1) + + def misra_21_2(self, cfg): + for directive in cfg.directives: + define = Define(directive) + if re.match(r'_+BUILTIN_.*', define.name.upper()): + self.reportError(directive, 21, 2) + for func in cfg.functions: + if isStdLibId(func.name, cfg.standards.c): + tok = func.tokenDef if func.tokenDef else func.token + self.reportError(tok, 21, 2) + + def misra_21_3(self, data): + for token in data.tokenlist: + if isFunctionCall(token, data.standards.c) and (token.astOperand1.str in ('malloc', 'calloc', 'realloc', 'free')): + self.reportError(token, 21, 3) + + def misra_21_4(self, data): + directive = findInclude(data.directives, '') + if directive: + self.reportError(directive, 21, 4) + + def misra_21_5(self, data): + directive = findInclude(data.directives, '') + if directive: + self.reportError(directive, 21, 5) + + def misra_21_6(self, data): + for token in data.tokenlist: + if not isFunctionCall(token) or token.previous.function: + continue + standard_id = getStdLib(data.standards.c) + funcname = token.previous.str + if funcname in standard_id.get("stdio.h", []) or funcname in standard_id.get("wchar.h", []): + self.reportError(token, 21, 6) + + def misra_21_7(self, data): + for token in data.tokenlist: + if isFunctionCall(token, data.standards.c) and (token.astOperand1.str in ('atof', 'atoi', 'atol', 'atoll')): + self.reportError(token, 21, 7) + + def misra_21_8(self, data): + for token in data.tokenlist: + if isFunctionCall(token, data.standards.c) and (token.astOperand1.str in ('abort', 'exit', 'getenv')): + self.reportError(token, 21, 8) + + def misra_21_9(self, data): + for token in data.tokenlist: + if (token.str in ('bsearch', 'qsort')) and token.next and token.next.str == '(': + self.reportError(token, 21, 9) + + def misra_21_10(self, data): + directive = findInclude(data.directives, '') + if directive: + self.reportError(directive, 21, 10) + + for token in data.tokenlist: + if (token.str == 'wcsftime') and token.next and token.next.str == '(': + self.reportError(token, 21, 10) + + def misra_21_11(self, data): + directive = findInclude(data.directives, '') + if directive: + self.reportError(directive, 21, 11) + + def misra_21_12(self, data): + if findInclude(data.directives, ''): + for token in data.tokenlist: + if token.str == 'fexcept_t' and token.isName: + self.reportError(token, 21, 12) + if isFunctionCall(token, data.standards.c) and (token.astOperand1.str in ( + 'feclearexcept', + 'fegetexceptflag', + 'feraiseexcept', + 'fesetexceptflag', + 'fetestexcept')): + self.reportError(token, 21, 12) + + def misra_21_14(self, data): + # buffers used in strcpy/strlen/etc function calls + string_buffers = [] + for token in data.tokenlist: + if token.str[0] == 's' and isFunctionCall(token.next, data.standards.c): + name, args = cppcheckdata.get_function_call_name_args(token) + if name is None: + continue + def _get_string_buffers(match, args, argnum): + if not match: + return [] + ret = [] + for a in argnum: + if a < len(args): + arg = args[a] + while arg and arg.str in ('.', '::'): + arg = arg.astOperand2 + if arg and arg.varId != 0 and arg.varId not in ret: + ret.append(arg.varId) + return ret + string_buffers += _get_string_buffers(name == 'strcpy', args, [0, 1]) + string_buffers += _get_string_buffers(name == 'strncpy', args, [0, 1]) + string_buffers += _get_string_buffers(name == 'strlen', args, [0]) + string_buffers += _get_string_buffers(name == 'strcmp', args, [0, 1]) + string_buffers += _get_string_buffers(name == 'sprintf', args, [0]) + string_buffers += _get_string_buffers(name == 'snprintf', args, [0, 3]) + + for token in data.tokenlist: + if token.str != 'memcmp': + continue + name, args = cppcheckdata.get_function_call_name_args(token) + if name is None: + continue + if len(args) != 3: + continue + for arg in args[:2]: + if arg.str[-1] == '\"': + self.reportError(arg, 21, 14) + continue + while arg and arg.str in ('.', '::'): + arg = arg.astOperand2 + if arg and arg.varId and arg.varId in string_buffers: + self.reportError(arg, 21, 14) + + def misra_21_15(self, data): + for token in data.tokenlist: + if token.str not in ('memcpy', 'memmove', 'memcmp'): + continue + name, args = cppcheckdata.get_function_call_name_args(token) + if name is None: + continue + if len(args) != 3: + continue + if args[0].valueType is None or args[1].valueType is None: + continue + if args[0].valueType.type == args[1].valueType.type: + continue + if args[0].valueType.type == 'void' or args[1].valueType.type == 'void': + continue + self.reportError(token, 21, 15) + + def misra_21_16(self, cfg): + for token in cfg.tokenlist: + if token.str != 'memcmp': + continue + name, args = cppcheckdata.get_function_call_name_args(token) + if name is None: + continue + if len(args) != 3: + continue + for arg in args[:2]: + if arg.valueType is None: + continue + if arg.valueType.pointer > 1: + continue + if getEssentialTypeCategory(arg) in ('unsigned', 'signed', 'bool'): + continue + if arg.valueType.isEnum(): + continue + self.reportError(token, 21, 16) + + def misra_21_19(self, cfg): + for token in cfg.tokenlist: + if token.str in ('localeconv', 'getenv', 'setlocale', 'strerror') and simpleMatch(token.next, '('): + name, _ = cppcheckdata.get_function_call_name_args(token) + if name is None or name != token.str: + continue + parent = token.next + while simpleMatch(parent.astParent, '+'): + parent = parent.astParent + # x = f() + if simpleMatch(parent.astParent, '=') and parent == parent.astParent.astOperand2: + lhs = parent.astParent.astOperand1 + if lhs and lhs.valueType and lhs.valueType.pointer > 0 and lhs.valueType.constness == 0: + self.reportError(token, 21, 19) + if token.str == '=': + lhs = token.astOperand1 + while simpleMatch(lhs, '*') and lhs.astOperand2 is None: + lhs = lhs.astOperand1 + if not simpleMatch(lhs, '.'): + continue + while simpleMatch(lhs, '.'): + lhs = lhs.astOperand1 + if lhs and lhs.variable and simpleMatch(lhs.variable.typeStartToken, 'lconv'): + self.reportError(token, 21, 19) + + def misra_21_20(self, cfg): + assigned = {} + invalid = [] + for token in cfg.tokenlist: + # No sophisticated data flow analysis, bail out if control flow is "interrupted" + if token.str in ('{', '}', 'break', 'continue', 'return'): + assigned = {} + invalid = [] + continue + + # When pointer is assigned, remove it from 'assigned' and 'invalid' + if token.varId and token.varId > 0 and simpleMatch(token.next, '='): + for name in assigned.keys(): + while token.varId in assigned[name]: + assigned[name].remove(token.varId) + while token.varId in invalid: + invalid.remove(token.varId) + continue + + # Calling dangerous function + if token.str in ('asctime', 'ctime', 'gmtime', 'localtime', 'localeconv', 'getenv', 'setlocale', 'strerror'): + name, _ = cppcheckdata.get_function_call_name_args(token) + if name and name == token.str: + # make assigned pointers invalid + for varId in assigned.get(name, ()): + if varId not in invalid: + invalid.append(varId) + + # assign pointer + parent = token.next + while parent.astParent and (parent.astParent.str == '+' or isCast(parent.astParent)): + parent = parent.astParent + if simpleMatch(parent.astParent, '='): + eq = parent.astParent + vartok = eq.previous + if vartok and vartok.varId and vartok.varId > 0: + if name not in assigned: + assigned[name] = [vartok.varId] + elif vartok.varId not in assigned[name]: + assigned[name].append(vartok.varId) + continue + + # taking value of invalid pointer.. + if token.astParent and token.varId: + if token.varId in invalid: + self.reportError(token, 21, 20) + + def misra_21_21(self, cfg): + for token in cfg.tokenlist: + if token.str == 'system': + name, args = cppcheckdata.get_function_call_name_args(token) + if name == 'system' and len(args) == 1: + self.reportError(token, 21, 21) + + def misra_22_5(self, cfg): + for token in cfg.tokenlist: + if token.isUnaryOp("*") or (token.isBinaryOp() and token.str == '.'): + fileptr = token.astOperand1 + if fileptr.variable and cppcheckdata.simpleMatch(fileptr.variable.typeStartToken, 'FILE *'): + self.reportError(token, 22, 5) + + def misra_22_7(self, cfg): + for eofToken in cfg.tokenlist: + if eofToken.str != 'EOF': + continue + if eofToken.astParent is None or not eofToken.astParent.isComparisonOp: + continue + if eofToken.astParent.astOperand1 == eofToken: + eofTokenSibling = eofToken.astParent.astOperand2 + else: + eofTokenSibling = eofToken.astParent.astOperand1 + while isCast(eofTokenSibling) and eofTokenSibling.valueType and eofTokenSibling.valueType.type and eofTokenSibling.valueType.type == 'int': + eofTokenSibling = eofTokenSibling.astOperand2 if eofTokenSibling.astOperand2 else eofTokenSibling.astOperand1 + if eofTokenSibling is not None and eofTokenSibling.valueType and eofTokenSibling.valueType and eofTokenSibling.valueType.type in ('bool', 'char', 'short'): + self.reportError(eofToken, 22, 7) + + def misra_22_8(self, cfg): + is_zero = False + for token in cfg.tokenlist: + if simpleMatch(token, 'errno = 0'): + is_zero = True + if token.str == '(' and not simpleMatch(token.link, ') {'): + name, _ = cppcheckdata.get_function_call_name_args(token.previous) + if name is None: + continue + if is_errno_setting_function(name): + if not is_zero: + self.reportError(token, 22, 8) + else: + is_zero = False + + def misra_22_9(self, cfg): + errno_is_set = False + for token in cfg.tokenlist: + if token.str == '(' and not simpleMatch(token.link, ') {'): + name, _ = cppcheckdata.get_function_call_name_args(token.previous) + if name is None: + continue + errno_is_set = is_errno_setting_function(name) + if errno_is_set and token.str in '{};': + errno_is_set = False + tok = token.next + while tok and tok.str not in ('{','}',';','errno'): + tok = tok.next + if tok is None or tok.str != 'errno': + self.reportError(token, 22, 9) + elif (tok.astParent is None) or (not tok.astParent.isComparisonOp): + self.reportError(token, 22, 9) + + def misra_22_10(self, cfg): + last_function_call = None + for token in cfg.tokenlist: + if token.isName and token.next and token.next.str == '(' and not simpleMatch(token.next.link, ') {'): + name, _ = cppcheckdata.get_function_call_name_args(token) + last_function_call = name + if token.str == '}': + last_function_call = None + if token.str == 'errno' and token.astParent and token.astParent.isComparisonOp: + if last_function_call is None: + self.reportError(token, 22, 10) + elif not is_errno_setting_function(last_function_call): + self.reportError(token, 22, 10) + + + def get_verify_expected(self): + """Return the list of expected violations in the verify test""" + return self.verify_expected + + def get_verify_actual(self): + """Return the list of actual violations in for the verify test""" + return self.verify_actual + + def get_violations(self, violation_type=None): + """Return the list of violations for a normal checker run""" + if violation_type is None: + return self.violations.items() + return self.violations[violation_type] + + def get_violation_types(self): + """Return the list of violations for a normal checker run""" + return self.violations.keys() + + def addSuppressedRule(self, ruleNum, + fileName=None, + lineNumber=None, + symbolName=None): + """ + Add a suppression to the suppressions data structure + + Suppressions are stored in a dictionary of dictionaries that + contains a list of tuples. + + The first dictionary is keyed by the MISRA rule in hundreds + format. The value of that dictionary is a dictionary of filenames. + If the value is None then the rule is assumed to be suppressed for + all files. + If the filename exists then the value of that dictionary contains a list + with the scope of the suppression. If the list contains an item of None + then the rule is assumed to be suppressed for the entire file. Otherwise + the list contains line number, symbol name tuples. + For each tuple either line number or symbol name can can be none. + + """ + normalized_filename = None + + if fileName is not None: + normalized_filename = os.path.expanduser(fileName) + normalized_filename = os.path.normpath(normalized_filename) + + if lineNumber is not None or symbolName is not None: + line_symbol = (lineNumber, symbolName) + else: + line_symbol = None + + # If the rule is not in the dict already then add it + if ruleNum not in self.suppressedRules: + ruleItemList = [] + ruleItemList.append(line_symbol) + + fileDict = {} + fileDict[normalized_filename] = ruleItemList + + self.suppressedRules[ruleNum] = fileDict + + # Rule is added. Done. + return + + # Rule existed in the dictionary. Check for + # filename entries. + + # Get the dictionary for the rule number + fileDict = self.suppressedRules[ruleNum] + + # If the filename is not in the dict already add it + if normalized_filename not in fileDict: + ruleItemList = [] + ruleItemList.append(line_symbol) + + fileDict[normalized_filename] = ruleItemList + + # Rule is added with a file scope. Done + return + + # Rule has a matching filename. Get the rule item list. + + # Check the lists of rule items + # to see if this (lineNumber, symbolName) combination + # or None already exists. + ruleItemList = fileDict[normalized_filename] + + if line_symbol is None: + # is it already in the list? + if line_symbol not in ruleItemList: + ruleItemList.append(line_symbol) + else: + # Check the list looking for matches + matched = False + for each in ruleItemList: + if each is not None: + if (each[0] == line_symbol[0]) and (each[1] == line_symbol[1]): + matched = True + + # Append the rule item if it was not already found + if not matched: + ruleItemList.append(line_symbol) + + def isRuleSuppressed(self, file_path, linenr, ruleNum): + """ + Check to see if a rule is suppressed. + + :param ruleNum: is the rule number in hundreds format + :param file_path: File path of checked location + :param linenr: Line number of checked location + + If the rule exists in the dict then check for a filename + If the filename is None then rule is suppressed globally + for all files. + If the filename exists then look for list of + line number, symbol name tuples. If the list is None then + the rule is suppressed for the entire file + If the list of tuples exists then search the list looking for + matching line numbers. Symbol names are currently ignored + because they can include regular expressions. + TODO: Support symbol names and expression matching. + + """ + ruleIsSuppressed = False + + # Remove any prefix listed in command arguments from the filename. + filename = None + if file_path is not None: + if self.filePrefix is not None: + filename = remove_file_prefix(file_path, self.filePrefix) + else: + filename = os.path.basename(file_path) + + if ruleNum in self.suppressedRules: + fileDict = self.suppressedRules[ruleNum] + + # a file name entry of None means that the rule is suppressed + # globally + if None in fileDict: + ruleIsSuppressed = True + else: + # Does the filename match one of the names in + # the file list + if filename in fileDict: + # Get the list of ruleItems + ruleItemList = fileDict[filename] + + if None in ruleItemList: + # Entry of None in the ruleItemList means the rule is + # suppressed for all lines in the filename + ruleIsSuppressed = True + else: + # Iterate though the the list of line numbers + # and symbols looking for a match of the line + # number. Matching the symbol is a TODO: + for each in ruleItemList: + if each is not None: + if each[0] == linenr: + ruleIsSuppressed = True + + return ruleIsSuppressed + + def isRuleGloballySuppressed(self, rule_num): + """ + Check to see if a rule is globally suppressed. + :param rule_num: is the rule number in hundreds format + """ + if rule_num not in self.suppressedRules: + return False + return None in self.suppressedRules[rule_num] + + def showSuppressedRules(self): + """ + Print out rules in suppression list sorted by Rule Number + """ + print("Suppressed Rules List:") + outlist = [] + + for ruleNum in self.suppressedRules: + fileDict = self.suppressedRules[ruleNum] + + for fname in fileDict: + ruleItemList = fileDict[fname] + + for item in ruleItemList: + if item is None: + item_str = "None" + else: + item_str = str(item[0]) + + outlist.append("%s: %s: %s (%d locations suppressed)" % ( + float(ruleNum) / 100, fname, item_str, self.suppressionStats.get(ruleNum, 0))) + + for line in sorted(outlist, reverse=True): + print(" %s" % line) + + def setFilePrefix(self, prefix): + """ + Set the file prefix to ignore from files when matching + suppression files + """ + self.filePrefix = prefix + + def setSeverity(self, severity): + """ + Set the severity for all errors. + """ + self.severity = severity + + def setSuppressionList(self, suppressionlist): + num1 = 0 + num2 = 0 + rule_pattern = re.compile(r'([0-9]+).([0-9]+)') + strlist = suppressionlist.split(",") + + # build ignore list + for item in strlist: + res = rule_pattern.match(item) + if res: + num1 = int(res.group(1)) + num2 = int(res.group(2)) + ruleNum = (num1 * 100) + num2 + + self.addSuppressedRule(ruleNum) + + def report_config_error(self, location, errmsg): + errmsg = 'Because of missing configuration, misra checking is incomplete. There can be false negatives! ' + errmsg + cppcheck_severity = 'error' + error_id = 'config' + if self.settings.verify: + self.verify_actual.append('%s:%d %s' % (location.file, location.linenr, error_id)) + else: + cppcheckdata.reportError(location, cppcheck_severity, errmsg, 'misra', error_id) + + def reportError(self, location, num1, num2): + ruleNum = num1 * 100 + num2 + + if self.isRuleGloballySuppressed(ruleNum): + return + + if self.settings.verify: + self.verify_actual.append('%s:%d %d.%d' % (location.file, location.linenr, num1, num2)) + elif self.isRuleSuppressed(location.file, location.linenr, ruleNum): + # Error is suppressed. Ignore + self.suppressionStats.setdefault(ruleNum, 0) + self.suppressionStats[ruleNum] += 1 + return + else: + errorId = 'c2012-' + str(num1) + '.' + str(num2) + misra_severity = 'Undefined' + cppcheck_severity = 'style' + if ruleNum in self.ruleTexts: + errmsg = self.ruleTexts[ruleNum].text + if self.ruleTexts[ruleNum].misra_severity: + misra_severity = self.ruleTexts[ruleNum].misra_severity + cppcheck_severity = self.ruleTexts[ruleNum].cppcheck_severity + elif len(self.ruleTexts) == 0: + if self.ruleText_filename is None: + errmsg = 'misra violation (use --rule-texts= to get proper output)' + else: + errmsg = 'misra violation (rule-texts-file not found: ' + self.ruleText_filename + ')' + else: + errmsg = 'misra violation %s with no text in the supplied rule-texts-file' % (ruleNum) + + if self.severity: + cppcheck_severity = self.severity + + this_violation = '{}-{}-{}-{}'.format(location.file, location.linenr, location.column, ruleNum) + + # If this is new violation then record it and show it. If not then + # skip it since it has already been displayed. + if this_violation not in self.existing_violations: + self.existing_violations.add(this_violation) + cppcheckdata.reportError(location, cppcheck_severity, errmsg, 'misra', errorId, misra_severity) + + if misra_severity not in self.violations: + self.violations[misra_severity] = [] + self.violations[misra_severity].append('misra-' + errorId) + + def loadRuleTexts(self, filename): + num1 = 0 + num2 = 0 + appendixA = False + + Rule_pattern = re.compile(r'^Rule ([0-9]+)\.([0-9]+)') + severity_pattern = re.compile(r'.*[ ]*(Advisory|Required|Mandatory)$') + xA_Z_pattern = re.compile(r'^[#A-Z].*') + a_z_pattern = re.compile(r'^[a-z].*') + # Try to detect the file encoding + file_stream = None + encodings = ['ascii', 'utf-8', 'windows-1250', 'windows-1252'] + for e in encodings: + try: + file_stream = open(filename, 'r', encoding=e) + file_stream.readlines() + file_stream.seek(0) + except UnicodeDecodeError: + file_stream.close() + file_stream = None + else: + break + if not file_stream: + print('Could not find a suitable codec for "' + filename + '".') + print('If you know the codec please report it to the developers so the list can be enhanced.') + print('Trying with default codec now and ignoring errors if possible ...') + try: + file_stream = open(filename, 'rt', errors='ignore') + except TypeError: + # Python 2 does not support the errors parameter + file_stream = open(filename, 'rt') + + rule = None + rule_line_number = 0 + + for line in file_stream: + + line = line.strip() + if len(line) == 0: + continue + + if not appendixA: + if line.find('Appendix A') >= 0 and line.find('Summary of guidelines') >= 10: + appendixA = True + continue + if line.find('Appendix B') >= 0: + break + + # Parse rule declaration. + res = Rule_pattern.match(line) + + if res: + rule_line_number = 0 + num1 = int(res.group(1)) + num2 = int(res.group(2)) + rule = Rule(num1, num2) + + res = severity_pattern.match(line) + if res: + rule.misra_severity = res.group(1) + rule_line_number = 1 + continue + + if rule is None: + continue + + rule_line_number += 1 + + if rule_line_number == 1: + res = severity_pattern.match(line) + + if res: + rule.misra_severity = res.group(1) + continue + + rule_line_number = 2 + + # Parse beginning of rule text. + if not rule.text and xA_Z_pattern.match(line): + rule.text = line.strip() + self.ruleTexts[rule.num] = rule + continue + + # Parse continuing of rule text. + if a_z_pattern.match(line): + self.ruleTexts[rule.num].text += ' ' + line.strip() + continue + + rule = None + + file_stream.close() + + def verifyRuleTexts(self): + """Prints rule numbers without rule text.""" + rule_texts_rules = [] + for rule_num in self.ruleTexts: + rule = self.ruleTexts[rule_num] + rule_texts_rules.append(str(rule.num1) + '.' + str(rule.num2)) + + all_rules = list(getAddonRules() + getCppcheckRules()) + + missing_rules = list(set(all_rules) - set(rule_texts_rules)) + if len(missing_rules) == 0: + print("Rule texts are correct.") + else: + print("Missing rule texts: " + ', '.join(missing_rules)) + + def printStatus(self, *args, **kwargs): + if not self.settings.quiet: + print(*args, **kwargs) + + def executeCheck(self, rule_num, check_function, *args): + """Execute check function for a single MISRA rule. + + :param rule_num: Number of rule in hundreds format + :param check_function: Check function to execute + :param args: Check function arguments + """ + if not self.isRuleGloballySuppressed(rule_num): + misra_cpp = ( + 202, # misra-c2012-2.3 : misra c++2008 0-1-9 + 203, # misra-c2012-2.3 : misra c++2008 0-1-5 + 402, # misra-c2012-4.2 : misra c++2008 2-3-1 + 701, # misra-c2012-7.1 : misra c++2008 2-3-1 + 702, # misra-c2012-7.2 : misra c++2008 2-13-2 + 1203, # misra-c2012-12.3 : misra c++2008 5-14-1 + 1204, # misra-c2012-12.4 : misra c++2008 5-18-1 + 1305, # misra-c2012-13.5 : misra c++2008 5-19-1 + 1702, # misra-c2012-17.2 : misra c++2008 7-5-4 + 1901) # misra-c2012-19.1 : misra c++2008 2-13-3 + + if (not self.is_cpp) or rule_num in misra_cpp: + # log checker + errmsg = 'Misra C: %i.%i' % (rule_num // 100, rule_num % 100) + cppcheckdata.log_checker(errmsg, 'misra') + + check_function(*args) + + def parseDump(self, dumpfile, path_premium_addon=None): + def fillVerifyExpected(verify_expected, tok): + """Add expected suppressions to verify_expected list.""" + rule_re = re.compile(r'[0-9]+\.[0-9]+') + if tok.str.startswith('//') and 'TODO' not in tok.str: + for word in tok.str[2:].split(' '): + if rule_re.match(word) or word == "config": + verify_expected.append('%s:%d %s' % (tok.file, tok.linenr, word)) + + data = cppcheckdata.parsedump(dumpfile) + typeBits['CHAR'] = data.platform.char_bit + typeBits['SHORT'] = data.platform.short_bit + typeBits['INT'] = data.platform.int_bit + typeBits['LONG'] = data.platform.long_bit + typeBits['LONG_LONG'] = data.platform.long_long_bit + typeBits['POINTER'] = data.platform.pointer_bit + + if self.settings.verify: + # Add suppressions from the current file + for tok in data.rawTokens: + fillVerifyExpected(self.verify_expected, tok) + # Add suppressions from the included headers + include_re = re.compile(r'^#include [<"]([a-zA-Z0-9]+[a-zA-Z\-_./\\0-9]*)[">]$') + dump_dir = os.path.dirname(data.filename) + for conf in data.configurations: + for directive in conf.directives: + m = re.match(include_re, directive.str) + if not m: + continue + header_dump_path = os.path.join(dump_dir, m.group(1) + '.dump') + if not os.path.exists(header_dump_path): + continue + header_data = cppcheckdata.parsedump(header_dump_path) + for tok in header_data.rawTokens: + fillVerifyExpected(self.verify_expected, tok) + else: + self.printStatus('Checking ' + dumpfile + '...') + + self.is_cpp = data.language == 'cpp' + + for cfgNumber, cfg in enumerate(data.iterconfigurations()): + if not self.settings.quiet: + self.printStatus('Checking %s, config %s...' % (dumpfile, cfg.name)) + + self.executeCheck(102, self.misra_1_2, cfg) + if not path_premium_addon: + self.executeCheck(104, self.misra_1_4, cfg) + self.executeCheck(202, self.misra_2_2, cfg) + self.executeCheck(203, self.misra_2_3, dumpfile, cfg.typedefInfo) + self.executeCheck(204, self.misra_2_4, dumpfile, cfg) + self.executeCheck(205, self.misra_2_5, dumpfile, cfg) + self.executeCheck(207, self.misra_2_7, cfg) + # data.rawTokens is same for all configurations + if cfgNumber == 0: + self.executeCheck(301, self.misra_3_1, data.rawTokens) + #self.executeCheck(302, self.misra_3_2, data.rawTokens) + self.executeCheck(401, self.misra_4_1, data.rawTokens) + self.executeCheck(402, self.misra_4_2, data.rawTokens) + self.executeCheck(501, self.misra_5_1, cfg) + self.executeCheck(502, self.misra_5_2, cfg) + self.executeCheck(504, self.misra_5_4, cfg) + self.executeCheck(505, self.misra_5_5, cfg) + self.executeCheck(506, self.misra_5_6, dumpfile, cfg.typedefInfo) + self.executeCheck(507, self.misra_5_7, dumpfile, cfg) + self.executeCheck(508, self.misra_5_8, dumpfile, cfg) + self.executeCheck(509, self.misra_5_9, dumpfile, cfg) + self.executeCheck(601, self.misra_6_1, cfg) + self.executeCheck(602, self.misra_6_2, cfg) + if cfgNumber == 0: + self.executeCheck(701, self.misra_7_1, data.rawTokens) + self.executeCheck(702, self.misra_7_2, cfg) + if cfgNumber == 0: + self.executeCheck(703, self.misra_7_3, data.rawTokens) + self.executeCheck(704, self.misra_7_4, cfg) + self.executeCheck(801, self.misra_8_1, cfg) + if cfgNumber == 0: + self.executeCheck(802, self.misra_8_2, cfg, data.rawTokens) + self.executeCheck(804, self.misra_8_4, cfg) + self.executeCheck(805, self.misra_8_5, dumpfile, cfg) + self.executeCheck(806, self.misra_8_6, dumpfile, cfg) + self.executeCheck(807, self.misra_8_7, dumpfile, cfg) + self.executeCheck(808, self.misra_8_8, cfg) + self.executeCheck(809, self.misra_8_9, cfg) + self.executeCheck(810, self.misra_8_10, cfg) + self.executeCheck(811, self.misra_8_11, cfg) + self.executeCheck(812, self.misra_8_12, cfg) + if cfgNumber == 0: + self.executeCheck(814, self.misra_8_14, data.rawTokens) + self.executeCheck(902, self.misra_9_2, cfg) + self.executeCheck(903, self.misra_9_3, cfg) + self.executeCheck(904, self.misra_9_4, cfg) + if cfgNumber == 0: + self.executeCheck(905, self.misra_9_5, cfg, data.rawTokens) + if not path_premium_addon: + self.executeCheck(1001, self.misra_10_1, cfg) + self.executeCheck(1002, self.misra_10_2, cfg) + self.executeCheck(1003, self.misra_10_3, cfg) + self.executeCheck(1004, self.misra_10_4, cfg) + self.executeCheck(1005, self.misra_10_5, cfg) + self.executeCheck(1006, self.misra_10_6, cfg) + self.executeCheck(1007, self.misra_10_7, cfg) + self.executeCheck(1008, self.misra_10_8, cfg) + self.executeCheck(1101, self.misra_11_1, cfg) + self.executeCheck(1102, self.misra_11_2, cfg) + self.executeCheck(1103, self.misra_11_3, cfg) + self.executeCheck(1104, self.misra_11_4, cfg) + self.executeCheck(1105, self.misra_11_5, cfg) + self.executeCheck(1106, self.misra_11_6, cfg) + self.executeCheck(1107, self.misra_11_7, cfg) + self.executeCheck(1108, self.misra_11_8, cfg) + self.executeCheck(1109, self.misra_11_9, cfg) + if cfgNumber == 0: + self.executeCheck(1201, self.misra_12_1_sizeof, data.rawTokens) + self.executeCheck(1201, self.misra_12_1, cfg) + self.executeCheck(1202, self.misra_12_2, cfg) + self.executeCheck(1203, self.misra_12_3, cfg) + self.executeCheck(1204, self.misra_12_4, cfg) + self.executeCheck(1301, self.misra_13_1, cfg) + self.executeCheck(1303, self.misra_13_3, cfg) + self.executeCheck(1304, self.misra_13_4, cfg) + self.executeCheck(1305, self.misra_13_5, cfg) + self.executeCheck(1306, self.misra_13_6, cfg) + self.executeCheck(1401, self.misra_14_1, cfg) + self.executeCheck(1402, self.misra_14_2, cfg) + self.executeCheck(1404, self.misra_14_4, cfg) + self.executeCheck(1501, self.misra_15_1, cfg) + self.executeCheck(1502, self.misra_15_2, cfg) + self.executeCheck(1503, self.misra_15_3, cfg) + self.executeCheck(1504, self.misra_15_4, cfg) + self.executeCheck(1505, self.misra_15_5, cfg) + if cfgNumber == 0: + self.executeCheck(1506, self.misra_15_6, data.rawTokens) + self.executeCheck(1507, self.misra_15_7, cfg) + self.executeCheck(1601, self.misra_16_1, cfg) + self.executeCheck(1602, self.misra_16_2, cfg) + if cfgNumber == 0: + self.executeCheck(1603, self.misra_16_3, data.rawTokens) + self.executeCheck(1604, self.misra_16_4, cfg) + self.executeCheck(1605, self.misra_16_5, cfg) + self.executeCheck(1606, self.misra_16_6, cfg) + self.executeCheck(1607, self.misra_16_7, cfg) + self.executeCheck(1701, self.misra_17_1, cfg) + self.executeCheck(1702, self.misra_17_2, cfg) + self.executeCheck(1703, self.misra_17_3, cfg) + self.misra_config(cfg) + if cfgNumber == 0: + self.executeCheck(1706, self.misra_17_6, data.rawTokens) + self.executeCheck(1707, self.misra_17_7, cfg) + self.executeCheck(1708, self.misra_17_8, cfg) + self.executeCheck(1804, self.misra_18_4, cfg) + self.executeCheck(1805, self.misra_18_5, cfg) + self.executeCheck(1807, self.misra_18_7, cfg) + self.executeCheck(1808, self.misra_18_8, cfg) + self.executeCheck(1902, self.misra_19_2, cfg) + self.executeCheck(2001, self.misra_20_1, cfg) + self.executeCheck(2002, self.misra_20_2, cfg) + self.executeCheck(2003, self.misra_20_3, cfg) + self.executeCheck(2004, self.misra_20_4, cfg) + self.executeCheck(2005, self.misra_20_5, cfg) + self.executeCheck(2007, self.misra_20_7, cfg) + self.executeCheck(2008, self.misra_20_8, cfg) + self.executeCheck(2009, self.misra_20_9, cfg) + self.executeCheck(2010, self.misra_20_10, cfg) + self.executeCheck(2011, self.misra_20_11, cfg) + self.executeCheck(2012, self.misra_20_12, cfg) + self.executeCheck(2013, self.misra_20_13, cfg) + self.executeCheck(2014, self.misra_20_14, cfg) + self.executeCheck(2101, self.misra_21_1, cfg) + self.executeCheck(2102, self.misra_21_2, cfg) + self.executeCheck(2103, self.misra_21_3, cfg) + self.executeCheck(2104, self.misra_21_4, cfg) + self.executeCheck(2105, self.misra_21_5, cfg) + self.executeCheck(2106, self.misra_21_6, cfg) + self.executeCheck(2107, self.misra_21_7, cfg) + self.executeCheck(2108, self.misra_21_8, cfg) + self.executeCheck(2109, self.misra_21_9, cfg) + self.executeCheck(2110, self.misra_21_10, cfg) + self.executeCheck(2111, self.misra_21_11, cfg) + self.executeCheck(2112, self.misra_21_12, cfg) + self.executeCheck(2114, self.misra_21_14, cfg) + self.executeCheck(2115, self.misra_21_15, cfg) + self.executeCheck(2116, self.misra_21_16, cfg) + self.executeCheck(2119, self.misra_21_19, cfg) + self.executeCheck(2120, self.misra_21_20, cfg) + self.executeCheck(2121, self.misra_21_21, cfg) + # 22.4 is already covered by Cppcheck writeReadOnlyFile + self.executeCheck(2205, self.misra_22_5, cfg) + self.executeCheck(2207, self.misra_22_7, cfg) + self.executeCheck(2208, self.misra_22_8, cfg) + self.executeCheck(2209, self.misra_22_9, cfg) + self.executeCheck(2210, self.misra_22_10, cfg) + + def read_ctu_info_line(self, line): + if not line.startswith('{'): + return None + try: + ctu_info = json.loads(line) + except json.decoder.JSONDecodeError: + return None + if 'summary' not in ctu_info: + return None + if 'data' not in ctu_info: + return None + return ctu_info + + def analyse_ctu_info(self, ctu_info_files): + all_typedef_info = {} + all_tagname_info = {} + all_macro_info = {} + all_external_identifiers_decl = {} + all_external_identifiers_def = {} + all_internal_identifiers = {} + all_local_identifiers = {} + all_usage_files = {} + + from cppcheckdata import Location + + def is_different_location(loc1, loc2): + return loc1['file'] != loc2['file'] or loc1['line'] != loc2['line'] + + def is_different_file(loc1, loc2): + return loc1['file'] != loc2['file'] + + try: + for filename in ctu_info_files: + for line in open(filename, 'rt'): + s = self.read_ctu_info_line(line) + if s is None: + continue + summary_type = s.get('summary', '') + summary_data = s.get('data', None) + + if summary_type == 'MisraTypedefInfo': + for new_typedef_info in summary_data: + key = new_typedef_info['name'] + existing_typedef_info = all_typedef_info.get(key, None) + if existing_typedef_info: + if is_different_location(existing_typedef_info, new_typedef_info): + self.reportError(Location(existing_typedef_info), 5, 6) + self.reportError(Location(new_typedef_info), 5, 6) + else: + existing_typedef_info['used'] = existing_typedef_info['used'] or new_typedef_info['used'] + else: + all_typedef_info[key] = new_typedef_info + + if summary_type == 'MisraTagName': + for new_tagname_info in summary_data: + key = new_tagname_info['name'] + existing_tagname_info = all_tagname_info.get(key, None) + if existing_tagname_info: + if is_different_location(existing_tagname_info, new_tagname_info): + self.reportError(Location(existing_tagname_info), 5, 7) + self.reportError(Location(new_tagname_info), 5, 7) + else: + existing_tagname_info['used'] = existing_tagname_info['used'] or new_tagname_info['used'] + else: + all_tagname_info[key] = new_tagname_info + + if summary_type == 'MisraMacro': + for new_macro in summary_data: + key = new_macro['name'] + existing_macro = all_macro_info.get(key, None) + if existing_macro: + existing_macro['used'] = existing_macro['used'] or new_macro['used'] + else: + all_macro_info[key] = new_macro + + if summary_type == 'MisraExternalIdentifiers': + for s in sorted(summary_data, key=lambda d: "%s %s %s" %(d['file'],d['line'], d['column'] )): + is_declaration = s['decl'] + if is_declaration: + all_external_identifiers = all_external_identifiers_decl + else: + all_external_identifiers = all_external_identifiers_def + + name = s['name'] + if name in all_external_identifiers: + if is_declaration and is_different_location(s, all_external_identifiers[name]): + self.reportError(Location(s), 8, 5) + self.reportError(Location(all_external_identifiers[name]), 8, 5) + elif is_different_file(s, all_external_identifiers[name]): + self.reportError(Location(s), 8, 6) + self.reportError(Location(all_external_identifiers[name]), 8, 6) + all_external_identifiers[name] = s + + if summary_type == 'MisraInternalIdentifiers': + for s in summary_data: + if s['name'] in all_internal_identifiers: + if not s['inlinefunc'] or s['file'] != all_internal_identifiers[s['name']]['file']: + self.reportError(Location(s), 5, 9) + self.reportError(Location(all_internal_identifiers[s['name']]), 5, 9) + all_internal_identifiers[s['name']] = s + + if summary_type == 'MisraLocalIdentifiers': + for s in summary_data: + all_local_identifiers[s['name']] = s + + if summary_type == 'MisraUsage': + for s in summary_data: + if s['name'] in all_usage_files: + all_usage_files[s['name']].append(s['file']) + else: + all_usage_files[s['name']] = [s['file']] + + except FileNotFoundError: + return + + unused_typedefs = [tdi for tdi in all_typedef_info.values() if not tdi['used']] + for tdi in unused_typedefs: + self.reportError(Location(tdi), 2, 3) + + unused_tags = [tag for tag in all_tagname_info.values() if not tag['used']] + for tag in unused_tags: + self.reportError(Location(tag), 2, 4) + + unused_macros = [m for m in all_macro_info.values() if not m['used']] + for m in unused_macros: + self.reportError(Location(m), 2, 5) + + all_external_identifiers = all_external_identifiers_decl + all_external_identifiers.update(all_external_identifiers_def) + for name, external_identifier in all_external_identifiers.items(): + internal_identifier = all_internal_identifiers.get(name) + if internal_identifier: + self.reportError(Location(internal_identifier), 5, 8) + self.reportError(Location(external_identifier), 5, 8) + + local_identifier = all_local_identifiers.get(name) + if local_identifier: + self.reportError(Location(local_identifier), 5, 8) + self.reportError(Location(external_identifier), 5, 8) + + for name, files in all_usage_files.items(): + #print('%s:%i' % (name, count)) + count = len(files) + if count != 1 or name not in all_external_identifiers_def: + continue + if files[0] != Location(all_external_identifiers_def[name]).file: + continue + if name in all_external_identifiers: + self.reportError(Location(all_external_identifiers[name]), 8, 7) + +RULE_TEXTS_HELP = '''Path to text file of MISRA rules + +If you have the tool 'pdftotext' you might be able +to generate this textfile with such command: + + pdftotext MISRA_C_2012.pdf MISRA_C_2012.txt + +Otherwise you can more or less copy/paste the chapter +Appendix A Summary of guidelines +from the MISRA pdf. You can buy the MISRA pdf from +http://www.misra.org.uk/ + +Format: + +<..arbitrary text..> +Appendix A Summary of guidelines +Rule 1.1 Required +Rule text for 1.1 +continuation of rule text for 1.1 +Rule 1.2 Mandatory +Rule text for 1.2 +continuation of rule text for 1.2 +<...> + +''' + +SUPPRESS_RULES_HELP = '''MISRA rules to suppress (comma-separated) + +For example, if you'd like to suppress rules 15.1, 11.3, +and 20.13, run: + + python misra.py --suppress-rules 15.1,11.3,20.13 ... + +''' + + +def get_args_parser(): + """Generates list of command-line arguments acceptable by misra.py script.""" + parser = cppcheckdata.ArgumentParser() + parser.add_argument("--rule-texts", type=str, help=RULE_TEXTS_HELP) + parser.add_argument("--verify-rule-texts", + help="Verify that all supported rules texts are present in given file and exit.", + action="store_true") + parser.add_argument("--suppress-rules", type=str, help=SUPPRESS_RULES_HELP) + parser.add_argument("--no-summary", help="Hide summary of violations", action="store_true") + parser.add_argument("--show-suppressed-rules", help="Print rule suppression list", action="store_true") + parser.add_argument("-P", "--file-prefix", type=str, help="Prefix to strip when matching suppression file rules") + parser.add_argument("-generate-table", help=argparse.SUPPRESS, action="store_true") + parser.add_argument("-verify", help=argparse.SUPPRESS, action="store_true") + parser.add_argument("--severity", type=str, help="Set a custom severity string, for example 'error' or 'warning'. ") + return parser + + +def main(): + parser = get_args_parser() + args = parser.parse_args() + settings = MisraSettings(args) + checker = MisraChecker(settings) + + checker.path_premium_addon = cppcheckdata.get_path_premium_addon() + + if args.generate_table: + generateTable() + sys.exit(0) + + if args.rule_texts: + filename = os.path.expanduser(args.rule_texts) + filename = os.path.normpath(filename) + checker.ruleText_filename = filename + if os.path.isfile(filename): + checker.loadRuleTexts(filename) + if args.verify_rule_texts: + checker.verifyRuleTexts() + sys.exit(0) + else: + if args.verify_rule_texts: + print('Fatal error: file is not found: ' + filename) + sys.exit(1) + + + if args.verify_rule_texts and not args.rule_texts: + print("Error: Please specify rule texts file with --rule-texts=") + sys.exit(1) + + if args.suppress_rules: + checker.setSuppressionList(args.suppress_rules) + + if args.file_prefix: + checker.setFilePrefix(args.file_prefix) + + dump_files, ctu_info_files = cppcheckdata.get_files(args) + + if (not dump_files) and (not ctu_info_files): + if not args.quiet: + print("No input files.") + sys.exit(0) + + if args.severity: + checker.setSeverity(args.severity) + + for item in dump_files: + checker.parseDump(item,checker.path_premium_addon) + + if settings.verify: + verify_expected = checker.get_verify_expected() + verify_actual = checker.get_verify_actual() + + exitCode = 0 + for expected in verify_expected: + if expected not in verify_actual: + print('Expected but not seen: ' + expected) + exitCode = 1 + for actual in verify_actual: + if actual not in verify_expected: + print('Not expected: ' + actual) + exitCode = 1 + + # Existing behavior of verify mode is to exit + # on the first un-expected output. + # TODO: Is this required? or can it be moved to after + # all input files have been processed + if exitCode != 0: + sys.exit(exitCode) + + checker.analyse_ctu_info(ctu_info_files) + + if settings.verify: + sys.exit(exitCode) + + number_of_violations = len(checker.get_violations()) + if number_of_violations > 0: + if settings.show_summary: + print("\nMISRA rules violations found:\n\t%s\n" % ( + "\n\t".join(["%s: %d" % (viol, len(checker.get_violations(viol))) for viol in + checker.get_violation_types()]))) + + rules_violated = {} + for severity, ids in checker.get_violations(): + for misra_id in ids: + rules_violated[misra_id] = rules_violated.get(misra_id, 0) + 1 + print("MISRA rules violated:") + convert = lambda text: int(text) if text.isdigit() else 0 + misra_sort = lambda key: [convert(c) for c in re.split(r'[\.-]([0-9]*)', key)] + for misra_id in sorted(rules_violated.keys(), key=misra_sort): + res = re.match(r'misra-c2012-([0-9]+)\\.([0-9]+)', misra_id) + if res is None: + num = 0 + else: + num = int(res.group(1)) * 100 + int(res.group(2)) + severity = '-' + if num in checker.ruleTexts: + severity = checker.ruleTexts[num].cppcheck_severity + print("\t%15s (%s): %d" % (misra_id, severity, rules_violated[misra_id])) + + if args.show_suppressed_rules: + checker.showSuppressedRules() + + +if __name__ == '__main__': + main() + sys.exit(cppcheckdata.EXIT_CODE) diff --git a/addons/misra_9.py b/addons/misra_9.py new file mode 100644 index 00000000000..1ca1b7ce3e0 --- /dev/null +++ b/addons/misra_9.py @@ -0,0 +1,559 @@ +# Holds information about an array, struct or union's element definition. +class ElementDef: + def __init__(self, elementType, name, valueType, dimensions = None): + self.elementType = elementType # 'array', 'record' or 'value' + self.name = str(name) + self.valueType = valueType + self.children = [] + self.dimensions = dimensions + self.parent = None + + self.isDesignated = False + self.isPositional = False + self.numInits = 0 + self.childIndex = -1 + + self.flexibleToken = None + self.isFlexible = False + self.structureViolationToken = None + + def __repr__(self): + inits = "" + if self.isPositional: + inits += 'P' + if self.isDesignated: + inits += 'D' + if not (self.isPositional or self.isDesignated) and self.numInits == 0: + inits += '_' + if self.numInits > 1: + inits += str(self.numInits) + + attrs = ["childIndex", "elementType", "valueType"] + return "{}({}, {}, {})".format( + "ElementDef", + self.getLongName(), + inits, + ", ".join(("{}={}".format(a, repr(getattr(self, a))) for a in attrs)) + ) + + @property + def isArray(self): + return self.elementType == 'array' + + @property + def isRecord(self): + return self.elementType == 'record' + + @property + def isValue(self): + return self.elementType == 'value' + + + def getLongName(self): + return self.parent.getLongName() + "." + self.name if self.parent else self.name + + def getInitDump(self): + t = [] + if self.isPositional: + t.append('P') + if self.isDesignated: + t.append('D') + if self.numInits == 0: + t.append('_') + if self.numInits > 1: + t.append(str(self.numInits)) + + myDump = "".join(t) + + if len(self.children): + childDumps = [] + for c in self.children: + childDumps.append(c.getInitDump()) + if self.structureViolationToken is not None: + myDump += "!" + myDump += "{ " + ", ".join(childDumps) + " }" + + return myDump + + def addChild(self, child): + self.children.append(child) + child.parent = self + + def getNextChild(self): + self.childIndex += 1 + return self.getChildByIndex(self.childIndex) + + def getChildByIndex(self, index): + if self.isFlexible: + while len(self.children) <= index: + createChild(self, self.flexibleToken, len(self.children), None) + return self.children[index] if 0 <= index < len(self.children) else None + + def getChildByName(self, name): + for c in self.children: + if c.name == name: + return c + return None + + def getNextValueElement(self, root): + current = self + while current != root: + if not current.parent: + return None + # Get next index of parent + i = current.parent.children.index(current) + 1 + # Next index of parent exists + if i < len(current.parent.children): + current = current.parent.children[i] + return current.getFirstValueElement() + + # Next index of parent doesn't exist. Move up + current = current.parent + return None + + def getFirstValueElement(self): + current = self + + # Move to first child as long as children exists + next_child = current.getChildByIndex(0) + while next_child: + current = next_child + next_child = current.getChildByIndex(0) + return current + + def getLastValueElement(self): + current = self + # Move to last child as long as children exists + while len(current.children) > 0: + current = current.children[-1] + return current + + def getChildByValueElement(self, ed): + potentialChild = ed + while potentialChild and potentialChild not in self.children: + potentialChild = potentialChild.parent + + return self.children[self.children.index(potentialChild)] if potentialChild else None + + def getEffectiveLevel(self): + if self.parent and self.parent.elementType == "array": + return self.parent.getEffectiveLevel() + 1 + return 0 + + def setInitialized(self, designated=False, positional=False): + if designated: + self.isDesignated = True + if positional or not designated: + self.isPositional = True + self.numInits += 1 + + def initializeChildren(self): + for child in self.children: + child.setInitialized(positional=True) + child.initializeChildren() + + def unset(self): + self.isDesignated = False + self.isPositional = False + + # Unset is always recursive + for child in self.children: + child.unset() + + def markStuctureViolation(self, token): + if self.name == '->': + self.children[0].markStuctureViolation(token) + elif not self.structureViolationToken: + self.structureViolationToken = token + + def markAsFlexibleArray(self, token): + self.flexibleToken = token + self.isFlexible = True + + def markAsCurrent(self): + if self.parent: + if self.name == '<-': + self.parent.childIndex = self.parent.children.index(self.children[0]) + else: + self.parent.childIndex = self.parent.children.index(self) + + self.parent.markAsCurrent() + + def isAllChildrenSet(self): + myself = len(self.children) == 0 and (self.isDesignated or self.isPositional) + mychildren = len(self.children) > 0 and all([child.isAllChildrenSet() for child in self.children]) + return myself or mychildren + + def isAllSet(self): + return all([child.isPositional or child.isDesignated for child in self.children]) + + def isOnlyDesignated(self): + return all([not child.isPositional for child in self.children]) + + def isMisra92Compliant(self): + return self.structureViolationToken is None and all([child.isMisra92Compliant() for child in self.children]) + + def isMisra93Compliant(self): + if self.elementType == 'array': + result = self.isAllChildrenSet() or \ + ((self.isAllSet() or + self.isOnlyDesignated()) and + all([not (child.isDesignated or child.isPositional) or child.isMisra93Compliant() for child in self.children])) + return result + if self.elementType == 'record': + result = all([child.isMisra93Compliant() for child in self.children]) + return result + return True + + def isMisra94Compliant(self): + return self.numInits <= 1 and all([child.isMisra94Compliant() for child in self.children]) + + def isMisra95Compliant(self): + return not self.isFlexible or all([not child.isDesignated for child in self.children]) + +# Parses the initializers and update the ElementDefs status accordingly +class InitializerParser: + def __init__(self): + self.token = None + self.root = None + self.ed = None + self.rootStack = [] + + def parseInitializer(self, root, token): + self.root = root + self.token = token + dummyRoot = ElementDef('array', '->', self.root.valueType) + dummyRoot.children = [self.root] + + self.rootStack = [] + self.root = dummyRoot + self.ed = self.root.getFirstValueElement() + isFirstElement = False + isDesignated = False + + while self.token: + if self.token.str == ',': + self.token = self.token.astOperand1 + isFirstElement = False + + # Designated initializer ( [2]=... or .name=... ) + elif self.token.isAssignmentOp and not self.token.valueType: + self.popFromStackIfExitElement() + + self.ed = getElementByDesignator(self.root, self.token.astOperand1) + if self.ed: + # Update root + self.pushToRootStackAndMarkAsDesignated() + # Make sure ed points to valueElement + self.ed = self.ed.getFirstValueElement() + + self.token = self.token.astOperand2 + isFirstElement = False + isDesignated = True + + elif self.token.isString and self.ed and self.ed.isArray: + self.ed.setInitialized(isDesignated) + if self.token == self.token.astParent.astOperand1 and self.token.astParent.astOperand2: + self.token = self.token.astParent.astOperand2 + self.ed.markAsCurrent() + self.ed = self.root.getNextChild() + else: + self.unwindAndContinue() + continue + + elif self.token.str == '{': + nextChild = self.root.getNextChild() if self.root is not None else None + + if nextChild: + if nextChild.isArray or nextChild.isRecord: + nextChild.unset() + nextChild.setInitialized(isDesignated) + self.ed = nextChild.getFirstValueElement() + isDesignated = False + elif nextChild.valueType is None: + # No type information available - unable to check structure - assume correct initialization + nextChild.setInitialized(isDesignated) + self.unwindAndContinue() + continue + + elif self.token.astOperand1: + # Create dummy nextChild to represent excess levels in initializer + dummyRoot = ElementDef('array', '<-', self.root.valueType) + dummyRoot.parent = self.root + dummyRoot.childIndex = 0 + dummyRoot.children = [nextChild] + nextChild.parent = dummyRoot + + self.root.markStuctureViolation(self.token) + + # Fake dummy as nextChild (of current root) + nextChild = dummyRoot + + if nextChild and self.token.astOperand1: + self.root = nextChild + self.token = self.token.astOperand1 + isFirstElement = True + else: + if self.root: + # {} + if self.root.name == '<-': + self.root.parent.markStuctureViolation(self.token) + else: + self.root.markStuctureViolation(self.token) + self.ed = None + self.unwindAndContinue() + + else: + if self.ed and self.ed.isValue: + if not isDesignated and len(self.rootStack) > 0 and self.rootStack[-1][1] == self.root: + self.rootStack[-1][0].markStuctureViolation(self.token) + if isFirstElement and self.token.str == '0' and self.token.next.str == '}': + # Zero initializer causes recursive initialization + self.root.initializeChildren() + elif self.token.isString and self.ed.valueType and self.ed.valueType.pointer > 0: + if self.ed.valueType.pointer - self.ed.getEffectiveLevel() == 1: + if self.ed.parent != self.root: + self.root.markStuctureViolation(self.token) + self.ed.setInitialized(isDesignated) + elif self.ed.valueType.pointer == self.ed.getEffectiveLevel(): + if(self.root.name != '->' and self.ed.parent.parent != self.root) or (self.root.name == '->' and self.root.children[0] != self.ed.parent): + self.root.markStuctureViolation(self.token) + else: + self.ed.parent.setInitialized(isDesignated) + self.ed.parent.initializeChildren() + + else: + if self.root is not None and self.ed.parent != self.root: + # Check if token is correct value type for self.root.children[?] + child = self.root.getChildByValueElement(self.ed) + if self.token.valueType: + if child.elementType != 'record' or self.token.valueType.type != 'record' or child.valueType.typeScope != self.token.valueType.typeScope: + self.root.markStuctureViolation(self.token) + + self.ed.setInitialized(isDesignated) + + # Mark all elements up to root with positional or designated + # (for complex designators, or missing structure) + parent = self.ed.parent + while parent and parent != self.root: + parent.isDesignated = isDesignated if isDesignated and not parent.isPositional else parent.isDesignated + parent.isPositional = not isDesignated if not isDesignated and not parent.isDesignated else parent.isPositional + parent = parent.parent + isDesignated = False + + if self.token.isString and self.ed.parent.isArray: + self.ed = self.ed.parent + self.unwindAndContinue() + + def pushToRootStackAndMarkAsDesignated(self): + new = self.ed.parent + if new != self.root: + # Mark all elements up to self.root root as designated + parent = new + while parent and parent != self.root: + parent.isDesignated = True + parent = parent.parent + self.rootStack.append((self.root, new)) + new.markAsCurrent() + new.childIndex = new.children.index(self.ed) - 1 + self.root = new + + def popFromStackIfExitElement(self): + if len(self.rootStack) > 0 and self.rootStack[-1][1] == self.root: + old = self.rootStack.pop()[0] + old.markAsCurrent() + self.root = old + + def unwindAndContinue(self): + while self.token: + if self.token.astParent.astOperand1 == self.token and self.token.astParent.astOperand2: + if self.ed: + if self.token.astParent.astOperand2.str == "{" and self.ed.isDesignated: + self.popFromStackIfExitElement() + else: + self.ed.markAsCurrent() + self.ed = self.ed.getNextValueElement(self.root) + + self.token = self.token.astParent.astOperand2 + break + + self.token = self.token.astParent + if self.token.str == '{': + if self.root: + self.ed = self.root.getLastValueElement() + self.ed.markAsCurrent() + + # Cleanup if root is dummy node representing excess levels in initializer + if self.root.name == '<-': + self.root.children[0].parent = self.root.parent + + self.root = self.root.parent + + if self.token.astParent is None: + self.token = None + break + +def misra_9_x(self, data, rule, rawTokens = None): + + parser = InitializerParser() + + for variable in data.variables: + if variable.nameToken is None: + continue + + nameToken = variable.nameToken + + # Check if declaration and initialization is + # split into two separate statements in ast. + if nameToken.next and nameToken.next.isSplittedVarDeclEq: + nameToken = nameToken.next.next + + # Find declarations with initializer assignment + eq = nameToken + while not eq.isAssignmentOp and eq.astParent: + eq = eq.astParent + + # We are only looking for initializers + if not eq.isAssignmentOp or eq.astOperand2.isName: + continue + + if variable.isArray or variable.isClass: + ed = getElementDef(nameToken, rawTokens) + # No need to check non-arrays if valueType is missing, + # since we can't say anything useful about the structure + # without it. + if ed.valueType is None and not variable.isArray: + continue + parser.parseInitializer(ed, eq.astOperand2) + # print(rule, nameToken.str + '=', ed.getInitDump()) + if rule == 902 and not ed.isMisra92Compliant(): + self.reportError(nameToken, 9, 2) + if rule == 903 and not ed.isMisra93Compliant(): + # Do not check when variable is pointer type + type_token = variable.nameToken + while type_token and type_token.isName: + type_token = type_token.previous + if type_token and type_token.str == '*': + continue + + self.reportError(nameToken, 9, 3) + if rule == 904 and not ed.isMisra94Compliant(): + self.reportError(nameToken, 9, 4) + if rule == 905 and not ed.isMisra95Compliant(): + self.reportError(nameToken, 9, 5) + +def getElementDef(nameToken, rawTokens = None): + if nameToken.variable.isArray: + ed = ElementDef("array", nameToken.str, nameToken.valueType) + createArrayChildrenDefs(ed, nameToken.astParent, nameToken.variable, rawTokens) + elif nameToken.variable.isClass: + ed = ElementDef("record", nameToken.str, nameToken.valueType) + createRecordChildrenDefs(ed, nameToken.variable) + else: + ed = ElementDef("value", nameToken.str, nameToken.valueType) + return ed + +def createArrayChildrenDefs(ed, token, var, rawTokens = None): + if token and token.str == '[': + if rawTokens is not None: + foundToken = next((rawToken for rawToken in rawTokens + if rawToken.file == token.file + and rawToken.linenr == token.linenr + and rawToken.column == token.column + ), None) + + if foundToken and foundToken.next and foundToken.next.str == ']': + ed.markAsFlexibleArray(token) + + if (token.astOperand2 is not None) and (token.astOperand2.getKnownIntValue() is not None): + for i in range(token.astOperand2.getKnownIntValue()): + createChild(ed, token, i, var) + else: + ed.markAsFlexibleArray(token) + + +def createChild(ed, token, name, var): + if token.astParent and token.astParent.str == '[': + child = ElementDef("array", name, ed.valueType) + createArrayChildrenDefs(child, token.astParent, var) + else: + if ed.valueType and ed.valueType.type == "record": + child = ElementDef("record", name, ed.valueType) + createRecordChildrenDefs(child, var) + else: + child = ElementDef("value", name, ed.valueType) + + ed.addChild(child) + +def createRecordChildrenDefs(ed, var): + valueType = ed.valueType + if not valueType or not valueType.typeScope: + return + if var is None: + return + typeToken = var.typeEndToken + while typeToken and typeToken.isName: + typeToken = typeToken.previous + if typeToken and typeToken.str == '*': + child = ElementDef("pointer", var.nameToken, var.nameToken.valueType) + ed.addChild(child) + return + child_dict = {} + for variable in valueType.typeScope.varlist: + if variable is var: + continue + child = getElementDef(variable.nameToken) + child_dict[variable.nameToken] = child + for scopes in valueType.typeScope.nestedList: + varscope = False + if scopes.nestedIn == valueType.typeScope: + for variable in valueType.typeScope.varlist: + if variable.nameToken and variable.nameToken.valueType and variable.nameToken.valueType.typeScope == scopes: + varscope = True + break + if not varscope: + ed1 = ElementDef("record", scopes.Id, valueType) + for variable in scopes.varlist: + child = getElementDef(variable.nameToken) + ed1.addChild(child) + child_dict[scopes.bodyStart] = ed1 + sorted_keys = sorted(list(child_dict.keys()), key=lambda k: (k.file, k.linenr, k.column)) + for _key in sorted_keys: + ed.addChild(child_dict[_key]) + + +def getElementByDesignator(ed, token): + if not token.str in [ '.', '[' ]: + return None + + while token.str in [ '.', '[' ]: + token = token.astOperand1 + + while ed and not token.isAssignmentOp: + token = token.astParent + + if token.str == '[': + if not ed.isArray: + ed.markStuctureViolation(token) + + chIndex = -1 + if token.astOperand2 is not None: + chIndex = token.astOperand2.getKnownIntValue() + elif token.astOperand1 is not None: + chIndex = token.astOperand1.getKnownIntValue() + + ed = ed.getChildByIndex(chIndex) if chIndex is not None else None + + elif token.str == '.': + if not ed.isRecord: + ed.markStuctureViolation(token) + + name = "" + if token.astOperand2 is not None: + name = token.astOperand2.str + elif token.astOperand1 is not None: + name = token.astOperand1.str + + ed = ed.getChildByName(name) + + return ed diff --git a/addons/naming.py b/addons/naming.py new file mode 100755 index 00000000000..2893779f2e0 --- /dev/null +++ b/addons/naming.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python3 +# +# cppcheck addon for naming conventions +# +# Example usage (variable name must start with lowercase, function name must start with uppercase): +# $ cppcheck --dump path-to-src/ +# $ python addons/naming.py --var='[a-z].*' --function='[A-Z].*' path-to-src/*.dump +# + +import cppcheckdata +import sys +import re + + +def validate_regex(expr): + try: + re.compile(expr) + except re.error: + print('Error: "{}" is not a valid regular expression.'.format(expr)) + sys.exit(1) + + +RE_VARNAME = None +RE_CONSTNAME = None +RE_PRIVATE_MEMBER_VARIABLE = None +RE_FUNCTIONNAME = None +for arg in sys.argv[1:]: + if arg[:6] == '--var=': + RE_VARNAME = arg[6:] + validate_regex(RE_VARNAME) + elif arg.startswith('--const='): + RE_CONSTNAME = arg[arg.find('=')+1:] + validate_regex(RE_CONSTNAME) + elif arg.startswith('--private-member-variable='): + RE_PRIVATE_MEMBER_VARIABLE = arg[arg.find('=')+1:] + validate_regex(RE_PRIVATE_MEMBER_VARIABLE) + elif arg[:11] == '--function=': + RE_FUNCTIONNAME = arg[11:] + validate_regex(RE_FUNCTIONNAME) + # TODO: bail out on unknown parameter + + +def reportError(token, severity, msg, errorId): + cppcheckdata.reportError(token, severity, msg, 'naming', errorId) + + +for arg in sys.argv[1:]: + if not arg.endswith('.dump'): + continue + print('Checking ' + arg + '...') + data = cppcheckdata.CppcheckData(arg) + + for cfg in data.iterconfigurations(): + print('Checking %s, config %s...' % (arg, cfg.name)) + if RE_VARNAME: + for var in cfg.variables: + if var.access == 'Private': + continue + if var.nameToken and not var.isConst: + res = re.match(RE_VARNAME, var.nameToken.str) + if not res: + reportError(var.typeStartToken, 'style', 'Variable ' + + var.nameToken.str + ' violates naming convention', 'varname') + if RE_CONSTNAME: + for var in cfg.variables: + if var.access == 'Private': + continue + if var.nameToken and var.isConst: + res = re.match(RE_CONSTNAME, var.nameToken.str) + if not res: + reportError(var.typeStartToken, 'style', 'Constant ' + + var.nameToken.str + ' violates naming convention', 'constname') + if RE_PRIVATE_MEMBER_VARIABLE: + for var in cfg.variables: + if (var.access is None) or var.access != 'Private': + continue + res = re.match(RE_PRIVATE_MEMBER_VARIABLE, var.nameToken.str) + if not res: + reportError(var.typeStartToken, 'style', 'Private member variable ' + + var.nameToken.str + ' violates naming convention', 'privateMemberVariable') + if RE_FUNCTIONNAME: + for scope in cfg.scopes: + if scope.type == 'Function': + function = scope.function + if function is not None and function.type in ('Constructor', 'Destructor', 'CopyConstructor', 'MoveConstructor'): + continue + res = re.match(RE_FUNCTIONNAME, scope.className) + if not res: + reportError( + scope.bodyStart, 'style', 'Function ' + scope.className + ' violates naming convention', 'functionName') + +sys.exit(cppcheckdata.EXIT_CODE) diff --git a/addons/namingng.config.json b/addons/namingng.config.json new file mode 100644 index 00000000000..0abba4f15ac --- /dev/null +++ b/addons/namingng.config.json @@ -0,0 +1,19 @@ +{ + "RE_VARNAME": ["[a-z]*[a-zA-Z0-9_]*\\Z"], + "RE_PRIVATE_MEMBER_VARIABLE": null, + "RE_FUNCTIONNAME": ["[a-z0-9A-Z]*\\Z"], + "include_guard": { + "input": "path", + "prefix": "", + "suffix": "", + "case": "upper", + "max_linenr": 5, + "RE_HEADERFILE": "[^/].*\\.h\\Z", + "required": true + }, + "var_prefixes": {"uint32_t": "ui32", + "int*": "intp"}, + "function_prefixes": {"uint16_t": "ui16", + "uint32_t": "ui32"}, + "skip_one_char_variables": false +} diff --git a/addons/namingng.json b/addons/namingng.json new file mode 100644 index 00000000000..83f9a5a55d8 --- /dev/null +++ b/addons/namingng.json @@ -0,0 +1,6 @@ +{ + "script":"namingng.py", + "args":[ + "--configfile=namingng.config.json" + ] +} diff --git a/addons/namingng.py b/addons/namingng.py new file mode 100755 index 00000000000..9da177321ef --- /dev/null +++ b/addons/namingng.py @@ -0,0 +1,420 @@ +#!/usr/bin/env python3 +# +# cppcheck addon for naming conventions +# An enhanced version. Configuration is taken from a json file +# It supports to check for type-based prefixes in function or variable names. +# Aside from include guard naming, include guard presence can also be tested. +# +# Example usage (variable name must start with lowercase, function name must start with uppercase): +# $ cppcheck --dump path-to-src/ +# $ python namingng.py test.c.dump +# +# JSON format: +# +# { +# "RE_VARNAME": ["[a-z]*[a-zA-Z0-9_]*\\Z"], +# "RE_PRIVATE_MEMBER_VARIABLE": null, +# "RE_FUNCTIONNAME": ["[a-z0-9A-Z]*\\Z"], +# "_comment": "comments can be added to the config with underscore-prefixed keys", +# "include_guard": { +# "input": "path", +# "prefix": "GUARD_", +# "case": "upper", +# "max_linenr": 5, +# "RE_HEADERFILE": "[^/].*\\.h\\Z", +# "required": true +# }, +# "var_prefixes": {"uint32_t": "ui32"}, +# "function_prefixes": {"uint16_t": "ui16", +# "uint32_t": "ui32"} +# } +# +# RE_VARNAME, RE_PRIVATE_MEMBER_VARIABLE and RE_FUNCTIONNAME are regular expressions to cover the basic names +# In var_prefixes and function_prefixes there are the variable-type/prefix pairs + +import cppcheckdata +import sys +import os +import re +import json + +# Auxiliary class +class DataStruct: + def __init__(self, file, linenr, string, column=0): + self.file = file + self.linenr = linenr + self.str = string + self.column = column + +def reportNamingError(location,message,errorId='namingConvention',severity='style',extra='',column=None): + cppcheckdata.reportError(location,severity,message,'namingng',errorId,extra,columnOverride=column) + +def configError(error,fatal=True): + print('config error: %s'%error) + if fatal: + sys.exit(1) + +def validateConfigREs(list_or_dict,json_key): + have_error = False + for item in list_or_dict: + try: + re.compile(item) + except re.error as err: + configError("item '%s' of '%s' is not a valid regular expression: %s"%(item,json_key,err),fatal=False) + have_error = True + continue + if not isinstance(list_or_dict,dict): + continue + # item is actually a dict key; check value + value = list_or_dict[item] + if (not isinstance(value,list) or len(value) != 2 + or not isinstance(value[0],bool) or not isinstance(value[1],str)): + configError("item '%s' of '%s' must be an array [bool,string]"%(item,json_key),fatal=False) + have_error = True + + return have_error + +def loadConfig(configfile): + if not os.path.exists(configfile): + configError("cannot find config file '%s'"%configfile) + + try: + with open(configfile) as fh: + data = json.load(fh) + except json.JSONDecodeError as e: + configError("error parsing config file as JSON at line %d: %s"%(e.lineno,e.msg)) + except Exception as e: + configError("error opening config file '%s': %s"%(configfile,e)) + + if not isinstance(data, dict): + configError('config file must contain a JSON object at the top level') + + # All errors are emitted before bailing out, to make the unit test more + # effective. + have_error = False + + # Put config items in a class, so that settings can be accessed using + # config.feature + class Config: + pass + config = Config() + + mapping = { + 'file': ('RE_FILE', (list,)), + 'namespace': ('RE_NAMESPACE', (list,dict)), + 'include_guard': ('include_guard', (dict,)), + 'variable': ('RE_VARNAME', (list,dict)), + 'variable_prefixes': ('var_prefixes', (dict,), {}), + 'private_member': ('RE_PRIVATE_MEMBER_VARIABLE', (list,dict)), + 'public_member': ('RE_PUBLIC_MEMBER_VARIABLE', (list,dict)), + 'global_variable': ('RE_GLOBAL_VARNAME', (list,dict)), + 'function_name': ('RE_FUNCTIONNAME', (list,dict)), + 'function_prefixes': ('function_prefixes', (dict,), {}), + 'class_name': ('RE_CLASS_NAME', (list,dict)), + 'skip_one_char_variables': ('skip_one_char_variables', (bool,)), + } + + # parse defined keys and store as members of config object + for key,opts in mapping.items(): + json_key = opts[0] + req_type = opts[1] + default = None if len(opts)<3 else opts[2] + + value = data.pop(json_key,default) + if value is not None and type(value) not in req_type: + req_typename = ' or '.join([tp.__name__ for tp in req_type]) + got_typename = type(value).__name__ + configError('%s must be %s (not %s), or not set'%(json_key,req_typename,got_typename),fatal=False) + have_error = True + continue + + # type list implies that this is either a list of REs or a dict with RE keys + if list in req_type and value is not None: + re_error = validateConfigREs(value,json_key) + if re_error: + have_error = True + + setattr(config,key,value) + + # check remaining keys, only accept underscore-prefixed comments + for key,value in data.items(): + if key == '' or key[0] != '_': + configError("unknown config key '%s'"%key,fatal=False) + have_error = True + + if have_error: + sys.exit(1) + + # pylint: disable-next=no-member - TODO: fix this + if config.include_guard: + # pylint: disable-next=no-member - TODO: fix this + config.include_guard_header_re = config.include_guard.get('RE_HEADERFILE',"[^/].*\\.h\\Z") + + return config + + +def evalExpr(conf, exp, mockToken, msgType): + report_as_error = False + msg = msgType + ' ' + mockToken.str + ' violates naming convention' + + if isinstance(conf, dict): + report_as_error = conf[exp][0] + msg += ': ' + conf[exp][1] + + res = re.match(exp,mockToken.str) + if bool(res) == report_as_error: + reportNamingError(mockToken,msg) + +def check_include_guard_name(conf,directive): + parts = directive.str.split() + if len(parts) != 2: + msg = 'syntax error' + reportNamingError(directive,msg,'syntax') + return None,None + guard_name = parts[1] + guard_column = 1+directive.str.find(guard_name) + + filename = directive.file + if conf.include_guard.get('input','path') == 'basename': + filename = os.path.basename(filename) + use_case = conf.include_guard.get('case','upper') + if use_case == 'upper': + filename = filename.upper() + elif use_case == 'lower': + filename = filename.lower() + elif use_case == 'keep': + pass # keep filename case as-is + else: + print("invalid config value for 'case': '%s'"%use_case,file=sys.stderr) + sys.exit(1) + + barename = re.sub('[^A-Za-z0-9]','_',filename).strip('_') + expect_guard_name = conf.include_guard.get('prefix','') + barename + conf.include_guard.get('suffix','') + if expect_guard_name != guard_name: + msg = 'include guard naming violation; %s != %s'%(guard_name,expect_guard_name) + reportNamingError(directive,msg,'includeGuardName',column=guard_column) + + return guard_name,guard_column + +def check_include_guards(conf,cfg,unguarded_include_files): + # Scan for '#ifndef FILE_H' as the first directive, in the first N lines. + # Then test whether the next directive #defines the found name. + # Various tests are done: + # - check include guards for their naming and consistency + # - test whether include guards are in place + max_linenr = conf.include_guard.get('max_linenr', 5) + + def report(directive,msg,errorId,severity='style',column=0): + reportNamingError(directive,msg,errorId,severity=severity,column=column) + + def report_pending_ifndef(directive,column): + report(directive,'include guard #ifndef is not followed by #define','includeGuardIncomplete',column=column) + + last_fn = None + pending_ifndef = None + guard_column = None + phase = 0 + for directive in cfg.directives: + if last_fn != directive.file: + if pending_ifndef: + report_pending_ifndef(pending_ifndef,guard_column) + pending_ifndef = None + last_fn = directive.file + phase = 0 + if phase == -1: + # ignore (the remainder of) this file + continue + if not re.match(conf.include_guard_header_re,directive.file): + phase = -1 + continue + + if directive.linenr > max_linenr: + if phase == 0 and conf.include_guard.get('required',1): + report(directive,'include guard not found before line %d'%max_linenr,'includeGuardMissing') + phase = -1 + continue + + if phase == 0: + # looking for '#ifndef FILE_H' + if not directive.str.startswith('#ifndef'): + if conf.include_guard.get('required',1): + report(directive,'first preprocessor directive should be include guard #ifndef','includeGuardMissing') + phase = -1 + continue + guard_name,guard_column = check_include_guard_name(conf,directive) + if guard_name is None: + phase = -1 + continue + pending_ifndef = directive + phase = 1 + elif phase == 1: + pending_ifndef = None + # looking for '#define FILE_H' + if not directive.str.startswith('#define'): + report(directive,'second preprocessor directive should be include guard #define','includeGuardIncomplete') + phase = -1 + continue + parts = directive.str.split() + if len(parts) == 1: + report(directive,'syntax error','syntax') + phase = -1 + continue + if guard_name != parts[1]: + report(directive,'include guard does not guard; %s != %s'%(guard_name,parts[1]),'includeGuardAwayFromDuty',severity='warning',column=guard_column) + + unguarded_include_files.remove(directive.file) + + phase = -1 + if pending_ifndef: + report_pending_ifndef(pending_ifndef,guard_column) + +def process(dumpfiles, configfile, cli, debugprint): + conf = loadConfig(configfile) + + for afile in dumpfiles: + if not afile[-5:] == '.dump': + continue + if not cli: + print('Checking ' + afile + '...') + data = cppcheckdata.CppcheckData(afile) + process_data(conf,data,cli,debugprint) + +def check_file_naming(conf,data): + for source_file in data.files: + basename = os.path.basename(source_file) + good = False + for exp in conf.file: + good |= bool(re.match(exp, source_file)) + good |= bool(re.match(exp, basename)) + if not good: + mockToken = DataStruct(source_file, 0, basename) + reportNamingError(mockToken, 'File name ' + basename + ' violates naming convention') + +def check_namespace_naming(conf,data): + for tk in data.rawTokens: + if tk.str != 'namespace': + continue + mockToken = DataStruct(tk.next.file, tk.next.linenr, tk.next.str, tk.next.column) + for exp in conf.namespace: + evalExpr(conf.namespace, exp, mockToken, 'Namespace') + +def check_variable_naming(conf,cfg,debugprint): + for var in cfg.variables: + if not var.nameToken: + continue + if var.access in ('Global','Public','Private'): + continue + prev = var.nameToken.previous + varType = prev.str + while "*" in varType and len(varType.replace("*", "")) == 0: + prev = prev.previous + varType = prev.str + varType + + if debugprint: + print("Variable Name: " + str(var.nameToken.str)) + print("original Type Name: " + str(var.nameToken.valueType.originalTypeName)) + print("Type Name: " + var.nameToken.valueType.type) + print("Sign: " + str(var.nameToken.valueType.sign)) + print("variable type: " + varType) + print("\n") + print("\t-- {} {}".format(varType, str(var.nameToken.str))) + + if conf.skip_one_char_variables and len(var.nameToken.str) == 1: + continue + if varType in conf.variable_prefixes: + prefix = conf.variable_prefixes[varType] + if not var.nameToken.str.startswith(prefix): + reportNamingError(var.typeStartToken, + 'Variable ' + + var.nameToken.str + + ' violates naming convention', + column=var.nameToken.column) + + mockToken = DataStruct(var.typeStartToken.file, var.typeStartToken.linenr, var.nameToken.str, var.nameToken.column) + for exp in conf.variable: + evalExpr(conf.variable, exp, mockToken, 'Variable') + +# Naming check for Global, Private and Public member variables +def check_gpp_naming(conf_list,cfg,access,message): + for var in cfg.variables: + if var.access != access: + continue + mockToken = DataStruct(var.typeStartToken.file, var.typeStartToken.linenr, var.nameToken.str, var.nameToken.column) + for exp in conf_list: + evalExpr(conf_list, exp, mockToken, message) + +def check_function_naming(conf,cfg,debugprint): + for token in cfg.tokenlist: + if not token.function: + continue + if token.function.type in ('Constructor', 'Destructor', 'CopyConstructor', 'MoveConstructor'): + continue + retval = token.previous.str + prev = token.previous + while "*" in retval and len(retval.replace("*", "")) == 0: + prev = prev.previous + retval = prev.str + retval + if debugprint: + print("\t:: {} {}".format(retval, token.function.name)) + + if retval and retval in conf.function_prefixes: + if not token.function.name.startswith(conf.function_prefixes[retval]): + reportNamingError(token, 'Function ' + token.function.name + ' violates naming convention', column=token.column) + mockToken = DataStruct(token.file, token.linenr, token.function.name, token.column) + msgType = 'Function' + for exp in conf.function_name: + evalExpr(conf.function_name, exp, mockToken, msgType) + +def check_class_naming(conf,cfg): + for fnc in cfg.functions: + if fnc.type not in ('Constructor','Destructor'): + continue + mockToken = DataStruct(fnc.tokenDef.file, fnc.tokenDef.linenr, fnc.name, fnc.tokenDef.column) + msgType = 'Class ' + fnc.type + for exp in conf.class_name: + evalExpr(conf.class_name, exp, mockToken, msgType) + +def process_data(conf,data,cli,debugprint): + if conf.file: + check_file_naming(conf,data) + + if conf.namespace: + check_namespace_naming(conf,data) + + unguarded_include_files = [] + if conf.include_guard and conf.include_guard.get('required',1): + unguarded_include_files = [fn for fn in data.files if re.match(conf.include_guard_header_re,fn)] + + for cfg in data.configurations: + if not cli: + print('Checking config %s...' % cfg.name) + if conf.variable: + check_variable_naming(conf,cfg,debugprint) + if conf.private_member: + check_gpp_naming(conf.private_member,cfg,'Private','Private member variable') + if conf.public_member: + check_gpp_naming(conf.public_member,cfg,'Public','Public member variable') + if conf.global_variable: + check_gpp_naming(conf.global_variable,cfg,'Global','Global variable') + if conf.function_name: + check_function_naming(conf,cfg,debugprint) + if conf.class_name: + check_class_naming(conf,cfg) + if conf.include_guard: + check_include_guards(conf,cfg,unguarded_include_files) + + for fn in unguarded_include_files: + mockToken = DataStruct(fn,0,os.path.basename(fn)) + reportNamingError(mockToken,'Missing include guard','includeGuardMissing') + +if __name__ == "__main__": + parser = cppcheckdata.ArgumentParser() + parser.add_argument("--debugprint", action="store_true", default=False, + help="Add debug prints") + parser.add_argument("--configfile", type=str, default="namingng.config.json", + help="Naming check config file") + + args = parser.parse_args() + process(args.dumpfile, args.configfile, args.cli, args.debugprint) + + sys.exit(0) diff --git a/addons/runaddon.py b/addons/runaddon.py new file mode 100644 index 00000000000..26ad7e9fa73 --- /dev/null +++ b/addons/runaddon.py @@ -0,0 +1,16 @@ +import cppcheckdata +import cppcheck +import runpy +import sys +import os + +if __name__ == '__main__': + addon = sys.argv[1] + __addon_name__ = os.path.splitext(os.path.basename(addon))[0] + sys.argv.pop(0) + + runpy.run_path(addon, run_name='__main__') + + # Run registered checkers + cppcheck.runcheckers() + sys.exit(cppcheckdata.EXIT_CODE) \ No newline at end of file diff --git a/addons/test/__init__.py b/addons/test/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/addons/test/misc-test.cpp b/addons/test/misc-test.cpp new file mode 100644 index 00000000000..df1f8352cde --- /dev/null +++ b/addons/test/misc-test.cpp @@ -0,0 +1,30 @@ +// To test: +// ~/cppcheck/cppcheck --dump misc-test.cpp && python ../misc.py -verify misc-test.cpp.dump + +#include +#include + +// Warn about string concatenation in array initializers.. +const char *a[] = {"a" "b"}; // stringConcatInArrayInit +const char *b[] = {"a","b" "c"}; // stringConcatInArrayInit +#define MACRO "MACRO" +const char *c[] = { MACRO "text" }; // stringConcatInArrayInit + + +// Function is implicitly virtual +class base { + virtual void dostuff(int); +}; + +class derived : base { + void dostuff(int); // implicitlyVirtual +}; + + +// Pass struct to ellipsis function +struct {int x;int y;} s; +void ellipsis(int x, ...); +void foo(std::vector v) { + ellipsis(321, s); // ellipsisStructArg + ellipsis(321, v[0]); // ellipsisStructArg +} diff --git a/addons/test/misra/config1.c b/addons/test/misra/config1.c new file mode 100644 index 00000000000..31aa2a4d6b5 --- /dev/null +++ b/addons/test/misra/config1.c @@ -0,0 +1,10 @@ + +struct S { + uint32_t some[100]; +}; + +void foo( void ) +{ + if (((S *)0x8000)->some[0] != 0U) { } +} + diff --git a/addons/test/misra/crash1.c b/addons/test/misra/crash1.c new file mode 100644 index 00000000000..d00a72c3aaa --- /dev/null +++ b/addons/test/misra/crash1.c @@ -0,0 +1,8 @@ + +struct expression { + int nargs; + struct expression *args[3]; +}; + +struct expression plvar = {0}; + diff --git a/addons/test/misra/crash10.c b/addons/test/misra/crash10.c new file mode 100644 index 00000000000..65e3a14ac96 --- /dev/null +++ b/addons/test/misra/crash10.c @@ -0,0 +1,12 @@ +//#12267 + +extern uint32_t end; + +//#define KEEP // if uncomment this then won't crash + +KEEP static const int32_t ptr_to_end = &end; + +void foo(void) +{ + (void)ptr_to_end; +} diff --git a/addons/test/misra/crash11.c b/addons/test/misra/crash11.c new file mode 100644 index 00000000000..b758e69f31e --- /dev/null +++ b/addons/test/misra/crash11.c @@ -0,0 +1,2 @@ +// #12651 +__arm__ diff --git a/addons/test/misra/crash12.c b/addons/test/misra/crash12.c new file mode 100644 index 00000000000..b16198ea2e7 --- /dev/null +++ b/addons/test/misra/crash12.c @@ -0,0 +1,33 @@ +// 13140 +#line 78 "tmp.h" +typedef struct +{ +int vara [30] ; +int varb [5] ; +} S0 ; + + + +typedef struct +{ +bool var1 ; +S2 var2 ; +S2 var3 ; +S2 var4 ; +short var5 ; +short var6 ; +S1 var7 ; +S1 var8 ; +S1 var9 ; +S1 var10 ; +S1 var11 ; +float var12 ; +short var13 [ 3 ] ; +} S3 ; + +#line 33 "tmp.c" +static const S3 s3 = +{ +0 , +{ 0, 0 } , +} ; \ No newline at end of file diff --git a/addons/test/misra/crash2.c b/addons/test/misra/crash2.c new file mode 100644 index 00000000000..c736a265d15 --- /dev/null +++ b/addons/test/misra/crash2.c @@ -0,0 +1,9 @@ + +// #11793 + +typedef struct pfmlib_pmu { + int flags ; + int (*get_event_encoding[10])(void* this, pfmlib_event_desc_t* e); +} pfmlib_pmu_t ; + +pfmlib_pmu_t sparc_ultra3_support = { .flags = 0 }; diff --git a/addons/test/misra/crash3.c b/addons/test/misra/crash3.c new file mode 100644 index 00000000000..19583f009a5 --- /dev/null +++ b/addons/test/misra/crash3.c @@ -0,0 +1,30 @@ + + + + +/* This is the representation of the expressions to determine the + plural form. */ +struct expression +{ + int nargs; /* Number of arguments. */ + union + { + unsigned long int num; /* Number value for `num'. */ + struct expression *args[3]; /* Up to three arguments. */ + } val; +}; + + +struct expression GERMANIC_PLURAL = +{ + .nargs = 2, + .val = + { + .args = + { + [0] = (struct expression *) &plvar, + [1] = (struct expression *) &plone + } + } +}; + diff --git a/addons/test/misra/crash4.c b/addons/test/misra/crash4.c new file mode 100644 index 00000000000..7862581849f --- /dev/null +++ b/addons/test/misra/crash4.c @@ -0,0 +1,11 @@ + +struct ConDesDesc { + unsigned Order; + unsigned Import; +}; + +// cppcheck-suppress misra-config +static ConDesDesc ConDes[CD_TYPE_COUNT] = { + { 0, 0 }, + { 0, 0 }, +}; diff --git a/addons/test/misra/crash5.c b/addons/test/misra/crash5.c new file mode 100644 index 00000000000..860101539da --- /dev/null +++ b/addons/test/misra/crash5.c @@ -0,0 +1,23 @@ + +struct _boardcnf_ch { + // cppcheck-suppress misra-config + uint8_t ddr_density[CS_CNT]; + uint64_t ca_swap; +}; + +struct _boardcnf { + + uint16_t dqdm_dly_r; + // cppcheck-suppress misra-config + struct _boardcnf_ch ch[DRAM_CH_CNT]; +}; + +static const struct _boardcnf boardcnfs[1] = { + { + 0x0a0, + { + { {0x02, 0x02}, 0x00345201 }, + { {0x02, 0x02}, 0x00302154 } + } + }, +}; diff --git a/addons/test/misra/crash6.c b/addons/test/misra/crash6.c new file mode 100644 index 00000000000..bf77e5f650b --- /dev/null +++ b/addons/test/misra/crash6.c @@ -0,0 +1,17 @@ + + +typedef struct _tGames +{ + char magicdirname[10]; + unsigned int expectedmask; + unsigned char pictureorder[3]; +} tGames; + +static const tGames games[1]={ + {"Pawn", 1, {0,1,2}} +}; + + + + + diff --git a/addons/test/misra/crash7.c b/addons/test/misra/crash7.c new file mode 100644 index 00000000000..210cfeb4df8 --- /dev/null +++ b/addons/test/misra/crash7.c @@ -0,0 +1,8 @@ + + +static const struct id3_frametype wordlist[] = +{ + {0, "Encryption method registration"}, + {1, "Popularimeter"}, +}; + diff --git a/addons/test/misra/crash8.c b/addons/test/misra/crash8.c new file mode 100644 index 00000000000..970d72540f0 --- /dev/null +++ b/addons/test/misra/crash8.c @@ -0,0 +1,10 @@ + +struct three_d_filter_t { + char name[16]; + double elem[2]; +}; + +static three_d_filter_t base_filters[] = { + {"Identity", { 1.0, 0.0 } }, + {"Echo", { 0.4, 0.0 } } +}; diff --git a/addons/test/misra/crash9.c b/addons/test/misra/crash9.c new file mode 100644 index 00000000000..5abf2b8ad02 --- /dev/null +++ b/addons/test/misra/crash9.c @@ -0,0 +1,3 @@ + +#line 3 "" +typedef int8_t flex_int8_t; diff --git a/addons/test/misra/crash_misra9_parseInitializer.c b/addons/test/misra/crash_misra9_parseInitializer.c new file mode 100644 index 00000000000..8e3dcfd5757 --- /dev/null +++ b/addons/test/misra/crash_misra9_parseInitializer.c @@ -0,0 +1,18 @@ +union { + struct { + uint8_t a; + uint8_t b; + } a; +} bar; + +struct foo { + uint8_t a; + union bar w; + uint8_t b; +}; + +struct foo asdf = { + 0, + {{0,0}}, + 1 +}; diff --git a/addons/test/misra/misra-ctu-1-test.c b/addons/test/misra/misra-ctu-1-test.c new file mode 100644 index 00000000000..a003e66ae01 --- /dev/null +++ b/addons/test/misra/misra-ctu-1-test.c @@ -0,0 +1,55 @@ +// Test with command: +// ./cppcheck --enable=information --enable=style --addon=misra --inline-suppr addons/test/misra/misra-ctu-*-test.c + +#include "misra-ctu-test.h" + +extern MISRA_2_3_A misra_2_3_a; + +x = MISRA_2_5_OK_1; + +// cppcheck-suppress misra-c2012-20.5 +#undef MISRA_2_5_OK_3 + +// cppcheck-suppress misra-c2012-2.3 +// cppcheck-suppress misra-c2012-5.6 +typedef int MISRA_5_6_VIOLATION; + +// cppcheck-suppress misra-c2012-5.7 +struct misra_5_7_violation_t { + int x; // cppcheck-suppress unusedStructMember +}; +static misra_5_7_violation_t misra_5_7_use_type_1; + +// #11443 - FP +static struct +{ // no warning + uint16_t x; // cppcheck-suppress unusedStructMember +} misra_5_7_false_positive_1; + +// cppcheck-suppress misra-c2012-8.4 +// cppcheck-suppress misra-c2012-5.8 +int misra_5_8_var1; +// cppcheck-suppress misra-c2012-8.4 +// cppcheck-suppress misra-c2012-5.8 +int misra_5_8_var2; +// cppcheck-suppress misra-c2012-5.8 +static void misra_5_8_f(void) {} + + +// cppcheck-suppress misra-c2012-5.9 +static int misra_5_9_count; +// cppcheck-suppress misra-c2012-5.9 +static void misra_5_8_foo(void) {} + +// cppcheck-suppress misra-c2012-8.5 +extern int misra_8_5; + +// cppcheck-suppress misra-c2012-8.4 +// cppcheck-suppress misra-c2012-8.6 +int32_t misra_8_6 = 1; + +void misra_8_7_external(void) {} + +// #12362 +void misra_8_7_compliant( void ){} +static void misra_8_7_call(void) { misra_8_7_compliant(); } \ No newline at end of file diff --git a/addons/test/misra/misra-ctu-2-test.c b/addons/test/misra/misra-ctu-2-test.c new file mode 100644 index 00000000000..e08bd6d04a7 --- /dev/null +++ b/addons/test/misra/misra-ctu-2-test.c @@ -0,0 +1,59 @@ +// Test with command: +// ./cppcheck --enable=information --enable=style --addon=misra --inline-suppr addons/test/misra/misra-ctu-*-test.c + +#include "misra-ctu-test.h" + +extern MISRA_2_3_B misra_2_3_b; + +x = MISRA_2_5_OK_2; + +// cppcheck-suppress misra-c2012-5.6 +typedef int MISRA_5_6_VIOLATION; +static MISRA_5_6_VIOLATION misra_5_6_x; + +// cppcheck-suppress misra-c2012-5.7 +struct misra_5_7_violation_t { + int x; // cppcheck-suppress unusedStructMember +}; +static misra_5_7_violation_t misra_5_7_use_type_2; + +// #11443 - FP +static struct +{ // no warning + uint16_t x; // cppcheck-suppress unusedStructMember +} misra_5_7_false_positive_2; + +// cppcheck-suppress misra-c2012-5.8 +static int misra_5_8_var1; +// cppcheck-suppress misra-c2012-8.4 +// cppcheck-suppress misra-c2012-5.8 +void misra_5_8_f(void) { + // cppcheck-suppress [misra-c2012-5.8, unusedVariable] + char misra_5_8_var2; +} + +// cppcheck-suppress misra-c2012-5.9 +static int misra_5_9_count; +// cppcheck-suppress misra-c2012-5.9 +static void misra_5_8_foo(void) {} + +// cppcheck-suppress misra-c2012-8.5 +extern int misra_8_5; + +// cppcheck-suppress misra-c2012-8.4 +// cppcheck-suppress misra-c2012-8.6 +int32_t misra_8_6 = 2; +int32_t misra_8_6_1; +// cppcheck-suppress misra-c2012-8.7 +int32_t misra_8_6_1 = 2; +// cppcheck-suppress misra-c2012-8.4 +// cppcheck-suppress misra-c2012-8.7 +void misra_8_7(void) {} +static void misra_8_7_caller(void) { + misra_8_7(); + misra_8_7_external(); +} + +// #12362 +typedef void(*misra_8_7_func_ptr)( void ); +static const misra_8_7_func_ptr ptrs[] = { misra_8_7_compliant, NULL }; \ No newline at end of file diff --git a/addons/test/misra/misra-ctu-test.h b/addons/test/misra/misra-ctu-test.h new file mode 100644 index 00000000000..803e850b1f2 --- /dev/null +++ b/addons/test/misra/misra-ctu-test.h @@ -0,0 +1,24 @@ + + +typedef int MISRA_2_3_A; +typedef int MISRA_2_3_B; +typedef int MISRA_2_3_VIOLATION; // cppcheck-suppress misra-c2012-2.3 + +// cppcheck-suppress misra-c2012-2.4 +struct misra_2_4_violation_t { + int x; +}; + +static inline void misra_5_9_exception(void) {} + +void misra_8_7_external(void); + +#define MISRA_2_5_OK_1 1 +#define MISRA_2_5_OK_2 2 +// cppcheck-suppress misra-c2012-2.5 +#define MISRA_2_5_VIOLATION 0 + +// #12362 +extern void misra_8_7_compliant( void ); + +#define MISRA_2_5_OK_3 This \ No newline at end of file diff --git a/addons/test/misra/misra-suppressions1-test.c b/addons/test/misra/misra-suppressions1-test.c new file mode 100644 index 00000000000..403d71f73ea --- /dev/null +++ b/addons/test/misra/misra-suppressions1-test.c @@ -0,0 +1,37 @@ +// To test: +// ../../cppcheck --suppressions-list=suppressions.txt --dump misra-suppressions*-test.c && python ../misra.py misra-suppressions*-test.c.dump +// There should be no violations reported + +// This needs to stay at line number 7 to make the test pass +// If it is changed update suppressions.txt with the new line number +// cppcheck-suppress-file misra-c2012-5.2 +#include //21.6 + +extern int misra_5_2_var_hides_var______31x;//8.4 +static int misra_5_2_var_hides_var______31y;//5.2 +static int misra_5_2_function_hides_var_31x; +static void misra_5_2_function_hides_var_31y(void) {}//5.2 +static void foo(void) +{ + int i; + // cppcheck-suppress-begin misra-c2012-16.4 + // cppcheck-suppress misra-c2012-16.6 + switch(misra_5_2_func1()) //16.4 16.6 + { + case 1: + { + do + { + for(i = 0; i < 10; i++) + { + if(misra_5_2_func3()) //17.3 + { + int misra_5_2_var_hides_var_1____31x; + int misra_5_2_var_hides_var_1____31y;//5.2 + } + } + } while(misra_5_2_func2()); //17.3 + } + } + // cppcheck-suppress-end misra-c2012-16.4 +} diff --git a/addons/test/misra/misra-suppressions2-test.c b/addons/test/misra/misra-suppressions2-test.c new file mode 100644 index 00000000000..79d3f68191e --- /dev/null +++ b/addons/test/misra/misra-suppressions2-test.c @@ -0,0 +1,20 @@ +// To test: +// ../../cppcheck --suppressions-list=suppressions.txt --dump misra-suppressions*-test.c && python ../misra.py misra-suppressions*-test.c.dump +// There should be no violations reported + +// cppcheck-suppress-file misra-c2012-5.2 +union misra_5_2_field_hides_field__63x { //19.2 +int misra_5_2_field_hides_field__31x; +int misra_5_2_field_hides_field__31y;//5.2 +}; +struct misra_5_2_field_hides_field__63y { //5.2 +int misra_5_2_field_hides_field1_31x; +int misra_5_2_field_hides_field1_31y;//5.2 +}; +const char *s41_1 = "\x41g"; // 4.1 8.4 +const char *s41_2 = "\x41\x42"; // 8.4 + +// cppcheck-suppress misra-c2012-5.7 +struct misra_5_7_violation_t { + int x; +}; diff --git a/addons/test/misra/misra-test-avr8.c b/addons/test/misra/misra-test-avr8.c new file mode 100644 index 00000000000..faa6eb6b615 --- /dev/null +++ b/addons/test/misra/misra-test-avr8.c @@ -0,0 +1,29 @@ +// To test: +// ~/cppcheck/cppcheck--dump -DDUMMY --suppress=uninitvar misra/misra-test-avr8.c --std=c89 --platform=avr8 && python3 ../misra.py -verify misra/misra-test-avr8.c.dump + +static void misra_10_4(void) +{ + // #10480 + const char buf1[1] = {a}; + const char c = '0'; + x = buf1[0] - c; + + const char buf2[2] = {x,y}; + x = 'a' == buf2[0]; // no-warning + + typedef struct { + int t; + char buf[2]; + } foo_t; + const foo_t cmd = {0}; + x = 'b' == cmd.buf[0]; // no-warning + + const foo_t * pcmd = &cmd; + x='c' == pcmd->buf[0]; // no-warning + (void)cmd.t; +} + +static void misra_12_2(void) { + a = (((uint64_t)0xFF) << 32); +} + diff --git a/addons/test/misra/misra-test-c11.c b/addons/test/misra/misra-test-c11.c new file mode 100644 index 00000000000..aa00b2f0b42 --- /dev/null +++ b/addons/test/misra/misra-test-c11.c @@ -0,0 +1,38 @@ +// To test: +// ~/cppcheck/cppcheck --dump misra/misra-test-c11.c --std=c11 +// ~/cppcheck/cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra/misra-test-c11.c --std=c11 --platform=unix64 && python3 ../misra.py -verify misra/misra-test-c11.c.dump + +#include +#include + +typedef unsigned int UINT_TYPEDEF; +struct struct_with_bitfields +{ + unsigned int a:2; // Compliant + signed int b:2; // Compliant + UINT_TYPEDEF c:2; // Compliant + int d:2; // 6.1 - plain int not compliant + signed long f:2; // Compliant in c99 or later - explicitly signed integer type + unsigned int g:1; // Compliant + signed int h:1; // 6.2 - signed int with size 1 is not compliant + uint16_t i:1; // Compliant + bool j:1; // Compliant in C99 or later +}; + +static void misra6_1_fn(void) { + // "Use" occurrence should not generate warnings + struct_with_bitfields s; + s.h = 61; +} + +static void misra_10_3_c11(void) { + bool b = false; + bool b0 = 0; // 10.3 + bool b1 = 1; // 10.3 + bool bf = false; // no-warning + bool bt = true; // no-warning + b = 0; // 10.3 + b = 1; // 10.3 + b = false; // no-warning + b = true; // no-warning +} diff --git a/addons/test/misra/misra-test.c b/addons/test/misra/misra-test.c new file mode 100644 index 00000000000..6b6f52342aa --- /dev/null +++ b/addons/test/misra/misra-test.c @@ -0,0 +1,2115 @@ +// To test: +// ~/cppcheck/cppcheck --dump misra/misra-test.h --std=c89 +// ~/cppcheck/cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra/misra-test.c --std=c89 --platform=unix64 && python3 ../misra.py -verify misra/misra-test.c.dump + +#pragma ghs section rodata=default // no warning + +#include "path\file.h" // 20.2 +#include "file//.h" // 20.2 +#include "file/*.h" // 20.2 +#include "file'.h" // 20.2 +#include // 20.2 +#include "file,.h" // 20.2 + +#include "misra-test.h" + +#include /*abc*/ "file.h" // no warning +/*foo*/#include "file.h" // no warning +#include "./file.h" // no warning +#include \ + "file.h" +#include /*abc*/ \ + "file.h" +#include "fi" "le.h" // 20.3 (strings are concatenated after preprocessing) +#include "fi" // 20.3 +#include // 20.3 +#include PATH "file.h" // 20.3 +#define H_20_3_ok "file.h" +#include H_20_3_ok +#include file.h // 20.3 +#define H_20_3_bad file.h +#include H_20_3_bad // TODO: 20.3 Trac #9606 +#include "//file.h" // 20.2 +#include "//file.h" H_20_3_bad // 20.2 20.3 +//#include H_20_3_bad // no warning +#include H_20_3_ok H_20_3_ok // 20.3 +#include // no warning + +#include // 21.4 +#include // 21.5 +#include +#include +#include // 21.10 +#include // 21.11 +#include + +// Check that the addon doesn't crash +typedef struct { + union { // 19.2 + struct { + unsigned a : 2; + unsigned : 14; + }; + uint16_t value; + }; +} STRUCT_BITS; + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef signed int s32; +typedef unsigned long long u64; + +static void misra_1_2(bool expr) +{ + (void)(condition ? : 0); // 1.2 + a = 1 + ({if (!expr) {code;} 1;}); // 1.2 +} + +static _Atomic int misra_1_4_var; // 1.4 +static _Noreturn void misra_1_4_func(void) // 1.4 +{ + if (0 != _Generic(misra_1_4_var)) {} // 1.4 17.3 + printf_s("hello"); // 1.4 17.3 +} + +#define MISRA_2_2 (1*60) + +static void misra_2_2(int x) { + int a; + a = x + 0; // 2.2 + a = 0 + x; // 2.2 + a = x * 0; // 2.2 + a = 0 * x; // 2.2 + a = x * 1; // 2.2 + a = 1 * x; // 2.2 + a = MISRA_2_2; + (void)a; +} + +/* // */ // 3.1 +/* /* */ // 3.1 +//// +/* https://cppcheck.net */ + +// http://example.com // no warning + +static void misra_2_7_unused_param (int *param1, int unused_param) // 2.7 +{ + *param1 = 42U; +} + +static void misra_2_7_used_params (int *param1, int param2, int param3) +{ + (void)param3; + *param1 = param2; +} + +static void misra_2_7_a(int a, + int b, // 2.7 + int c, + int d) // 2.7 +{ + (void)a; + (void)c; +} +static void misra_2_7_b(int a, int b, int c, // 2.7 + int d) // 2.7 +{ + (void)a; +} +static void misra_2_7_c(int a, ...) { (void)a; } +static void misra_2_7_d(int) { } // 2.7 8.2 + +extern int misra_5_1_extern_var_hides_var_x; +extern int misra_5_1_extern_var_hides_var_y; //5.1 +int misra_5_1_var_hides_var________a; // 8.4 +int misra_5_1_var_hides_var________b; int misra_5_1_var_hides_var________b1; int misra_5_1_var_hides_var________b2; //5.1 8.4 +int misra_5_1_var_hides_var________c; //5.1 8.4 +int misra_5_1_var_hides_var________d; //5.1 8.4 +int misra_5_1_var_hides_var________e; //5.1 8.4 + +extern const uint8_t misra_5_2_var1; +const uint8_t misra_5_2_var1 = 3; +static int misra_5_2_var_hides_var______31x; +static int misra_5_2_var_hides_var______31y;//5.2 +static int misra_5_2_function_hides_var_31x; +static void misra_5_2_function_hides_var_31y(void) {}//5.2 +static void foo(void) +{ + int i; + switch(misra_5_2_func1()) //16.4 16.6 17.3 + { + case 1: + { + do + { + for(i = 0; i < 10; i++) + { + if(misra_5_2_func3()) //17.3 + { + int misra_5_2_var_hides_var_1____31x; + int misra_5_2_var_hides_var_1____31y;//5.2 + } + } + } while(misra_5_2_func2()); //17.3 + } + break; + } +} + +union misra_5_2_field_hides_field__63x { //19.2 +int misra_5_2_field_hides_field__31x; +int misra_5_2_field_hides_field__31y;//5.2 +}; +struct misra_5_2_field_hides_field__63y { //5.2 +int misra_5_2_field_hides_field1_31x; +int misra_5_2_field_hides_field1_31y;//5.2 +}; +const char *s41_1 = "\x41g"; // 4.1 8.4 +const char *s41_2 = "\x41\x42"; // 8.4 +const char *s41_3 = "\x41" "\x42"; // 8.4 +const char *s41_4 = "\x41" "g"; // 8.4 +const char *s41_5 = "\x41\xA"; // 8.4 +const char *s41_6 = "\xA\x41"; // 8.4 +const char *s41_7 = "\xAA\xg\x41"; // 4.1 8.4 +const char *s41_8 = "\xAA\x\x41"; // 4.1 8.4 +const char *s41_9 = "unknown\gsequence"; // 8.4 +const char *s41_10 = "simple\nsequence"; // 8.4 +const char *s41_11 = "string"; // 8.4 +int c41_3 = '\141t'; // 4.1 8.4 +int c41_4 = '\141\t'; // 8.4 +int c41_5 = '\0'; // 10.3 8.4 +int c41_6 = '\0\t'; // 8.4 +int c41_7 = '\12\t'; // 8.4 +int c41_8 = '\0t'; // 4.1 8.4 +int c41_9 = '\12'; // 8.4 +int c41_10 = '\12\n'; // 8.4 +int c41_11 = '\12n'; // 4.1 8.4 +int c41_12 = '\12323'; // 4.1 8.4 +int c41_13 = '\123\3'; // 8.4 +// TODO int c41_14 = '\777\777'; +int c41_15 = 'a'; // 10.3 8.4 + +static void misra_4_1(void) +{ + (void)printf("\x41g"); // 4.1 21.6 + (void)printf("\x41\x42"); //21.6 + (void)printf("\x41" "g"); //21.6 +} + +const char *s42_1 = "String containing trigraphs ??-??-??"; // 4.2 8.4 +const char *s42_2 = "String containing trigraph???=preceded by question mark"; // 4.2 8.4 +const char *s42_3 = "No trigraph?(?'?)"; // 8.4 + +static void misra_4_2(void) +{ + (void)printf("??=Trigraph\n"); // 4.2 21.6 + (void)printf("No?/Trigraph\n"); //21.6 +} + +#define misra_5_4_macro_hides_macro__31x 1 +#define misra_5_4_param_hides_macro__31x 1 +#define misra_5_4_macro_hides_macro__31y 2 //5.4 +#define m1(misra_5_4_param_hides_macro__31y) 1 //5.4 +#define m2(misra_5_4_param_hides_param__31x,misra_5_4_param_hides_param__31y) 1 //5.4 +#ifdef misra_5_4_macro_hides_macro__31x +#define misra_5_4_macro 1 // no warning +#else +#define misra_5_4_macro 2 // no warning +#endif + +#define misra_5_5_var_hides_macro____31x 1 +#define misra_5_5_functionhides_macro31x 1 +#define misra_5_5_param_hides_macro__31x 1 +#define misra_5_5_tag_hides_macro____31x 1 +#define misra_5_5_hides_macro________31x 1 + +int misra_5_5_var_hides_macro____31y; //5.5 8.4 +static void misra_5_5_functionhides_macro31y(int misra_5_5_param_hides_macro__31y){(void)misra_5_5_param_hides_macro__31y;} //5.5 +struct misra_5_5_tag_hides_macro____31y { //5.5 +int x; +}; +static void misra_5_5_func1(void) +{ + switch(misra_5_5_func2()) //16.4 16.6 17.3 + { + case 1: + { + do + { + if(misra_5_5_func3()) //17.3 + { + int misra_5_5_hides_macro________31y; //5.5 + } + } while(misra_5_5_func2()); //17.3 + } + break; + } +} + +typedef unsigned int UINT_TYPEDEF; +struct struct_with_bitfields +{ + unsigned int a:2; // Compliant + signed int b:2; // Compliant + UINT_TYPEDEF c:2; // Compliant + int d:2; // 6.1 - plain int not compliant + signed long f:2; // 6.1 - signed long not compliant + unsigned int g:1; // Compliant + signed int h:1; // 6.2 - signed int with size 1 is not compliant + uint16_t i:1; // Compliant + bool j:1; // 6.1 - bool not legal until c99 +}; + +static void misra6_1_fn(void) { + // "Use" occurrence should not generate warnings + struct_with_bitfields s; + s.h = 61; +} + +static void misra_7_1(void) { + int x = 066; // 7.1 +} + +static void misra_7_2(void) { + uint32_t a = 0x7fffffff; + uint32_t b = 0x80000000; // 7.2 + uint32_t c = 0x80000000U; + uint32_t d = 2147483647; + uint64_t e = 2147483648; + uint32_t f = 2147483648U; +} + +// The addon should not generate false positives for the identifiers. +struct misra_7_3_s +{ + uint32_t ul_clka; + uint32_t test123l; + float t = 6.02E23l; // 7.3 + float t1 = 6.02E23L; + float u = 0xa1B2.p12l; // 7.3 + float u1 = 0xa1B2.p12L; + float v = 0xa1B2.P12l; // 7.3 + float v1 = 0xa1B2.P12L; + float w = 6.02e23l; // 7.3 + float w1 = 6.02e23L; + unsigned long x = 0xabcul; // 7.3 + unsigned long x1 = 0xabcuL; + unsigned long y = 0xABCUl; // 7.3 + unsigned long y1 = 0xABCUL; + unsigned long z = 0XdeadBeEfUl; // 7.3 + unsigned long z1 = 0XdeadBeEfUL; +}; + +static void misra_7_3(void) { + long misra_7_3_a = 0l; //7.3 + long misra_7_3_b = 0lU; //7.3 + long long misra_7_3_c = 0Ull; //7.3 + long long misra_7_3_d = 0ll; //7.3 + long double misra_7_3_e = 7.3l; //7.3 + struct misra_7_3_s misra_7_3_f = + { + .ul_clka = 19U, + .test123l = 23U + }; +} + +typedef const char* MISRA_7_4_CHAR_CONST; +static MISRA_7_4_CHAR_CONST misra_7_4_return_const_type_def (void) { return "return_typedef_const"; } +static char *misra_7_4_return_non_const (void) { return 1 + "return_non_const"; } // 7.4 18.4 +static const char *misra_7_4_return_const (void) { return 1 + "return_const"; } // 18.4 + +static void misra_7_4_const_call(int a, const char* b) { } // 2.7 +static void misra_7_4_const_ptr_call(int a, const char const* b) { } // 2.7 +static void misra_7_4_call(int a, char* b) { } // 2.7 +static void misra_7_4_call_2(int a, ...) { } // 2.7 + +static void misra_7_4(void) +{ + const char *a = "text a"; + char* const b = "text_b"; // 7.4 + char *c = "text c"; // 7.4 + char *d = 1 + "text d"; // 7.4 18.4 + char *e = "text e" + 1 + 2; // 7.4 18.4 + char *f = 1 + "text f" + 2; // 7.4 18.4 + const wchar_t *g = "text_g"; + wchar_t *h = "text_h"; // 7.4 + + misra_7_4_const_call(1, ("text_const_call")); + misra_7_4_const_ptr_call(1, ("text_const_call")); + misra_7_4_call(1, "text_call"); // 7.4 11.8 + misra_7_4_call_2(1, "a", "b"); +} + +const misra_8_1_a; // 8.1 8.4 + +static int misra_8_2_a (int n, ...); +extern int misra_8_2_b (int n); +extern int misra_8_2_c (int); // 8.2 +static int misra_8_2_d (); // 8.2 +static int misra_8_2_e (void); +static int misra_8_2_f (vec, n ) +int *vec; // 8.2 +int n; // 8.2 +{ + return vec[ n - 1 ]; +} +static int misra_8_2_g ( /* comment */ ); // 8.2 +static int misra_8_2_h ( /* comment 1 */ /* comment 2 */ ); // 8.2 +static int misra_8_2_i ( /* comment */ void); +static int misra_8_2_j ( /* comment */ void /* comment */); +static int misra_8_2_k ( // + void); +static int misra_8_2_l ( // 8.2 +); +static void misra_8_2_m(uint8_t * const x); +static void misra_8_2_m(uint8_t * const x) +{ +(void)x; +} +int16_t ( *misra_8_2_p_a ) (); // 8.2 8.4 +int16_t ( *misra_8_2_p_b ) (void); // 8.4 +int16_t ( *misra_8_2_p_c ) (int); // 8.4 +static int misra_8_2_n(int a) +{ return a + 42; } +static int misra_8_2_o( + const uint32_t a1, + const uint8_t *const a2 +) +{ return *a2 + a1; } +static int misra_8_2_p( + const uint32_t a1, + const uint8_t *const a2 +); +static int misra_8_2_q +(); // 8.2 + +void misra_8_4_foo(void) {} // 8.4 +extern void misra_8_4_func(void); +void misra_8_4_func(void) {} +static void misra_8_4_bar(void) {} // Declared in header +extern int16_t misra_8_4_count; // no-warning +int16_t misra_8_4_count = 0; // Compliant +extern uint8_t misra_8_4_buf1[13]; // no-warning +uint8_t misra_8_4_buf2[24]; // 8.4 +typedef struct { uint16_t a; uint16_t b; } misra_8_4_struct; +extern misra_8_4_struct bar[42]; +misra_8_4_struct bar[42]; // compliant +extern uint16_t misra_8_4_speed = 6000u; //8.4 +uint8_t misra_8_4_pressure = 101u; //8.4 +int32_t misra_8_4_ext_val2; +int32_t misra_8_4_ext_val2 = 3; // compliant +int32_t misra_8_4_ext_val4; //8.4 +// #12978 +const stError_t * m8_4_pubTestPointer; //compliant + +static int32_t misra_8_8 = 123; +extern int32_t misra_8_8; // 8.8 + +static int32_t misra_8_9_i; // 8.9 +static int32_t misra_8_9_foo(void) { return misra_8_9_i++; } + +inline int32_t misra_8_10_value(void) { return 123; } // 8.10 8.4 + +extern int a811[]; // 8.11 + +enum misra_8_12_a { misra_a1 = 1, misra_a2 = 2, misra_a3, misra_a4 = 3 }; //8.12 +enum misra_8_12_b { misra_b1, misra_b2, misra_b3 = 3, misra_b4 = 3 }; // no-warning +enum misra_8_12_c { misra_c1 = misra_a1, misra_c2 = 1 }; // no-warning +enum misra_8_12_d { misra_d1 = 1, misra_d2 = 2, misra_d3 = misra_d1 }; // no-warning +enum misra_8_12_e { misra_e1 = sizeof(int), misra_e2}; // no-crash + +static void misra_8_14(char * restrict str) {(void)str;} // 8.14 + +// #11707 -- false positive +struct S_9_3 { struct S_9_3* p; int x; }; +struct S_9_3* s_9_3_array[] = { x, NULL }; // 8.4 + +// #10854 +struct Entry_9_2{ + union{ // 19.2 + const int *p; + int x; + }; + int y; +}; + +static void misra_9_2_10854(void){ + struct Entry_9_2 e1[] = + { + {{ .x = 1 }, .y = 2 } + }; +} +static void misra_9_empty_or_zero_initializers(void) { + int a[2] = {}; // 9.2 + int b[2][2] = {}; // 9.2 + int c[2][2] = { {} }; // 9.2 9.3 + int d[2][2] = { {}, {} }; // 9.2 + int e[2][2] = { { 1 , 2 }, {} }; // 9.2 + + int f[5] = { 0 }; + int f1[5] = { 0u }; // 9.3 + unsigned int f1[ 3 ][ 2 ] = { 0U }; // 9.3 9.2 + unsigned int f2[ 3 ] = { 0U }; // 9.3 + float f3[ 3 ][ 2 ] = { 0.0F }; // 9.3 9.2 + int g[5][2] = { 0 }; + int h[2][2] = { { 0 } }; // 9.3 + int i[2][2] = { { 0 }, { 0 } }; + int j[2][2] = { { 1, 2 }, { 0 } }; + int k[2][2] = { [0] = { 1 , 2 }, { 0 } }; + int l[1][2] = { { 0 }, [0] = { 1 } }; // 9.3 9.4 + + typedef struct { + int a; + int b; + } struct1; + + struct1 m = { }; // 9.2 + struct1 n = { 0 }; +} + +static void misra_9_string_initializers(void) { + const char a[12] = { "Hello world" }; // 9.2 + const char b[2][20] = "Hello world"; // 9.2 9.3 + const char c[] = "Hello world"; + const char d[15] = "Hello world"; + const char e[1][12] = { "Hello world" }; + const char *f[2] = { "Hello", [1] = "world" }; + const char *g[1] = "Hello world"; // 9.2 + + const char h[2][15] = { { 0 }, "Hello world" }; + + char **str_p = &f[0]; + + char **i[1] = { str_p }; + char **j[1] = { { str_p } }; // 9.2 +} + +static void misra_9_array_initializers(void) { + char a[4] = { 1, 2, 3, 4 }; + char b[2][2] = { {1, 2}, {3, 4} }; + char c[2][2] = { 1, 2, 3, 4 }; // 9.2 + char d[6] = { { 1, 2 }, { 3, 4 }, { 5, 6 } }; // 9.2 9.3 + + char e[2][2] = { {1, 2}, {4} }; // 9.3 + char f[2][2] = { 1, 2, 3 }; // 9.2 9.3 + char g[2][2] = { {1, 2, 3, 4} }; // 9.3 + + char h[2][2] = { { 1, { 2 } }, { 3, { 5 } } }; // 9.2 + char i[2][2] = { { 1, { 2 } }, { 3 } }; // 9.2 9.3 + char j[2][3] = { { 1, { 2 }, 3 }, { 4, { 5 }, 6 } }; // 9.2 + char k[2][3] = { { 1, { 2 }, 3 }, { 4, { 5 } } }; // 9.2 9.3 + char l[3] = { 1, { 2, 3 } }; // 9.2 9.3 +} + +static void misra_9_array_initializers_with_designators(void) { + char a[1] = { [0][1] = 1 }; // 9.2 + char b[1] = { [0] = { 1, 2 } }; // 9.2 + char c[2][2] = { [0] = {1, 2, 3} }; + char d[1][2] = { [0] = 1 }; // 9.2 + char e[2][2] = { { 1, 2 }, [1][0] = {3, 4} }; // 9.2 + int e1[2][2] = { [ 0 ][ 1 ] = 0, { 5, 6 } }; // no warning #12419 + char f[2] = { [0] = 1, 2 }; + char g[2] = { [1] = 2, [0] = 1 }; + char h[2][2] = { { 1, 2 }, [1] = { 3 } }; // 9.3 + char i[2][2] = { { 1, 2 }, [1] = { 3, 4 } }; + char j[2][2] = { { 1, 2 }, [1] = { [0] = 3 } }; + char k[2][2] = { { 1, 2 }, [1][0] = 3 }; + char l[2][2] = { { 1, 2 }, [1][0] = 3, 4}; // 9.2 + char m[2][2] = { [0] = { [2] = 2 }, [1][5] = 4 }; + char n[2][2] = { [0] = { 1 } }; // 9.3 + char o[2][2] = { { 1 }, [1][0] = 3 }; // 9.3 + char p[2][2] = { { 1, 2 }, { 3, 4 }, [1] = { 3 } }; // 9.3 9.4 + // cppcheck-suppress unknownEvaluationOrder + char q[2][2] = { { 1, 2 }, { 1 }, [1] = { [1] = 3 } }; // 9.4 + char r[2][2][2] = { [0][0] = { 1, 2 }, [1] = { [0] = {5, 6} } }; + char s[2][2][2] = { [0][0] = { 1, 2 }, [1] = {5, 6, 7, 8}}; // 9.2 + char t[2][2][2] = { [0][0] = { 1, 2 }, {3, 4}, [1] = {5, 6}}; // 9.2 9.3 + char u[2][2][2] = { [0] = { 1, 2, {3, 4} } }; // 9.2 + char v[2][2][2] = { [0] = { 1, 2, [1] = {3, 4} }}; // 9.2 +} + +static void misra_9_struct_initializers(void) { + typedef struct { + int i1; + int i2; + } struct1; + + typedef struct { + char c1; + struct1 is1; + char c2[4]; + } struct2; + + typedef struct { + struct1 s[2][2]; + } struct3; + + typedef struct { + unknown_field_type f1; + unknown_field_type f2[2]; + int f3[2]; + } struct_with_unknown_fields; + + struct3 sa[2] = { [1].s[1][0].i1 = 3, 4 }; // 9.2 + + struct1 sa = 1; // 9.2 + + struct1 sb = { 1, 2 }; + struct2 sc = { 1, { 2 }, {4, 5, 6, 7} }; + struct2 sd = { 1, { 2, 3 }, {4, 5, 6} }; // 9.3 + struct2 se = { 1, 2, 3, 4, 5, 6, 7 }; // 9.2 + struct2 sf = { 1, { 2, 3 }, 4, 5, 6, 7 }; // 9.2 + struct2 sg = { 1, { 2 }, 4, 5, 6, 7 }; // 9.2 + struct2 sh = { 1, { 2, 3 }, 4, 5, 6 }; // 9.2 9.3 + struct2 si = { 1, 2, 3, {4,5,6,7} }; // 9.2 + + int a; + struct1 sj = { a = 1, 2 }; // 13.1 + + // Struct types + struct2 sta = { .is1 = sc }; // 9.2 + struct2 stb = { .is1 = sb }; + struct1 stc[1] = { sc }; // 9.2 + struct1 std[1] = { sb }; + + // Struct designators + struct1 sda = { 1, .i2 = 2 }; + struct2 sdb = { 1, { 2, .i2=3 }, .c2[1]=5 }; + struct2 sdc = { 1, { 2, .i2=3 }, .c2 = { 5 } }; // 9.3 + struct2 sdd = { 1, { 2, .i2=3 }, .c2 = 5 }; // 9.2 + struct2 sde = { .is1 = { 2, 3 }, { 4, 5, 6, 7 } }; + + // Struct arrays + struct1 asa[2] = { {1,2}, {3,4} }; + struct1 asb[2] = { {1}, {3,4} }; + struct1 asc[2] = { {1,2} }; // 9.3 + struct1 asd[2] = { 1,2, 3,4 }; // 9.2 + struct1 ase[2] = { 1,2, 3 }; // 9.2 + struct1 asf[2] = { 1,2 }; // 9.2 9.3 + struct1 asg[2] = { [1].i1 = 3 }; + struct3 ash[2] = { [1].s[1][0].i1 = 3 }; + struct3 asi[2] = { [0] = { .s[0] = { { 1, 2 } }}}; // 9.3 + struct3 asj[2] = { [0] = { .s[0] = { 1, 2 }}}; // 9.2 9.3 + + // Missing type information + dummy_struct dsa = { 1, .a = 2 }; + dummy_struct dsb[2] = { {1,2}, {3,4} }; + dummy_struct dsc[2][2] = { {1,2}, {3,4} }; + dummy_struct dsd[2][2] = { 1, 2, 3, 4 }; // 9.2 + dummy_struct dse[3] = { {1,2}, {3,4}, [1] = {5,6} }; // 9.3 9.4 + dummy_struct dsf[] = { [0] = 1 }; // 9.5 + dummy_struct dsg = { .a = {0}, .b = {0} }; + dummy_struct dsh[2][2] = { { {.a = 0, .b = {0}}, { 0 } }, { { 0 }, {.a = 0, .b = {0}}} }; + + // Struct with fields of unknown type + struct_with_unknown_fields ufa = { 1, { 1, 2 }, { 1, 2 } }; + struct_with_unknown_fields ufb = { 1, 1, 2 }; // 9.2 + struct_with_unknown_fields ufc[2] = { {1, { 1, 2 }, { 1, 2 } }, + { 2, { 1, 2 }, { 1, 2 } } }; + struct_with_unknown_fields ufd[2][2] = { {1, { 1, 2 }, { 1, 2 } }, // 9.2 9.3 + { 2, { 1, 2 }, { 1, 2 } } }; + struct_with_unknown_fields ufe[2] = { 1, { 1, 2 }, { 1, 2 }, // 9.2 9.3 + 2, { 1, 2 }, { 1, 2 } }; + struct_with_unknown_fields uff[3] = { { 1, { 1, 2 }, { 1, 2 }}, // 9.3 9.4 + {2, { 1, 2 }, { 1, 2 }}, + [1] = { 2, { 1, 2 }, { 1, 2 }} }; + + // Obsolete initialization syntax for GCC + struct1 os1 = { i1: 1, i2: 2 }; // 10.4 13.4 +} + +static void misra_9_2(void) { + union misra_9_2_union { // 19.2 + char c; + struct1 i; + } u = { 3 }; // 19.2 +} + +static void misra_9_5(void) { + char a[] = { 1, 2, 3 }; + char b[] = { [2] = 5 }; // 9.5 + char c[] = { 1, [1] = 5 }; // 9.5 + char d[] = { [1] = 2, [0] = 1 }; // 9.5 + + char e[][2] = { { 1, 2 }, { 3, 4 } }; + char f[][2] = { [1] = { 3, 4 } }; // 9.5 + char g[][2] = { { 1, 2 }, [1] = { 3, 4 } }; // 9.5 + char h[][2] = { [1] = { 1, 2 }, [0] = { 3, 4 } }; // 9.5 +} + +typedef char misra_10_1_char_t; +#define MISRA_10_1_CHAR char +static void misra_10_1(uint32_t u, char c1, char c2, uint8_t u8) { + int32_t i; + char c; + enum { E1 = 1 }; + i = 3 << 1; // 10.1 + i = (u & u) << 4; // no-warning + c = c1 & c2; // 10.1 + c = c1 << 1; // 10.1 + i = c1 > c2; // 10.3 + i = E1 + i; // no-warning + + char ch1 = 'a'; + char ch2 = 'b'; + char ch3; + ch3 = ch1 & ch2; // 10.1 + + misra_10_1_char_t ct1 = 'a'; + misra_10_1_char_t ct2 = 'b'; + misra_10_1_char_t ct3; + ct3 = ct1 & ct2; // 10.1 + + MISRA_10_1_CHAR cd1 = 'a'; + MISRA_10_1_CHAR cd2 = 'b'; + MISRA_10_1_CHAR cd3; + cd3 = cd1 & cd2; // 10.1 + + uint8_t temp1 = u8 & 0x42U; // no-warning +} +static void misra_10_1_ternary(void) +{ + int a; + uint8_t ui8; + uint16_t ui16; + int8_t i8; + int16_t i16; + + a = ui16 << ui16; // 10.6 + a = ui16 << (get_bool(42) ? ui16 : ui16); // 17.3 + a = ui16 << (get_bool(42) ? ui16 : (get_bool(34) ? ui16 : ui16)); // 17.3 + a = ui16 << (get_bool(42) ? (get_bool(34) ? ui16 : ui16) : ui16); // 17.3 + a = ui16 << (get_bool(42) ? i16 : (get_bool(34) ? ui16 : ui16)); // 10.1 10.4 17.3 + a = ui16 << (get_bool(42) ? (get_bool(34) ? ui16 : i16) : ui16); // 10.1 10.4 17.3 + a = ui16 << (get_bool(42) ? (get_bool(34) ? ui16 : ui16) : i16); // 10.1 10.4 17.3 + a = ui16 << (get_bool(42) ? (get_bool(34) ? ui16 : ui8) : ui8); // 10.4 17.3 + a = ui16 << (get_bool(42) ? (get_bool(34) ? i16 : ui8) : ui8); // 10.1 10.4 17.3 + a = (get_bool(42) ? (get_bool(34) ? ui16 : ui8) : ui8) << ui16; // 10.4 17.3 + a = (get_bool(42) ? (get_bool(34) ? i16 : ui8) : ui8) << ui16; // 10.1 10.4 17.3 + a = (get_bool(42) ? (get_bool(34) ? ui16 : i8) : ui8) << ui16; // 10.1 10.4 17.3 + a = (get_bool(42) ? (get_bool(34) ? ui16 : ui8) : i8) << ui16; // 10.1 17.3 + a = (get_bool(42) ? (get_bool(34) ? ui16 : ui8) : ui8) << (get_bool(19) ? ui16 : ui8); // 10.4 17.3 + a = (get_bool(42) ? (get_bool(34) ? i16 : ui8) : ui8) << (get_bool(19) ? ui16 : ui8); // 10.1 10.4 17.3 + a = (get_bool(42) ? (get_bool(34) ? ui16 : ui8) : ui8) << (get_bool(19) ? i16 : ui8); // 10.1 10.4 17.3 +} + +static void misra_10_2(void) { + uint8_t u8a = 0; + char cha = 0; + int8_t s8a = 0; + int16_t s16a = 0; + float f32a = 0.0; + char res; + + res = '0' + u8a; // Convert u8a to digit + res = s8a + '0'; + res = cha - '0'; + res = '0' - s8a; + res = cha + ':'; // 10.2 + + res = s16a - 'a'; // 10.2 10.3 10.4 + res = '0' + f32a; // 10.2 10.4 + + // 10481 - crash + char buf[1] = {'f'}; + x = buf[0] - '0'; +} + +static void misra_10_3(uint32_t u32a, uint32_t u32b) { + uint8_t res; + res = u32a + u32b; // 10.3 + res = (uint16_t)(2U + 3U); // 10.3 10.8 + res = 2U + 3U; // no warning, utlr=unsigned char + res = 0.1f; // 10.3 + const char c = '0'; // no-warning + bool b = true; // no-warning + uint32_t u = UINT32_C(10); // no-warning + bool b0 = 0; // no-warning + bool b1 = 1; // no-warning + b = 0; // no-warning + b = 1; // no-warning +} + +static void misra_10_4(u32 x, s32 y) { + z = x + 3; // 10.4 + enum misra_10_4_enuma { misra_10_4_A1, misra_10_4_A2, misra_10_4_A3 } a; + enum misra_10_4_enumb { misra_10_4_B1, misra_10_4_B2, misra_10_4_B3 }; + if ( misra_10_4_B1 > misra_10_4_A1 ) //10.4 + { + ; + } + z = x + y; //10.4 + z = (a == misra_10_4_A3) ? x : y; //10.4 + z = (a == misra_10_4_A3) ? y : y; // no-warning + + // #10499 + const char buf[10] = {0}; + if ('0' == buf[x]) // no-warning + { + } + + const struct foo_s{ + int t; + char buf[2]; + } cmd = {0}; + if ('\0' == cmd.buf[0]) //no-warning + { + } + + // #10652 + char c; + if ((char)'1' == c) {} // no warning + if ((unsigned char)'1' == c) {} //10.4 + if ((signed char)'1' == c) {} //10.4 +} + +static void misra_10_5(uint16_t x) { + // bool + res = (uint16_t) (x > 10u); // 10.5 + res = (bool) 1u; // no-warning + + // char <=> float + res = (char) 0.1f; + res = (float) 'x'; +} + +struct misra_10_6_s { + unsigned int a:4; +}; +static void misra_10_6(u8 x, char c1, char c2) { + u16 y1 = x+x; // 10.6 + u16 y2 = (0x100u - 0x80u); // rhs is not a composite expression because it's a constant expression + int b = (y2 == y2) ? 0 : 1; // no-warning + u16 z = ~u8 x ;//10.6 + s32 i = c1 - c2; // 10.3 + struct misra_10_6_s s; + s.a = x & 1U; // no-warning (#10487) +} +static void misra_10_6_1(uint32_t *a, uint16_t b, uint16_t c) +{ + *a = b + c ; // 10.6 +} + +static void misra_10_7_f1(struct Timer *pSelf, uint32_t interval_ms); +static void misra_10_7(uint16_t u16a, uint16_t u16b) { + uint32_t u32a = 100u; + res = u32a * u16a + u16b; // 12.1 no-warning + res = (u32a * u16a) + u16b; // no-warning + res = u32a * ( ( uint32_t ) u16a + u16b ); // no-warning + res = u32a * (u16a + u16b); // 10.7 + u32a *= u16a + u16b; // 10.7 + u32a = ((uint32_t)4 * (uint32_t)2 * (uint32_t)4 ); // no-warning (#10488) + dostuff(&t, (2*60*1000)); // 17.3 no-warning +} + +static void misra_10_8(u8 x, s32 a, s32 b) { + y = (u16)x; + y = (u16)(x+x); // 10.8 + y = (u16) (a + b) //10.8 +} + +int (*misra_11_1_p)(void); // 8.4 +void *misra_11_1_bad1 = (void*)misra_11_1_p; // 11.1 8.4 + +// #12172 +typedef void (*pfFunc_11_1)(uint32_t some); +extern pfFunc_11_1 data_11_1[10]; +void func_11_1(pfFunc_11_1 ptr){ //8.4 + data_11_1[index] = ptr; // no-warning +} + +struct misra_11_2_s; +struct misra_11_2_t; + +static struct misra_11_2_s * sp; +static struct misra_11_2_t * tp = sp; // 11.2 + +struct Fred {}; struct Wilma {}; +static void misra_11_3(u8* p, struct Fred *fred) { + x = (u64*)p; // 11.3 + struct Wilma *wilma = (struct Wilma *)fred; // 11.3 +} + +typedef struct { uint32_t something; } struct_11_4; +#define A_11_4 ((struct_11_4 *)0x40000U) // 11.4 + +static void misra_11_4(u8*p) { + u64 y = (u64)p; // 11.4 + u8 *misra_11_4_A = ( u8 * ) 0x0005;// 11.4 + s32 misra_11_4_B; + u8 *q = ( u8 * ) misra_11_4_B; // 11.4 + dummy = A_11_4->something; // no-warning +} + +static void misra_11_5(void *p) { + u16 *p16; + x = (u8 *)p; // 11.5 + p16 = p; // 11.5 +} + +static intptr_t get_intptr_constant(void) { return 456; } +static void misra_11_6(void) { + void *p; + struct { + int i; + } s = { .i = 7 }; + p = (void*)123; // 11.6 + x = (u64)p; // 11.6 + p = (void*)(1+1);// 11.6 + p = (void*)get_intptr_constant(); // 11.6 + p = (void*)s.i; // 11.6 + p = ( void * )0; // no-warning + (void)p; // no-warning + // # 12184 + p = (void*)0U; // no-warning +} + + +static void misra_11_7(int *p, float f) { + x = ( float ) p; //11.7 + y = ( int * ) f; //11.7 +} + +static void misra_11_7_extra(int *p, float f, bool b) { + (void) p; // no-warning + (void) f; // no-warning + (void) b; // no-warning +} + +static void misra_11_8_const(const char *str) {(void)str;} +static char * misra_11_8(const char *str) { + (void)misra_11_8_const(str); // no-warning + return (char *)str; // 11.8 +} + +#define MISRA_11_9_NULL_1 (1-1) +#define MISRA_11_9_NULL_2 ( void * ) 0 +#define MISRA_11_9_NULL_3 NULL +static void misra_11_9(void) { + int *p1 = (5-5); //11.9 + int *p2 = MISRA_11_9_NULL_2 ; // no-warning + int *p3 = MISRA_11_9_NULL_3 ; // no-warning + if ( p1 == MISRA_11_9_NULL_1 ) //11.9 + { + ; + } + +} + + +static void misra_12_1(void) { + sz = sizeof x + y; // 12.1 + a = (b * c) + d; + a = b << c + d; // 12.1 +} + +static void misra_12_2(u8 x) { + a = x << 8; // 12.2 +} + +static int misra_12_3_v1 = 0, misra_12_3_v2; // 12.3 +static int misra_12_3_v3, misra_12_3_v4; // 12.3 +enum misra_12_3_e1 { M123A1, M123B1, M123C1 }; +enum misra_12_3_e2 { M123A2 = 3, M123B2 = 4, M123C2 }; +typedef enum misra_12_3_e3 { M123A3 , M123B3, M123C3 } misra_12_3_e3_t; +typedef enum { M123A4 , M123B4, M123C4 } misra_12_3_e4_t; +struct misra_12_3_s1 { int a; int b; int c, d; }; // 12.3 +static struct misra_12_3_s1 misra_12_3_s1_inst = { + 3, + 4, 5, + 6, // no warning +}; +typedef struct misra_12_3_s2 { int a; int b; int c, d; } misra_12_3_s2_t; // 12.3 +typedef struct { int a; int b; int c, d; } misra_12_3_s3_t; // 12.3 +static void misra_12_3_fn1(int, int); static int misra_12_3_v5, misra_12_4_v6; // 12.3 8.2 +static void misra_12_3_fn2(int a, int b) // 2.7 +{ int d, e; } // 12.3 +static int misra_12_3_fn3(int a, int b) { return a+b;} static int misra_12_3_v5, misra_12_4_v6; // 12.3 +static void misra_12_3_fn4(const uint32_t value, uint8_t * const y) {} // 2.7 +static void misra_12_3_fn5(const uint32_t * const, const uint8_t) {} // 2.7 8.2 +extern void misra_12_3_fn6(const uint32_t value, uint8_t * const y); +extern uint32_t misra_12_3_fn7(const uint32_t * const, const uint8_t); // 8.2 +#define MISRA_12_3_FN3_1(A, B) (misra_12_3_fn3(A, B)) +#define MISRA_12_3_FN3_2(A, B) (misra_12_3_fn3(A, \ + B)) +#define MISRA_12_3_FN3_2_MSG(x) x, fflush(stderr) +static void misra_12_3(int, int, int); // 8.2 +void misra_12_3(int a, int b, int c) { + int a1, a2; // 12.3 + int a3; int a4; // no warning + int a5 = 9, a6; // 12.3 + int a7, a8 = 11; // 12.3 + int a9 = foo(), a10; // 12.3 + int a11 = a = b = c; // 17.8 + + struct s1 {int a, b;}; int a12, a13; // 12.3 + int a14, a15; misra_12_3_fn3(a14, a15); // 12.3 17.7 + ; int a16, a17; // 12.3 + int a18; int a19, a20; // 12.3 + int a21, a22; int a23; // 12.3 + int a24, // 12.3 + a25; + int a26 + , a27; // 12.3 + int a28 + , // 12.3 + a29; + + struct misra_12_3_s2 a30 = {1, 2}, a31; // 12.3 + struct misra_12_3_s2 a32, a33; // 12.3 + struct misra_12_3_s2 a34, a35 = {1, 2}, a36; // 12.3 + + // cppcheck-suppress uninitStructMember + int a37 = MISRA_12_3_FN3_1(a34, a35), a38; // 12.3 + int a39, a40 = MISRA_12_3_FN3_1(a34, a35); // 12.3 + int a41 = MISRA_12_3_FN3_2(a34, a35), a42; // 12.3 + int a43, a44 = MISRA_12_3_FN3_2(a34, a35); // 12.3 + + MISRA_12_3_FN3_2_MSG(fprintf(stderr, "test\n")); // 12.3 21.6 + // TODO + f((1,2),3); // 17.3 + + // third clause: 2 persistent side effects instead of 1 (14.2) + for (i=0; i<10; i++, j++){} // 12.3 14.2 + for (int i = 0, p = &a1; // 12.3 14.2 + i < 42; + ++i, ++p ) // 12.3 + {} + + // No false positives in local and extern function calls + misra_12_3_fn4(misra_12_3_fn5(&a1, 32), &a1); + misra_12_3_fn4(misra_12_3_fn7(&a1, 32), &a1); + misra_12_3_fn6(misra_12_3_fn5(&a1, 32), &a1); + misra_12_3_fn6(misra_12_3_fn7(&a1, 32), &a1); + misra_12_3_fn7(maxlen, fn(va, unsigned long), false); // 17.3 + misra_12_3_fn8(maxlen, (unsigned long)((uintptr_t)fn(va, void*)), false); // 17.3 + + const struct fun_t + { + int64_t x; + uint32_t y; + } moreFun[2U] = + { + { 900000000000000LL, 0x20000UL }, + { 450000000000000LL, 0x10000UL } + }; +} + +#define MISRA12_4a 2000000000u +#define MISRA12_4b 4000000000u +static void misra_12_4(uint8_t t) { + x = 123456u * 123456u; // 12.4 + x = MISRA12_4a + MISRA12_4b; // 12.4 + x = 0u - 1u; // 12.4 + x = t ? 0u : (0u-1u); // 12.4 + x = (0u==0u) ? 0u : (0u-1u); + x = (0u!=0u) ? 0u : (0u-1u); // 12.4 + x = (0u==0u) ? 0u : (2*(0u-1u)); // 10.4 +} + +struct misra_13_1_t { int a; int b; }; +uint8_t misra_13_1_x = 0; // 8.4 +static void misra_13_1_bar(uint8_t a[2]); +static void misra_13_1(int *p) { + volatile int v; + int a1[3] = {0, (*p)++, 2}; // 13.1 + int a2[3] = {0, ((*p) += 1), 2}; // 13.1 + int a3[3] = {0, ((*p) = 19), 2}; // 13.1 + misra_13_1_bar((uint8_t[2]){ misra_13_1_x++, misra_13_1_x++ } ); // 13.1 + int b[2] = {v,1}; + struct misra_13_1_t c = { .a=4, .b=5 }; // no fp + volatile int vv; + int v = 42; + + int a1[3] = { 0, (*p)++, 2 }; // 13.1 + int a2[2] = { [0]=19, [1]=42 }; + int a3[2] = { [0]=v, [1]=42 }; + int a4[2] = { [0]=0, [1]=(v+=1) }; // 13.1 + int a5[2] = { [0]=0, [1]=(v+1) }; + int a6[2] = { v, 1 }; + int a6[2] = { v >>= 3 }; // 13.1 9.3 + int a7[2] = { v, ++v }; // 13.1 + int a8[1] = { vv }; // TODO: 13.1 Trac #9504 + + struct misra_13_1_t c01 = { 4, 5 }; + struct misra_13_1_t c02 = { 16 == 1, 5+1 }; + struct misra_13_1_t c03 = { (v += 1), 5+1 }; // 13.1 + struct misra_13_1_t c04 = { v <<= 1, 5+1 }; // 13.1 + struct misra_13_1_t c05 = { v += 1, 5+1 }; // 13.1 + struct misra_13_1_t c06 = { (4.5 + 0.5), 1 }; + struct misra_13_1_t c07 = { (4.5 + 0.5), ++v }; // 13.1 + struct misra_13_1_t c08 = { (int)4.5, 5 }; + struct misra_13_1_t c09 = { (int)4.5+(*p)++, 5 }; // 13.1 + struct misra_13_1_t c10 = { (int)4.5, (*p)++ }; // 13.1 + struct misra_13_1_t c11 = { .a=4+1, .b=3/3 }; + struct misra_13_1_t c12 = { .a=4, .b=5 }; + struct misra_13_1_t c13 = { (*v)<<=(int)(4.5), .b=5 }; // 13.1 + struct misra_13_1_t c14 = { (*p)/=(int)(4.5) }; // 13.1 +} + +// Large arrays for R13.1. Size exceeds default Python's max recursion depth. +static uint8_t misra_13_1_large_ok[1024] = { +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF +}; +static uint8_t misra_13_1_large_bad[1024] = { // 13.1 +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, i++, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF +}; + +static void misra_13_3(void) { + x = y++; // 13.3 +} + +#define STRING_DEF_13_4 "This is a string" + +typedef struct +{ + char string[sizeof(STRING_DEF_13_4)]; +} s13_4_t; + +static s13_4_t s13_4 = +{ + .string = STRING_DEF_13_4 // no-warning +}; + +static void misra_13_4(int x, int z) { + int y; + if (x != (y = z)) {} // 13.4 + else {} +} + +static void misra_13_5(void) { + int x = 0; + int y = 0; + if (x && (y++ < 123)){} // 13.5 + if (x || ((y += 19) > 33)){} // 13.5 + if (x || ((y = 25) > 33)){} // 13.5 13.4 + if (x || ((--y) > 33)){} // 13.5 + else {} +} + +static void misra_13_6(void) { + int a = sizeof(x|=42); // 13.6 + a = sizeof(--x); // 13.6 13.3 + return sizeof(x++); // 13.6 +} + +static void misra_14_1(void) { + for (float f=0.1f; f<1.0f; f += 0.1f){} // 14.1 + float a = 0.0f; + int b = 10; + while ((a<100.0f) || (b > 100)) //14.1 + { + a++; + } + do + { + ; + } while ( a < 10.0f ); // no-warning + +} +//13143 +static bool misra_14_1_is_increasing (const double* const x, const size_t n) +{ + double last = -INFINITY; + size_t i = ((size_t) 0); + while ((i < n) && isfinite(x[i]) && (x[i] > last)) { //no-warning for 14_1 + last = x[i]; + i++; + } + return i == n; +} + +static void misra_14_1_compliant1_foo(float x){ + int i = 0; + while(i < x){ // 10.4 + i += x + x; // 10.3 10.4 no-warning for 14_1 + } +} + +static void misra_14_1_compliant2_foo(void){ + int i = 0; + float f = 0f; + while (f < 10 && i < 10) { //10.4 12.1 + float f = 0f; + f = f + i; // 10.3 10.4 no warning for 14_1 + i++; + } +} +static void misra_14_2_init_value(int32_t *var) { + *var = 0; +} +static void misra_14_2_init_value_1(int32_t *var); + +static void misra_14_2_fn1(bool b) { + for (;i++<10;) {} // 14.2 + for (;i<10;dostuff()) {} // 14.2 17.3 + int32_t g = 0; + int g_arr[42]; + g += 2; // no-warning + for (int32_t i2 = 0; i2 < 8; ++i2) { + i2 += 2; // 14.2 + i2 |= 2; // 14.2 + g += 2; + i2 ^= 2; // 14.2 + if (i2 == 2) { + g += g_arr[i2]; // cppcheck-suppress legacyUninitvar + } + misra_14_2_init_value(&i2); // TODO: Fix false negative in function call + } + int i1; + int i2; + for (misra_14_2_init_value(&i1); i1 < 10; ++i1) {} // no-warning + for (misra_14_2_init_value_1(&i2); i2 < 10; ++i2) {} // no-warning + for (misra_14_2_init_value_2(&i2); i2 < 10; ++i2) {} // 17.3 no-warning + + bool abort = false; + for (i = 0; (i < 10) && !abort; ++i) { // 14.2 as 'i' is not a variable + if (b) { + abort = true; + } + } + for (int i = 0; (i < 10) && !abort; ++i) { // no warning + if (b) { + abort = true; + } + } + for (;;) {} // no-warning + + int x = 10; + for (int i = x; i < 42; i++) { + x++; // no warning + } + // 1st clause item 2 + loop counter modification + for(x = 0; x < 10; x++) { + x++; // 14.2 + } + // third clause: 2 persistent side effects instead of 1 (14.2) + for (int i = 0; i < 10; i++, x++) { // 12.3 14.2 + } + + // 2 loop counters, there shall be only 1 + for(int i=0, j=0; (i<10) && (j<10); i++, j++) { // 12.3 14.2 + } + + for (int i = (x - 3); i < 42; i++) { + x ^= 3; // no warning + } + + for (int i = 0, j = 19; i < 42; i++) { // 12.3 14.2 + i += 12; // 14.2 + j /= 3; // TODO: 14.2 + } + + for (int i = 0; i < 19; i++) { + for (int j = 0; j < 42; j++) { + i--; // 14.2 + for (int k = j; k > 5; k--) { + i++; // 14.2 + for (int h = 35; h > 5; k++) // 14.2 + {} + } + } + } + + static struct + { + uint16_t block; + bool readSuccessful; + int32_t i; + } + opState; + for (opState.block = 0U; opState.block < 10U; opState.block++) {;} //no-warning + + for (misra_14_2_init_value(&opState.i); opState.i < 10; ++opState.i) {} //no-warning +} +static void misra_14_2_fn2(void) +{ + int y = 0; + + // Handle cases when i is not treated as loop counter according MISRA + // definition. + for (int i = 0, j = 19; y < 10, --j > 10; y++, j--) { // 14.2 12.3 + i++; // no warning + } + for (int i = 0, j = 19; y < 10, --j > 10; y++, j--) { // 14.2 12.3 + i++; // no warning + } + // 1st clause is not empty, but is not used in 2nd and 3rd clause + for (int i = 0; y < 10; y++) { // 14.2 + i++; // no warning + } + for (; y < 10; y++) {} // without 1st clause, no error + for (int i = 0; i < 10; y++) { // 14.2 + i++; // no warning + } + for (int i = 0; y < 10; i++) { // 14.2 + i++; // no warning + } + for (int i = 0; i < 10; (y+=i)) { // 14.2 + i++; // no warning + } + + // i is a loop counter according MISRA definition + for (int i = 0; i < 10; i++) { + i++; // 14.2 + if (++i > 5) { // 14.2 + break; + } + } + for (int i = 0; i < 10; (i+=42)) { + i++; // 14.2 + } + for (int i = 0; i < 10; (i|=y)) { + i++; // 14.2 + } + + return 0; +} + +struct { + unsigned int x:1; + unsigned int y:1; +} r14_4_struct; // 8.4 +static void misra_14_4(bool b) { + if (x+4){} //config + else {} + + if (b) {} + else {} + + if (r14_4_struct.x) {} + + // #12079 + if (z) {} //config +} + +// #12417 +struct bar_12417{ int a; }; +static int foo_12417(void){ + int ret = 1; + if (sizeof(struct bar_12417) == 0U){ // no warning for misra-config + ret = 0; + } + return ret; +} + +static void misra_15_1(void) { + goto a1; // 15.1 +a1: +} + +static void misra_15_2(void) { +label: + goto label; // 15.2 15.1 +} + +static void misra_15_3(int a) { + int x = 0; + int y; + if (x!=0) { + goto L1; // 15.3 15.1 + if (y!=0) { + L1: + } else {} + } else {} + + switch (x) { + case 0: + if (x == y) { + goto L2; // 15.3 15.1 + } + goto L2; // 15.3 15.1 + L3: + foo(); + if (a == 0x42) { + // Compliant: + goto L3; // 15.1 15.2 + } + break; + case 1: + y = x; + L2: + ++x; + break; + default: + break; + } +} + +static void misra_15_4(void) { + misra_15_4_label: + return; + + int x = 0; + int y = 0; + int z = 0; + + // Break on different loop scopes + for (x = 0; x < 42; ++x) { + if (x==1) { + break; + } + for (y = 0; y < 42; ++y) { // 15.4 + if (y==1) { + break; + } + if (y==2) { + break; + } + for (z = 0; y < 42; ++z) { // 14.2 + if (z==1) { + break; + } + } + } + } + + // Break in while loop + do { // 15.4 + if(x == 1) { + break; + } + if(x == 2) { + break + } + x++; + } while(x != 42); + + // Break and goto in same loop + for (int x = 0; x < 10; ++x) { // 15.4 + if (x == 1) { + break; + } + if (x == 2) { + goto misra_15_4_label; // 15.1 15.2 + } + } + + // Inner loop uses goto + for (x = 0; x < 42; ++x) { // 15.4 + if (x==1) { + break; + } + for (y = 0; y < 42; ++y) { + if (y == 1) { + goto misra_15_4_label; // 15.1 15.2 + } + } + } + + // Allow switch with multiple breaks inside loop + for (x = 0; x < 42; ++x) { + switch (x) { + case 1: + break; + default: + break; + } + } + + // Do not allow switch with multiple gotos inside loop + for (x = 0; x < 42; ++x) { // 15.4 + switch (x) { + case 1: + goto misra_15_4_label; // 15.1 15.2 + break; + default: + goto misra_15_4_label; // 15.1 15.2 + break; + } + } +} + +static int misra_15_5(int x) { + if (x!=0) { + return 1; // 15.5 + } else {} + return 2; +} + +static void misra_15_6(int x) { + if (x!=0); // 15.6 + else{} + +#if A>1 // 20.9 + (void)0; +#endif + +#if A > 0x42 // 20.9 + if (true) { + (void)0; + } + if (true) +#endif + { (void)0; } // no-warning + + do {} while (x<0); // no-warning +} + +static void misra_15_6_fp(void) +{ + uint8_t value = 0U; + do // Test + { + value++; + } + while (value < 2U); +} + +#if defined(M_20_9) && M_20_9 > 1 // no-warning (#10380) +#endif + +static void misra_15_7(int x, int a, int b) { + uint32_t var = 0; + uint32_t var2 = 0; + + if (x!=0){} // no-warning + if (x!=0){} else if(x==1){} // 15.7 + if (x!=0){} else if(x==1){}else{;} // no-warning + + if (x!=0) + { + } + else + { + var = 5u; + + if (var != 5u) + { + var2 = 10u; + } // no-warning + } + + if (a==2) {} else if (b==4) {} // 15.7 + if (a==2) {} else { if (b==4) {} } // no-warning +} + +static void misra_16_1(int32_t i) { + switch (i) { + int8_t x; // 16.1 + default: // 16.3 16.5 + break; + if (i != 18) {} // 16.1 + case 1: // 16.3 + break; + } +} + +static void misra_16_2(int y) { + switch (x) { + default: + break; + case 1: + while (y>4) { + case 2: break; // 16.2 + } + break; + } +} + +static void misra_16_3(int b) { + int a; + switch (x) { + case 1: + case 2: + a=1; + case 3: // 16.3 + a=2; + // fallthrough + case 5: + break; + case 7: + a=3; + [[fallthrough]]; + case 8: + a=4; + break; + case 9: + if (a==b) { + break; + } + case 10: // 16.3 + return; // 15.5 + case 11: + { break; } + case 12: + default: break; + } + + switch (x) { + case 1: // comment 1 + { + a = 1; + break; + } + case 2: // comment 2 + { + a = 2; + break; + } + default: + { + break; + } + } + + switch (x) { + case 1: + break; + default: // 16.5 + x++; + case 19: // 16.3 + break; + case 20: + x + 2; + x + 3; + break; + } + switch (x) { // 16.6 + default:; + } // 16.3 + + switch (x) { default:; } // 16.3 16.6 + + switch (x) { + case 20: + x + 2; + x + 3; + break; + case 21: + x + 2; + x + 3; + break; + default: + ; + } // 16.3 + + switch (x) { // 16.4 16.6 + case 1: + x++; + break; + case 2: + x++; + } // 16.3 + + #define M_16_3(a,b,default) { (a), (b), (default) }, +} + +static void misra_16_4(void) { + switch (x) { // 16.4 + case 1: + break; + case 2: + break; + } +} + +static void misra_16_5(void) { + switch (x) { + case 1: + break; + default: // 16.5 + break; + case 2: + break; + } +} + +static void misra_16_6(void) { + switch (x) { // 16.6 + default: + break; + } + + switch (x) { + case 1: break; + case 2: break; + default: break; + } + + // No 16 6 in this switch: + switch (x) { + case A: return 1; // 15.5 + case B: return 1; // 15.5 + case C: return 1; // 15.5 + default: return 2; // 15.5 + } +} + +static void misra_16_7(void) { + switch (x != 123) { // 16.7 + case 1: + break; + default: + break; + } +} + +static void misra_17_1(void) { + va_list(); // 17.1 17.7 + va_arg(); // 17.1 + va_start(); // 17.1 + va_end(); // 17.1 + va_copy(); // 17.1 17.3 +} + +static void misra_17_2_ok_1(void) { ; } +static void misra_17_2_ok_2(void) { + misra_17_2_ok_1(); // no-warning +} +static void misra_17_2_1(void) { + misra_17_2_ok_1(); // no-warning + misra_17_2_1(); // 17.2 + misra_17_2_ok_2(); // no-warning + misra_17_2_1(); // 17.2 +} +static void misra_17_2_2(void) { + misra_17_2_3(); // 17.2 +} +static void misra_17_2_3(void) { + misra_17_2_4(); // 17.2 +} +static void misra_17_2_4(void) { + misra_17_2_2(); // 17.2 + misra_17_2_3(); // 17.2 +} + +static void misra_17_2_5(void) { + misra_17_2_ok_1(); // no-warning + misra_17_2_5(); // 17.2 + misra_17_2_1(); // no-warning +} + +bool (*dostuff)(); //8.2 8.4 +struct s173{ + int a; + int b; +} +static void misra_17_3(void) { + if (dostuff()) {} // no-warning + bool a = dostuff(); // no-warning + dostuff2(); // 17.3 + s173 ( *misra_8_2_p_a ) (void); // no-warning +} + +static void misra_config(const char* str) { + if (strlen(str) > 3){} //10.4 + if (sizeof(int) > 1){} //10.4 +} + +static void misra_17_6(int x[static 20]) {(void)x;} // 17.6 + +static int calculation(int x) { return x + 1; } +static void misra_17_7(void) { + calculation(123); // 17.7 + int (*calc_ptr)(int) = &calculation; + calc_ptr(123); // 17.7 + int y = calc_ptr(123); +} + +static void misra_17_8(int x) { + x = 3; // 17.8 +} + +static void misra_18_4(void) +{ + int b = 42; + int *bp = &b; + bp += 1; // 18.4 + bp -= 2; // 18.4 + int *p = bp - 2; // 18.4 + int *ab = &b + 1; // 18.4 + p = bp + p; // 18.4 + bp = 1 + p + 1; // 18.4 + b += 19; // no-warning + b = b + 9; // no-warning +} + +static void misra_18_5(void) { + int *** p; // 18.5 +} + +struct { + uint16_t len; + struct { + uint8_t data_1[]; // 18.7 + } nested_1; + struct named { + struct { + uint8_t len_1; + uint32_t data_2[]; // 18.7 + } nested_2; + uint8_t data_3[]; // 18.7 + } nested_3; +} r18_7_struct; // 8.4 +struct { + uint16_t len; + int (*array_param_func_ptr)(char const *argv[], int argc); // no-warning + uint8_t data_1[ 19 ]; + uint8_t data_2[ ]; // 18.7 +} r18_7_struct; // 8.4 + +typedef enum { + R18_8_ENUM_CONSTANT_0, + R18_8_ENUM_CONSTANT_1, +} r18_8_enum; + +static void misra_18_8(int x) { + int buf1[10]; + int buf2[sizeof(int)]; + int vla[x]; // 18.8 + // #9498 + int vlb[y]; // config + static const unsigned char arr18_8_1[] = UNDEFINED_ID; + static uint32_t enum_test_0[R18_8_ENUM_CONSTANT_0] = {0}; +} + +union misra_19_2 { }; // 19.2 + +#include "notfound.h" // 20.1 + +#define int short // 20.4 +#define inline "foo" // no warning in C90 standard +#undef X // 20.5 + +#define M_20_7_1(A) (A+1) // 20.7 +#define M_20_7_2(A,B) (1+AB+2) // no warning +#define M_20_7_3(A) ((A)+A) // 20.7 +#define M_20_7_4(A) x##A // 20.10 this test was written to see there are not FPs +#define M_20_7_5(A,B) f(A, B) // no warning +#define M_20_7_6(x) a ## x = ( x ) // 20.10 +#define M_20_7_7(x) a = # x // 20.10 +#define M_20_7_8(x, fn) a = fn ( # x ) // 20.7 20.10 +#define M_20_7_9(x, fn) a = (fn) ( # x ) // 20.10 +#define M_20_7_10(A, B) (A " " B) +#define M_20_7_11(A, B, C) (A " " B " " C) +#define M_20_7_12(A, B, C) (A " " B + C) // 20.7 +#define M_20_7_13(A, B, C) (A + B " " C) // 20.7 +#define M_20_7_14(STRING1, STRING2) (STRING1 " " STRING2) +#define M_20_7_15(STRING1, STRING2, STRING3) (STRING1 " " STRING2 " " STRING3) +#define M_20_7_16(STRING1, STRING2, STRING3) (STRING1 " " STRING2 + STRING3) // 20.7 +#define M_20_7_17(STRING1, STRING2, STRING3) (STRING1 + STRING2 " " STRING3) // 20.7 + +// Compliant: M is a structure member name, not an expression +struct { int a; } struct_20_7_s; // 8.4 +#define M_20_7_6(M) struct_20_7.M +#define M_20_7_7(M) (struct_20_7).M + +#define MUL(a ,b ) ( a * b ) // 20.7 + +#if __LINE__ // 20.8 +#elif 2+5 // 20.8 +#elif 2-2 +#endif + +#if A // 20.9 +#elif B || C // 20.9 +#endif + +#define M_20_10(a) (#a) // 20.10 + +#define M_20_11(a) # a ## 1 // 20.11 20.10 + +#define M_20_12_AA 0xffff +#define M_20_12_BB(x) (x) + wow ## x // 20.12 20.10 +misra_20_12 = M_20_12_BB(M_20_12_AA); + +#else1 // 20.13 + +#ifdef A +# define somethingis 5 // no warning +# define func_20_13(v) (v) // no warning +#else +# definesomethingis 6 // 20.13 +# def fun_2013(v) () // 20.13 +#endif + +#define _Incompatible 0xdeadbeef // 21.1 +#define __Incompatible 0xdeadbeef // 21.1 +#define __starts_with_lower 0xdeadbeef // 21.1 +#define __MY_HEADER_ // 21.1 +#define _macro_starts_with_lower 1 // no warning +static int _file_scope_id_21_1 = 42; // no warning +static int _file_scope_id_21_1_fn(void) { return 42; } // no warning +static int misra_21_1(void) { + int _a = 42; // no warning: only directives affected + errno = EINVAL; // no warning + _a ++; // no warning + _exit(1); // 17.3 no warning + return _a; // no warning +} +static int _misra_21_1_2(void); // no warning +#define errno 11 // 21.1 +#undef errno // 20.5 + +#define __BUILTIN_SOMETHING 123 // 21.2 21.1 +extern void *memcpy ( void *restrict s1, const void *restrict s2, size_t n ); // 21.2 8.14 + +static void misra_21_3(void) { + p1=malloc(10); // 21.3 + p2=calloc(10); // 21.3 + realloc(10); // 21.3 + free(p1); // 21.3 +} + +static void misra_21_7(void) { + (void)atof(str); // 21.7 + (void)atoi(str); // 21.7 + (void)atol(str); // 21.7 + (void)atoll(str); // 21.7 +} + +static void misra_21_8(void) { + abort(); // 21.8 + (void)getenv("foo"); // 21.8 + exit(-1); // 21.8 +} + +static void misra_21_9(void) { + (void)bsearch(key,base,num,size,cmp); // 21.9 + qsort(base,num,size,cmp); // 21.9 +} + +static void misra_21_12(void) { + int rc; + fexcept_t f; // 21.12 + rc = feclearexcept(1); // 21.12 + rc = fegetexceptflag(&f, 1); // 21.12 + rc = feraiseexcept(1); // 21.12 + rc = fesetexceptflag(&f, 1); // 21.12 + rc = fetestexcept(1); // 21.12 +} + +static void misra_21_14(uint8_t *x) { + (void)strcpy(x, "123"); + (void)memcmp(x, y, 100); // 21.14 + (void)memcmp("abc", y, 100); // 21.14 21.16 +} + +static void misra_21_15(uint8_t *x, uint16_t *y) { + (void)memcpy(x, y, 10); // 21.15 + (void)memmove(x, y, 10); // 21.15 + (void)memcmp(x, y, 10); // 21.15 +} + +struct misra_21_16_S { int a; int b; }; +static void misra_21_16_f1(struct misra_21_16_S *s1, struct misra_21_16_S *s2) { + (void)memcmp(s1, s2, 10); // 21.16 +} +static void misra_21_16_f2(char *x, char *y) { + (void)memcmp(x, y, 10); // 21.16 +} +typedef enum { R21_16_A, R21_16_B} r21_16_enum; +static void misra_21_16_f3(void) { + int const a[2] = {0}; + int const b[2] = {0}; + (void)memcmp(a, b, 2); // no-warning + uint8_t const c[2] = {0}; + uint8_t const d[2] = {0}; + (void)memcmp(c, d, 2); // no-warning + bool const e[2] = {0}; + bool const f[2] = {0}; + (void)memcmp(e, f, 2); // no-warning + r21_16_enum const g[2] = {0}; + r21_16_enum const h[2] = {0}; + (void)memcmp(g, h, 2); // no-warning + char const i[2] = {0}; + char const j[2] = {0}; + (void)memcmp(i, j, 2); // 21.16 +} + +static void misra_21_19(void) { + char *s = setlocale(LC_ALL,0); // 21.19 + const struct lconv *conv = localeconv (); + conv->decimal_point = "^"; // 21.19 +} + +static void misra_21_20(void) { + const char *res1 = setlocale ( LC_ALL, 0 ); + (void) setlocale ( LC_MONETARY, "French" ); + if (res1) {} // 21.20 14.4 +} + +static void misra_21_21(void) { + (void)system("ls"); // 21.21 +} + +static void misra_22_5(FILE *f) { + int x = *f; // 22.5 + int y = f->pos; // 22.5 +} + +static void misra_22_7(char ch) +{ + if (EOF == ch) {} // 22.7 +} + +static void misra_22_8(void) +{ + (void)strtoll("123", NULL, 10); // 22.8 + if (errno == 0) {} +} + +static void misra_22_9(void) +{ + errno = 0; + (void)strtoll("123", NULL, 10); // 22.9 +} + +static void misra_22_10(void) +{ + errno = 0; + f = atof ( "A.12" ); // 21.7 + if ( 0 == errno ) {} // 22.10 + + errno = 0; + f = strtod ( "A.12", NULL ); + if ( 0 == errno ) {} + + // #10855 + f = strtol(numbuf, 0, (formatHex == 0U) ? 0 : 16); + if (errno != 0) {} + + // #11752 + #define NULL_PTR ((void*)0) + f = strtod(inStr, NULL_PTR); + if(errno != 0) {} +} + +// #12448 +static void check_misra_config(void) +{ + if (sizeof(struct bar) == 0U) {} //no warning + if (sizeof(int abc) == 0U) {} //no warning + if (sizeof(xyz) == 0U) {} //no warning + if (sizeof(const pqr) == 0U) {} //no warning + if (sizeof(const int* const pqrs) == 0U) {} //no-warning +} diff --git a/addons/test/misra/misra-test.cpp b/addons/test/misra/misra-test.cpp new file mode 100644 index 00000000000..0aa9a0b9d1c --- /dev/null +++ b/addons/test/misra/misra-test.cpp @@ -0,0 +1,25 @@ +// #8441 +class C { + int a; + int b; + C(void) : a(1), b(1) { c; } +}; + +class misra_21_1_C { + public: + misra_21_1_C operator=(const misra_21_1_C &); +}; + +class C2 { +public: + C2(void); +private: + void* f; +}; +C2::C2(void) : f(NULL) {} + +static void test_misra_21_1_crash(void) +{ + auto misra_21_1_C a, b; // 12.3 + a = b; +} diff --git a/addons/test/misra/misra-test.h b/addons/test/misra/misra-test.h new file mode 100644 index 00000000000..b455134893c --- /dev/null +++ b/addons/test/misra/misra-test.h @@ -0,0 +1,13 @@ +#ifndef MISRA_TEST_H +#define MISRA_TEST_H +struct misra_h_s { int foo; }; +bool test(char *a); // OK +int misra_8_2_no_fp(int a); +void misra_8_4_bar(void); +// #12978 +typedef struct m8_4_stErrorDef +{ + uint8_t ubReturnVal; +} m8_4_stErrorDef; +extern const m8_4_stErrorDef * m8_4_pubTestPointer; +#endif // MISRA_TEST_H diff --git a/addons/test/misra/misra2012_rules_dummy_ascii.txt b/addons/test/misra/misra2012_rules_dummy_ascii.txt new file mode 100644 index 00000000000..8880ca56044 --- /dev/null +++ b/addons/test/misra/misra2012_rules_dummy_ascii.txt @@ -0,0 +1,5 @@ +Appendix A Summary of guidelines +Rule 1.1 +Text of rule 1.1 +Rule 1.2 +Text of rule 1.2 diff --git a/addons/test/misra/misra2012_rules_dummy_utf8.txt b/addons/test/misra/misra2012_rules_dummy_utf8.txt new file mode 100644 index 00000000000..5f96010fa03 --- /dev/null +++ b/addons/test/misra/misra2012_rules_dummy_utf8.txt @@ -0,0 +1,5 @@ +Appendix A Summary of guidelines +Rule 1.1 +Text of rule 1.1, utf8 test: ∑ +Rule 1.2 +Text of rule 1.2 diff --git a/addons/test/misra/misra2012_rules_dummy_windows1250.txt b/addons/test/misra/misra2012_rules_dummy_windows1250.txt new file mode 100644 index 00000000000..89480cc6095 --- /dev/null +++ b/addons/test/misra/misra2012_rules_dummy_windows1250.txt @@ -0,0 +1,5 @@ +Appendix A Summary of guidelines +Rule 1.1 +Text of rule 1.1, windows1250 test: +Rule 1.2 +Text of rule 1.2 diff --git a/addons/test/misra/misra_rules_dummy.txt b/addons/test/misra/misra_rules_dummy.txt new file mode 100644 index 00000000000..4ae6057aff7 --- /dev/null +++ b/addons/test/misra/misra_rules_dummy.txt @@ -0,0 +1,22 @@ +Appendix A Summary of guidelines +Rule 3.1 Required +R3.1 text. +Rule 4.1 Required +R4.1 text. +Rule 10.4 Mandatory +R10.4 text. +Rule 11.5 Advisory +R11.5 text. +Rule 15.5 Advisory +R15.5 text. +Rule 15.6 Required +R15.6 text. +Rule 17.7 Required +R17.7 text. +Rule 20.1 Advisory +R20.1 text. +Rule 21.3 Required +R21.3 text. +Rule 21.4 +R21.4 text. + diff --git a/addons/test/misra/misra_rules_empty_lines.txt b/addons/test/misra/misra_rules_empty_lines.txt new file mode 100644 index 00000000000..2a47bb244d9 --- /dev/null +++ b/addons/test/misra/misra_rules_empty_lines.txt @@ -0,0 +1,21 @@ +Appendix A Summary of guidelines + + +Rule 1.1 +Add this rule and parse to next, skipping empty lines. + + + + +Rule 1.2 +Rule text. + +Rule 1.3 +There is 3 rules. + + + + + + + diff --git a/addons/test/misra/misra_rules_multiple_lines.txt b/addons/test/misra/misra_rules_multiple_lines.txt new file mode 100644 index 00000000000..24ab0f2af41 --- /dev/null +++ b/addons/test/misra/misra_rules_multiple_lines.txt @@ -0,0 +1,24 @@ +Appendix A Summary of guidelines + +Rule 1.1 +Multiple +lines +text. +Rule 1.2 +Multiple lines +text. +Rule 1.3 Required +Multiple +lines +text. +Rule 1.4 +Should +Starts from lowercase letter. +Rule 1.5 +Should + starts from lowercase letter. +Rule 1.6 +Can + +contain empty lines. + diff --git a/addons/test/misra/misra_rules_structure.txt b/addons/test/misra/misra_rules_structure.txt new file mode 100644 index 00000000000..a8223fde948 --- /dev/null +++ b/addons/test/misra/misra_rules_structure.txt @@ -0,0 +1,23 @@ +Here can be any text. + +Incorrect definitions: +Appendix A +Appendix A Summary: + +Rule 1.1 +Error! + +Here we go: +Appendix A Summary of guidelines + +Rule 1.2 + Rule text. + +Rule 2.1 +Rule text for 2.1. + +Stop parsing after this line: +Appendix B + +Rule 1.3 +Error! diff --git a/addons/test/misra/suppressions.txt b/addons/test/misra/suppressions.txt new file mode 100644 index 00000000000..139e088552e --- /dev/null +++ b/addons/test/misra/suppressions.txt @@ -0,0 +1,6 @@ +misra-c2012-21.6:*/misra-suppressions1-test.c:7 +misra-c2012-17.3 +misra-c2012-8.4:*/misra-suppressions1-test.c +misra-c2012-4.1:*/misra-suppressions2-test.c +misra-c2012-8.4:*/misra-suppressions2-test.c +misra-c2012-19.2:*/misra-suppressions2-test.c diff --git a/addons/test/misra_test.py b/addons/test/misra_test.py new file mode 100644 index 00000000000..55a24cb4b27 --- /dev/null +++ b/addons/test/misra_test.py @@ -0,0 +1,244 @@ +# Running the test with Python 3: +# Command in cppcheck directory: +# PYTHONPATH=./addons python3 -m pytest addons/test/misra_test.py + +import pytest +import re +import sys +import os + +from .util import dump_create, dump_remove, convert_json_output +from addons.misra import C11_STDLIB_IDENTIFIERS, C99_STDLIB_IDENTIFIERS,C90_STDLIB_IDENTIFIERS, isStdLibId, isKeyword + +TEST_SOURCE_FILES = [os.path.join('addons','test','misra','misra-test.c')] + + +def remove_misra_config(s:str): + ret = '' + for line in s.splitlines(): + if '[misra-config]' not in line: + ret += line + '\n' + return ret + + +@pytest.fixture(scope="function") +def checker(): + from addons.misra import MisraChecker, MisraSettings, get_args_parser + parser = get_args_parser() + args = parser.parse_args([]) + settings = MisraSettings(args) + return MisraChecker(settings) + + +# FIXME: files are generates in the source tree so it will cause issues if tests are run with xdist. +@pytest.fixture +def test_files(): + for f in TEST_SOURCE_FILES: + dump_create(f) + yield + for f in TEST_SOURCE_FILES: + dump_remove(f) + + +def test_loadRuleTexts_structure(checker): + checker.loadRuleTexts("./addons/test/misra/misra_rules_structure.txt") + assert(checker.ruleTexts.get(101, None) is None) + assert(checker.ruleTexts[102].text == "Rule text.") + assert(checker.ruleTexts.get(103, None) is None) + assert(checker.ruleTexts[201].text == "Rule text for 2.1.") + assert(checker.ruleTexts.get(202, None) is None) + + +def test_loadRuleTexts_empty_lines(checker): + checker.loadRuleTexts("./addons/test/misra/misra_rules_empty_lines.txt") + assert(len(checker.ruleTexts) == 3) + assert(len(checker.ruleTexts[102].text) == len("Rule text.")) + + +def test_loadRuleTexts_mutiple_lines(checker): + checker.loadRuleTexts("./addons/test/misra/misra_rules_multiple_lines.txt") + assert(checker.ruleTexts[101].text == "Multiple lines text.") + assert(checker.ruleTexts[102].text == "Multiple lines text.") + assert(checker.ruleTexts[103].text == "Multiple lines text.") + assert(checker.ruleTexts[104].text == "Should") + assert(checker.ruleTexts[105].text == "Should starts from lowercase letter.") + assert(checker.ruleTexts[106].text == "Can contain empty lines.") + + +def test_verifyRuleTexts(checker, capsys): + checker.loadRuleTexts("./addons/test/misra/misra_rules_dummy.txt") + checker.verifyRuleTexts() + captured = capsys.readouterr().out + assert("21.3" not in captured) + assert("1.3" in captured) + + +def test_rules_misra_severity(checker): + checker.loadRuleTexts("./addons/test/misra/misra_rules_dummy.txt") + assert(checker.ruleTexts[1004].misra_severity == 'Mandatory') + assert(checker.ruleTexts[401].misra_severity == 'Required') + assert(checker.ruleTexts[1505].misra_severity == 'Advisory') + assert(checker.ruleTexts[2104].misra_severity == '') + + +def test_json_out(checker, capsys, test_files): + sys.argv.append("--cli") + checker.loadRuleTexts("./addons/test/misra/misra_rules_dummy.txt") + checker.parseDump("./addons/test/misra/misra-test.c.dump") + captured = capsys.readouterr() + captured = captured.out.splitlines() + sys.argv.remove("--cli") + json_output = convert_json_output(captured) + assert("Mandatory" in json_output['c2012-10.4'][0]['extra']) + assert("Required" in json_output['c2012-21.3'][0]['extra']) + assert("Advisory" in json_output['c2012-20.1'][0]['extra']) + + +def test_rules_cppcheck_severity(checker, capsys, test_files): + checker.loadRuleTexts("./addons/test/misra/misra_rules_dummy.txt") + checker.parseDump("./addons/test/misra/misra-test.c.dump") + captured = capsys.readouterr().err + assert("(error)" not in remove_misra_config(captured)) + assert("(warning)" not in captured) + assert("(style)" in captured) + +def test_rules_cppcheck_severity_custom(checker, capsys, test_files): + checker.loadRuleTexts("./addons/test/misra/misra_rules_dummy.txt") + checker.setSeverity("custom-severity") + checker.parseDump("./addons/test/misra/misra-test.c.dump") + captured = capsys.readouterr().err + assert("(error)" not in remove_misra_config(captured)) + assert("(warning)" not in captured) + assert("(style)" not in captured) + assert("(custom-severity)" in captured) + +def test_rules_suppression(checker, capsys): + test_sources = ["addons/test/misra/misra-suppressions1-test.c", + "addons/test/misra/misra-suppressions2-test.c"] + + for src in test_sources: + re_suppressed= r"\[%s\:[0-9]+\]" % src + dump_create(src, "--suppressions-list=addons/test/misra/suppressions.txt","--inline-suppr") + checker.parseDump(src + ".dump") + captured = capsys.readouterr().err + found = re.search(re_suppressed, captured) + assert found is None, 'Unexptected output:\n' + captured + dump_remove(src) + +def test_arguments_regression(): + args_ok = ["-generate-table", + "--rule-texts=./addons/test/assets/misra_rules_multiple_lines.txt", + "--verify-rule-texts", + "-t=foo", "--template=foo", + "--suppress-rules=15.1", + "--quiet", + "--cli", + "--no-summary", + "--show-suppressed-rules", + "-P=src/", "--file-prefix=src/", + "--severity=misra-warning"] + # Arguments with expected SystemExit + args_exit = ["--non-exists", "--non-exists-param=42", "-h", "--help"] + + from addons.misra import get_args_parser + + # sys.argv contains all pytest arguments - so clear all existing arguments first and restore afterwards + sys_argv_old = sys.argv + sys.argv = [sys.argv[0]] + + try: + for arg in args_exit: + sys.argv.append(arg) + with pytest.raises(SystemExit): + parser = get_args_parser() + parser.parse_args() + sys.argv.remove(arg) + + for arg in args_ok: + sys.argv.append(arg) + try: + parser = get_args_parser() + parser.parse_args() + except SystemExit: + pytest.fail("Unexpected SystemExit with '%s'" % arg) + sys.argv.remove(arg) + finally: + sys.argv = sys_argv_old + + +def test_read_ctu_info_line(checker): + assert checker.read_ctu_info_line('{') is None + assert checker.read_ctu_info_line('{"summary":"123"}') is None + assert checker.read_ctu_info_line('{"data":123}') is None + assert checker.read_ctu_info_line('{"summary":"123","data":123}') is not None + +def test_platform(checker): + test_file = os.path.join('addons','test','misra','misra-test.c') + dump_create(test_file, "--language=c++") + checker.parseDump(test_file + ".dump") + assert checker.is_cpp is True + + dump_create(test_file, "--language=c") + checker.parseDump(test_file + ".dump") + assert checker.is_cpp is False + +def test_std99_identifiers(): + for headerfile in C90_STDLIB_IDENTIFIERS: + for identifier in C90_STDLIB_IDENTIFIERS[headerfile]: + assert identifier in C99_STDLIB_IDENTIFIERS[headerfile], f"{identifier} of C90 not found in C99_STDLIB_IDENTIFIERS" + +def test_stdC11_identifiers(): + for headerfile in C90_STDLIB_IDENTIFIERS: + for identifier in C90_STDLIB_IDENTIFIERS[headerfile]: + assert identifier in C99_STDLIB_IDENTIFIERS[headerfile], f"{identifier} of C90 not found in C11_STDLIB_IDENTIFIERS" + for headerfile in C99_STDLIB_IDENTIFIERS: + for identifier in C99_STDLIB_IDENTIFIERS[headerfile]: + assert identifier in C11_STDLIB_IDENTIFIERS[headerfile], f"{identifier} of C99 not found in C11_STDLIB_IDENTIFIERS" + +def test_isStdLibId(): + # Check that Identifiers from C90 are correctly classified + assert isStdLibId("assert", 'c89') is True + assert isStdLibId("assert", 'c99') is True + assert isStdLibId("assert", 'c11') is True + assert isStdLibId("assert", 'c23') is True + + # Check that Identifiers from C99 are correctly classified + assert isStdLibId("UINT32_C", 'c89') is False + assert isStdLibId("UINT32_C", 'c99') is True + assert isStdLibId("UINT32_C", 'c11') is True + assert isStdLibId("UINT32_C", 'c23') is True + + # Check that Identifiers from C11 are correctly classified + assert isStdLibId("sprintf_s", 'c89') is False + assert isStdLibId("sprintf_s", 'c99') is False + assert isStdLibId("sprintf_s", 'c11') is True + assert isStdLibId("sprintf_s", 'c23') is True + + # Function Defaulting to C99 + assert isStdLibId("assert") is True + assert isStdLibId("UINT32_C") is True + assert isStdLibId("sprintf_s") is False + +def test_isKeyword(): + # Check that Keywords from C90 are correctly classified + assert isKeyword("if", 'c89') is True + assert isKeyword("if", 'c99') is True + assert isKeyword("if", 'c11') is True + assert isKeyword("if", 'c23') is True + + # Check that Keywords from C99 are correctly classified + assert isKeyword("inline", 'c89') is False + assert isKeyword("inline", 'c99') is True + assert isKeyword("inline", 'c11') is True + assert isKeyword("inline", 'c23') is True + + # Check that Keywords from C11 are correctly classified + assert isKeyword("static_assert", 'c89') is False + assert isKeyword("static_assert", 'c99') is False + assert isKeyword("static_assert", 'c11') is True + assert isKeyword("static_assert", 'c23') is True + + # Function Defaulting to C99 + assert isKeyword("if") is True + assert isKeyword("inline") is True + assert isKeyword("static_assert") is False diff --git a/addons/test/naming_test.c b/addons/test/naming_test.c new file mode 100644 index 00000000000..bf021b87125 --- /dev/null +++ b/addons/test/naming_test.c @@ -0,0 +1,5 @@ +// To test: +// ~/cppcheck/cppcheck --dump naming_test.c && python ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.c.dump + +// Should not crash when there is no name +void func(int number, int); diff --git a/addons/test/naming_test.cpp b/addons/test/naming_test.cpp new file mode 100644 index 00000000000..07297dbbf27 --- /dev/null +++ b/addons/test/naming_test.cpp @@ -0,0 +1,11 @@ +// To test: +// ~/cppcheck/cppcheck --dump naming_test.cpp && python ../naming.py --var='[a-z].*' --function='[a-z].*' naming_test.cpp.dump + +// No error for mismatching Constructor/Destructor names should be issued, they can not be changed. +class TestClass1 +{ + TestClass1() {} + ~TestClass1() {} + TestClass1(const TestClass1 &) {} + TestClass1(TestClass1 &&) {} +}; diff --git a/addons/test/path1/misra-suppressions1-test.c b/addons/test/path1/misra-suppressions1-test.c new file mode 100644 index 00000000000..59c77598e8f --- /dev/null +++ b/addons/test/path1/misra-suppressions1-test.c @@ -0,0 +1,33 @@ +// To test: +// ../../cppcheck --suppressions-list=suppressions.txt --dump misra-suppressions*-test.c && python ../misra.py misra-suppressions*-test.c.dump +// There should be no violations reported + +// This needs to stay at line number 7 to make the test pass +// If it is changed update suppressions.txt with the new line number +#include //21.6 + +extern int misra_5_2_var_hides_var______31x; +static int misra_5_2_var_hides_var______31y;//5.2 +static int misra_5_2_function_hides_var_31x; +void misra_5_2_function_hides_var_31y(void) {}//5.2 +void foo(void) +{ + int i; + switch(misra_5_2_func1()) //16.4 16.6 + { + case 1: + { + do + { + for(i = 0; i < 10; i++) + { + if(misra_5_2_func3()) //14.4 + { + int misra_5_2_var_hides_var_1____31x; + int misra_5_2_var_hides_var_1____31y;//5.2 + } + } + } while(misra_5_2_func2()); //14.4 + } + } +} diff --git a/addons/test/path1/misra-suppressions2-test.c b/addons/test/path1/misra-suppressions2-test.c new file mode 100644 index 00000000000..7fadf186959 --- /dev/null +++ b/addons/test/path1/misra-suppressions2-test.c @@ -0,0 +1,14 @@ +// To test: +// ../../cppcheck --suppressions-list=suppressions.txt --dump misra-suppressions*-test.c && python ../misra.py misra-suppressions*-test.c.dump +// There should be no violations reported + +union misra_5_2_field_hides_field__63x { //19.2 +int misra_5_2_field_hides_field__31x; +int misra_5_2_field_hides_field__31y;//5.2 +}; +struct misra_5_2_field_hides_field__63y { //5.2 +int misra_5_2_field_hides_field1_31x; +int misra_5_2_field_hides_field1_31y;//5.2 +}; +const char *s41_1 = "\x41g"; // 4.1 +const char *s41_2 = "\x41\x42"; diff --git a/addons/test/threadsafety/MT-Unsafe.cpp b/addons/test/threadsafety/MT-Unsafe.cpp new file mode 100644 index 00000000000..5b23cefe87d --- /dev/null +++ b/addons/test/threadsafety/MT-Unsafe.cpp @@ -0,0 +1,67 @@ +/* + * Cppcheck - A tool for static C/C++ code analysis + * Copyright (C) 2023 Cppcheck team. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * This does not match the standard cppchek test code, + * because I haven't figured that out yet. + * This code does compile and run, and does demonstrate + * the issues that the threadsafety.py addon is supposed to find. + * It does not use threads ! + */ + +#include +#include +#include + +void threadsafety_static() +{ + // cppcheck-suppress threadsafety-threadsafety + static unsigned int nCount = 0; + + nCount++; + printf("%d\n", nCount); +} + +void threadsafety_call() +{ + time_t now = time(nullptr); + // cppcheck-suppress threadsafety-unsafe-call + printf("%s\n", ctime(&now)); +} + +// cppcheck --addon=threadsafety +// should *not* find any problems with this function. +void threadsafety_safecall() +{ + char haystack[] = "alphabet"; + char needle[] = "Alph"; + char* found = strcasestr(haystack, needle); + printf("%s %sin %s\n", needle, found ? "" : "not ", haystack); +} + +int main() { + threadsafety_static(); + + threadsafety_call(); + + threadsafety_safecall(); + + threadsafety_static(); + + return 0; +} diff --git a/addons/test/threadsafety/local_static.cpp b/addons/test/threadsafety/local_static.cpp new file mode 100644 index 00000000000..b41a0571ba8 --- /dev/null +++ b/addons/test/threadsafety/local_static.cpp @@ -0,0 +1,7 @@ +struct Dummy { + int x; +}; +void func() { + // cppcheck-suppress threadsafety-threadsafety + static Dummy dummy; +} diff --git a/addons/test/threadsafety/local_static_const.cpp b/addons/test/threadsafety/local_static_const.cpp new file mode 100644 index 00000000000..eaed48be949 --- /dev/null +++ b/addons/test/threadsafety/local_static_const.cpp @@ -0,0 +1,7 @@ +struct Dummy { + int x; +}; +void func() { + // cppcheck-suppress threadsafety-threadsafety-const + static const Dummy dummy; +} diff --git a/addons/test/util.py b/addons/test/util.py new file mode 100644 index 00000000000..0f99534edc6 --- /dev/null +++ b/addons/test/util.py @@ -0,0 +1,46 @@ +# Helpers for pytest tests +import subprocess +import json +import os + + +def find_cppcheck_binary(): + possible_locations = [ + "./cppcheck", + "./build/bin/cppcheck", + r".\bin\cppcheck.exe", + ] + for location in possible_locations: + if os.path.exists(location): + break + else: + raise RuntimeError("Could not find cppcheck binary") + + return location + +def dump_create(fpath, *argv): + cppcheck_binary = find_cppcheck_binary() + cmd = [cppcheck_binary, "--dump", "-DDUMMY", "--quiet", fpath] + list(argv) + with subprocess.Popen(cmd) as p: + p.communicate() + if p.returncode != 0: + raise OSError("cppcheck returns error code: %d" % p.returncode) + + +def dump_remove(fpath): + os.remove(fpath + ".dump") + + +def convert_json_output(raw_json_strings): + """Convert raw stdout/stderr cppcheck JSON output to python dict.""" + json_output = {} + for line in raw_json_strings: + if line.startswith('{"summary":'): + continue + try: + json_line = json.loads(line) + # json_output[json_line['errorId']] = json_line + json_output.setdefault(json_line['errorId'], []).append(json_line) + except ValueError: + pass + return json_output diff --git a/addons/test/y2038/y2038-inc.h b/addons/test/y2038/y2038-inc.h new file mode 100644 index 00000000000..e8190c61b7e --- /dev/null +++ b/addons/test/y2038/y2038-inc.h @@ -0,0 +1,31 @@ +#ifndef __INC2038 +#define _INC2038 + +/* + * This file defines _USE_TIME_BITS64. + * It plays the role of a Y2038-proof glibc. + */ + +#define _USE_TIME_BITS64 + +/* + * Declare just enough for clock_gettime + */ + +typedef int clockid_t; + +typedef int __time_t; + +typedef long int __syscall_slong_t; + +struct timespec +{ + __time_t tv_sec; /* Seconds. */ + __syscall_slong_t tv_nsec; /* Nanoseconds. */ +}; + +extern int clock_gettime(clockid_t clk_id, struct timespec *tp); + +#define CLOCK_REALTIME 0 + +#endif /* INC2038 */ diff --git a/addons/test/y2038/y2038-test-1-bad-time-bits.c b/addons/test/y2038/y2038-test-1-bad-time-bits.c new file mode 100644 index 00000000000..e9456db632f --- /dev/null +++ b/addons/test/y2038/y2038-test-1-bad-time-bits.c @@ -0,0 +1,18 @@ +#include +#include + +/* + * Define _TIME_BITS unequal to 64 to trigger error + */ + +#define _TIME_BITS 62 + +#include "y2038-inc.h" + +int main(int argc, char **argv) +{ + clockid_t my_clk_id = CLOCK_REALTIME; + struct timespec *my_tp; + + return clock_gettime(my_clk_id, &my_tp); +} diff --git a/addons/test/y2038/y2038-test-2-no-time-bits.c b/addons/test/y2038/y2038-test-2-no-time-bits.c new file mode 100644 index 00000000000..ab566039bf2 --- /dev/null +++ b/addons/test/y2038/y2038-test-2-no-time-bits.c @@ -0,0 +1,16 @@ +#include +#include + +/* + * Do not define _TIME_BITS but have _USE_TIME_BITS64 defined + */ + +#include "y2038-inc.h" + +int main(int argc, char **argv) +{ + clockid_t my_clk_id = CLOCK_REALTIME; + struct timespec *my_tp; + + return clock_gettime(my_clk_id, &my_tp); +} diff --git a/addons/test/y2038/y2038-test-3-no-use-time-bits.c b/addons/test/y2038/y2038-test-3-no-use-time-bits.c new file mode 100644 index 00000000000..02654f7e36b --- /dev/null +++ b/addons/test/y2038/y2038-test-3-no-use-time-bits.c @@ -0,0 +1,16 @@ +#include +#include + +/* + * Include bad _USE_TIME_BITS64 definition to trigger error + */ + +#define _TIME_BITS 64 + +int main(int argc, char **argv) +{ + clockid_t my_clk_id = CLOCK_REALTIME; + struct timespec *my_tp; + + return clock_gettime(my_clk_id, &my_tp); +} diff --git a/addons/test/y2038/y2038-test-4-good.c b/addons/test/y2038/y2038-test-4-good.c new file mode 100644 index 00000000000..aaa7ecf2ec4 --- /dev/null +++ b/addons/test/y2038/y2038-test-4-good.c @@ -0,0 +1,15 @@ +/* + * Define _TIME_BITS equal to 64 so that glibc knows we want Y2038 support. + */ + +#define _TIME_BITS 64 + +#include "y2038-inc.h" + +int main(int argc, char **argv) +{ + clockid_t my_clk_id = CLOCK_REALTIME; + struct timespec *my_tp; + + return clock_gettime(my_clk_id, &my_tp); +} diff --git a/addons/test/y2038/y2038-test-5-good-no-time-used.c b/addons/test/y2038/y2038-test-5-good-no-time-used.c new file mode 100644 index 00000000000..4aedfcc25db --- /dev/null +++ b/addons/test/y2038/y2038-test-5-good-no-time-used.c @@ -0,0 +1,14 @@ +/* + * C file that does not use any time functionality -> no errors should + * be reported. + */ + +#include + +int main(int argc, char **argv) +{ + if (argc > 1) { + printf("Hello"); + } + return 0; +} diff --git a/addons/test/y2038/y2038-test-compiler-flags.c b/addons/test/y2038/y2038-test-compiler-flags.c new file mode 100644 index 00000000000..99baa0e1582 --- /dev/null +++ b/addons/test/y2038/y2038-test-compiler-flags.c @@ -0,0 +1,25 @@ +/* + * Shared test case for Y2038 addon compiler flag testing + * + * This file tests various compiler flag scenarios: + * - Proper Y2038 configuration: -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 -D_USE_TIME_BITS64 + * - Incorrect _TIME_BITS value: -D_TIME_BITS=32 + * - Incomplete configuration: -D_USE_TIME_BITS64 (without _TIME_BITS) + * + * The same source code is used for all scenarios - differentiation happens + * through the compiler flags passed to cppcheck during dump creation. + */ + +#include + +int main(int argc, char **argv) +{ + time_t current_time; + struct timespec ts; + + current_time = time(NULL); + clock_gettime(CLOCK_REALTIME, &ts); + + return 0; +} + diff --git a/addons/test/y2038_test.py b/addons/test/y2038_test.py new file mode 100644 index 00000000000..861b006d8bf --- /dev/null +++ b/addons/test/y2038_test.py @@ -0,0 +1,206 @@ +# Running the test with Python 2: +# Be sure to install pytest version 4.6.4 (newer should also work) +# Command in cppcheck directory: +# python -m pytest addons/test/test-y2038.py +# +# Running the test with Python 3: +# Command in cppcheck directory: +# PYTHONPATH=./addons python3 -m pytest addons/test/test-y2038.py + +import sys +import pytest + +from addons.y2038 import check_y2038_safe + +from .util import dump_create, dump_remove, convert_json_output + + +TEST_SOURCE_FILES = ['./addons/test/y2038/y2038-test-1-bad-time-bits.c', + './addons/test/y2038/y2038-test-2-no-time-bits.c', + './addons/test/y2038/y2038-test-3-no-use-time-bits.c', + './addons/test/y2038/y2038-test-4-good.c', + './addons/test/y2038/y2038-test-5-good-no-time-used.c'] + +# Build system test file (for testing build system integration) +BUILD_SYSTEM_TEST_FILE = './addons/test/y2038/y2038-test-buildsystem.c' + + +def setup_module(module): + sys.argv.append("--cli") + + # Create dumps for regular test files + for f in TEST_SOURCE_FILES: + dump_create(f) + + # For build system tests, we'll create dumps on-demand in each test + # to avoid conflicts from multiple dump_create calls on the same file + + +def teardown_module(module): + sys.argv.remove("--cli") + for f in TEST_SOURCE_FILES: + dump_remove(f) + + # Build system test dumps are cleaned up individually in each test method + + +def test_1_bad_time_bits(capsys): + is_safe = check_y2038_safe('./addons/test/y2038/y2038-test-1-bad-time-bits.c.dump', quiet=True) + assert(is_safe is False) + captured = capsys.readouterr() + captured = captured.out.splitlines() + json_output = convert_json_output(captured) + + # Has exactly one warnings of _TIME_BITS and _USE_TIME_BITS64 kind. + assert(len(json_output['type-bits-undef']) == 1) + assert(len(json_output['type-bits-not-64']) == 1) + + # There are 2 unsafe calls in test source and 3 in y2038-in.h + unsafe_calls = json_output['unsafe-call'] + assert(len([c for c in unsafe_calls if c['file'].endswith('h')]) == 3) + assert(len([c for c in unsafe_calls if c['file'].endswith('c')]) == 0) + + +def test_2_no_time_bits(capsys): + is_safe = check_y2038_safe('./addons/test/y2038/y2038-test-2-no-time-bits.c.dump', quiet=True) + assert(is_safe is False) + captured = capsys.readouterr() + captured = captured.out.splitlines() + json_output = convert_json_output(captured) + + # _USE_TIME_BITS64 defined in y2038-inc.h header, but there is not + # _TIME_BITS definition. Here must be appropriate warning. + assert(len(json_output['type-bits-undef']) == 1) + assert(json_output.get('type-bits-not-64') is None) + + # y2038-in.h still has y2038-unsafe calls. + unsafe_calls = json_output['unsafe-call'] + assert(len([c for c in unsafe_calls if c['file'].endswith('h')]) == 3) + + +def test_3_no_use_time_bits(capsys): + is_safe = check_y2038_safe('./addons/test/y2038/y2038-test-3-no-use-time-bits.c.dump', quiet=True) + assert(is_safe is False) + captured = capsys.readouterr() + captured = captured.out.splitlines() + json_output = convert_json_output(captured) + + # Included bad _USE_TIME_BITS64 definition must trigger the errors. + unsafe_calls = json_output['unsafe-call'] + assert(len(unsafe_calls) == 2) + + +def test_4_good(capsys): + # pylint: disable-next=unused-variable - FIXME + is_safe = check_y2038_safe('./addons/test/y2038/y2038-test-4-good.c.dump', quiet=True) + # assert(is_safe is True) # FIXME: This should be a "good" example returning "True" instead of "False" + captured = capsys.readouterr() + captured = captured.out.splitlines() + json_output = convert_json_output(captured) + + # Defined _TIME_BITS equal to 64 so that glibc knows we want Y2038 support. + # There are no warnings from C sources. + unsafe_calls = json_output['unsafe-call'] + assert(len([c for c in unsafe_calls if c['file'].endswith('.c')]) == 0) + + +def test_5_good(capsys): + is_safe = check_y2038_safe('./addons/test/y2038/y2038-test-5-good-no-time-used.c.dump', quiet=True) + assert(is_safe is True) + captured = capsys.readouterr() + captured = captured.out.splitlines() + json_output = convert_json_output(captured) + + # There are no warnings from C sources. + if 'unsafe-call' in json_output: + unsafe_calls = json_output['unsafe-call'] + assert(len([c for c in unsafe_calls if c['file'].endswith('.c')]) == 0) + + +def test_build_system_integration(): + """Test that Y2038 flags are properly parsed from cppcheck dump file configuration""" + from addons.y2038 import parse_dump_config + + # Test Y2038-safe configuration string (as cppcheck would generate it) + config_string = "_TIME_BITS=64;_FILE_OFFSET_BITS=64;_USE_TIME_BITS64" + result = parse_dump_config(config_string) + # Y2038-safe flags should be detected + assert result['time_bits_defined'] is True + assert result['time_bits_value'] == 64 + assert result['use_time_bits64_defined'] is True + assert result['file_offset_bits_defined'] is True + assert result['file_offset_bits_value'] == 64 + + # Test partial Y2038 configuration + partial_config = "_TIME_BITS=32;_FILE_OFFSET_BITS=64" + result = parse_dump_config(partial_config) + # Should detect the flags with their actual values + assert result['time_bits_defined'] is True + assert result['time_bits_value'] == 32 # Not Y2038-safe value + assert result['use_time_bits64_defined'] is False + assert result['file_offset_bits_defined'] is True + assert result['file_offset_bits_value'] == 64 + + +def test_arguments_regression(): + args_ok = ["-t=foo", "--template=foo", + "-q", "--quiet", + "--cli"] + # Arguments with expected SystemExit + args_exit = ["--non-exists", "--non-exists-param=42", "-h", "--help"] + + from addons.y2038 import get_args_parser + + # sys.argv contains all pytest arguments - so clear all existing arguments first and restore afterwards + sys_argv_old = sys.argv + sys.argv = [sys.argv[0]] + + try: + for arg in args_exit: + sys.argv.append(arg) + with pytest.raises(SystemExit): + parser = get_args_parser() + parser.parse_args() + sys.argv.remove(arg) + + for arg in args_ok: + sys.argv.append(arg) + try: + parser = get_args_parser() + parser.parse_args() + except SystemExit: + pytest.fail("Unexpected SystemExit with '%s'" % arg) + sys.argv.remove(arg) + finally: + sys.argv = sys_argv_old + + +def test_parse_dump_config(): + """Test the parse_dump_config function for cppcheck dump file integration""" + from addons.y2038 import parse_dump_config + + # Test comprehensive Y2038 configuration + full_config = "_TIME_BITS=64;_FILE_OFFSET_BITS=64;_USE_TIME_BITS64;OTHER_FLAG=1" + result = parse_dump_config(full_config) + + assert result['time_bits_defined'] is True + assert result['time_bits_value'] == 64 + assert result['use_time_bits64_defined'] is True + assert result['file_offset_bits_defined'] is True + assert result['file_offset_bits_value'] == 64 + + # Test empty configuration + result = parse_dump_config("") + assert result['time_bits_defined'] is False + assert result['time_bits_value'] is None + assert result['use_time_bits64_defined'] is False + assert result['file_offset_bits_defined'] is False + assert result['file_offset_bits_value'] is None + # Test Y2038-unsafe configuration + unsafe_config = "_TIME_BITS=32;_FILE_OFFSET_BITS=32" + result = parse_dump_config(unsafe_config) + assert result['time_bits_defined'] is True + assert result['time_bits_value'] == 32 + assert result['use_time_bits64_defined'] is False + assert result['file_offset_bits_defined'] is True + assert result['file_offset_bits_value'] == 32 \ No newline at end of file diff --git a/addons/threadsafety.py b/addons/threadsafety.py new file mode 100755 index 00000000000..9475e1a5b0d --- /dev/null +++ b/addons/threadsafety.py @@ -0,0 +1,350 @@ +#!/usr/bin/env python3 +""" +cppcheck addon for threadsafety detection. + + This script analyses Cppcheck dump files to locate threadsafety issues. + It warns about + - static local objects + - MT-Unsafe symbols listed in the "Attributes" sections of man pages. + +""" + +import re +import sys + +import cppcheckdata + +# -------------------------------- +# List of MT-Unsafe identifiers +# -------------------------------- + +# This is Work In Progress. +# Eventually it should contain all identifiers (types +# and functions) which are MT-Unsafe. + +# The script tools/MT-Unsafe.py can help to re-generate this list. +# It reads a man-page tree and report identifiers marked as "MT-Unsafe" +# (see man 7 attributes for what this means), eg +# MT-Unsafe.py /usr/share/man/man3 + +id_MTunsafe_full = { + # MT-Unsafe types by definition + # 'pthread_t', + # Types marked MT-Unsafe + 'const:env', + 'const:hostid', + 'const:mallopt', + 'const:sigintr', + 'race:LogMask', + 'race:asctime', + 'race:crypt', + 'race:crypt_gensalt', + 'race:cuserid/!string', + 'race:dirstream', + 'race:drand48', + 'race:ecvt', + 'race:exit', + 'race:fcvt', + 'race:fgetgrent', + 'race:fgetpwent', + 'race:fgetspent', + 'race:fsent', + 'race:getdate', + 'race:getlogin', + 'race:getopt', + 'race:getspent', + 'race:getspnam', + 'race:grent', + 'race:grgid', + 'race:grnam', + 'race:hostbyaddr', + 'race:hostbyname', + 'race:hostbyname2', + 'race:hostent', + 'race:hsearch', + 'race:l64a', + 'race:localeconv', + 'race:mbrlen/!ps', + 'race:mbrtowc/!ps', + 'race:mbsnrtowcs/!ps', + 'race:mbsrtowcs/!ps', + 'race:mcheck', + 'race:mntentbuf', + 'race:netbyaddr', + 'race:netbyname', + 'race:netent', + 'race:netgrent', + 'race:protobyname', + 'race:protobynumber', + 'race:protoent', + 'race:ptsname', + 'race:pwent', + 'race:pwnam', + 'race:pwuid', + 'race:qecvt', + 'race:qfcvt', + 'race:servbyname', + 'race:servbyport', + 'race:servent', + 'race:sgetspent', + 'race:signgam', + 'race:stdin', + 'race:stdout', + 'race:streams', + 'race:strerror', + 'race:strsignal', + 'race:strtok', + 'race:tmbuf', + 'race:tmpnam/!s', + 'race:ttyent', + 'race:ttyname', + 'race:utent', + 'race:wcrtomb/!ps', + 'race:wcsnrtombs/!ps', + 'race:wcsrtombs/!ps', + 'sig:ALRM', + 'sig:SIGCHLD/linux', + # APIs marked MT-Unsafe + 'asctime', + 'clearenv', + 'ctime', + 'cuserid', + 'drand48', + 'ecvt', + 'encrypt', + 'endfsent', + 'endgrent', + 'endhostent', + 'endnetent', + 'endnetgrent', + 'endprotoent', + 'endpwent', + 'endservent', + 'endspent', + 'endttyent', + 'endusershell', + 'endutent', + 'erand48', + 'error_at_line', + 'ether_aton', + 'ether_ntoa', + 'exit', + 'fcloseall', + 'fcvt', + 'fgetgrent', + 'fgetpwent', + 'fgetspent', + 'fts_children', + 'fts_read', + 'gamma', + 'gammaf', + 'gammal', + 'getaliasbyname', + 'getaliasent', + 'getchar_unlocked', + 'getdate', + 'getfsent', + 'getfsfile', + 'getfsspec', + 'getgrent', + 'getgrent_r', + 'getgrgid', + 'getgrnam', + 'gethostbyaddr', + 'gethostbyname', + 'gethostbyname2', + 'gethostent', + 'gethostent_r', + 'getlogin', + 'getlogin_r', + 'getmntent', + 'getnetbyaddr', + 'getnetbyname', + 'getnetent', + 'getnetgrent', + 'getnetgrent_r', + 'getopt', + 'getopt_long', + 'getopt_long_only', + 'getpass', + 'getprotobyname', + 'getprotobynumber', + 'getprotoent', + 'getpwent', + 'getpwent_r', + 'getpwnam', + 'getpwuid', + 'getrpcbyname', + 'getrpcbynumber', + 'getrpcent', + 'getservbyname', + 'getservbyport', + 'getservent', + 'getspent', + 'getspent_r', + 'getspnam', + 'getttyent', + 'getttynam', + 'getusershell', + 'getutent', + 'getutid', + 'getutline', + 'getwchar_unlocked', + 'glob', + 'gmtime', + 'hcreate', + 'hdestroy', + 'hsearch', + 'innetgr', + 'jrand48', + 'l64a', + 'lcong48', + 'localeconv', + 'localtime', + 'login', + 'login_tty', + 'logout', + 'logwtmp', + 'lrand48', + 'mallinfo', + 'mallinfo2', + 'mblen', + 'mbrlen', + 'mbrtowc', + 'mbsnrtowcs', + 'mbsrtowcs', + 'mbtowc', + 'mcheck', + 'mcheck_check_all', + 'mcheck_pedantic', + 'mprobe', + 'mrand48', + 'mtrace', + 'muntrace', + 'nrand48', + 'profil', + 'ptsname', + 'putchar_unlocked', + 'putenv', + 'pututline', + 'putwchar_unlocked', + 'pvalloc', + 'qecvt', + 'qfcvt', + 'rcmd', + 'rcmd_af', + 're_comp', + 're_exec', + 'readdir', + 'rexec', + 'rexec_af', + 'seed48', + 'setenv', + 'setfsent', + 'setgrent', + 'sethostent', + 'sethostid', + 'setkey', + 'setlogmask', + 'setnetent', + 'setnetgrent', + 'setprotoent', + 'setpwent', + 'setservent', + 'setspent', + 'setttyent', + 'setusershell', + 'setutent', + 'sgetspent', + 'siginterrupt', + 'sleep', + 'srand48', + 'strerror', + 'strsignal', + 'strtok', + 'tmpnam', + 'ttyname', + 'ttyslot', + 'unsetenv', + 'updwtmp', + 'utmpname', + 'valloc', + 'wcrtomb', + 'wcsnrtombs', + 'wcsrtombs', + 'wctomb', + 'wordexp' +} + +# From man 7 attributes +# the full token could be feature:function/condition - we just want function. +id_MTunsafe = [re.sub('^.*:', '', re.sub('/.*$', '', x)) + for x in id_MTunsafe_full + ] + + +def reportError(token, severity, msg, errid): # noqa: D103 + cppcheckdata.reportError(token, severity, msg, 'threadsafety', errid) + + +def checkstatic(data): # noqa: D103 + for var in data.variables: + if var.isStatic and var.isLocal: + vartype = None + if var.isClass: + vartype = 'object' + else: + vartype = 'variable' + if var.isConst: + if data.standards.cpp == 'c++03': + reportError( + var.typeStartToken, + 'warning', + 'Local constant static ' + + vartype + "'" + var.nameToken.str + + "', dangerous if it is initialized" + + ' in parallel threads', + 'threadsafety-const') + else: + reportError(var.typeStartToken, 'warning', + 'Local static ' + vartype + ': ' + + var.nameToken.str, + 'threadsafety') + + +def check_MTunsafe(cfg): + """ + Look for functions marked MT-unsafe in their man pages. + + The MT-unsafe functions are listed in id_MTunsafe (and id_MTunsafe_full). + That section of code can be regenerated by the external script MT-Unsafe.py + """ + for token in cfg.tokenlist: + if token.str in id_MTunsafe: + reportError(token, 'warning', token.str + ' is MT-unsafe', + 'unsafe-call') + + +if __name__ == '__main__': + parser = cppcheckdata.ArgumentParser() + args = parser.parse_args() + + quiet = args.quiet or args.cli + + if not args.dumpfile: + if not args.quiet: + print('no input files.') + sys.exit(0) + + for dumpfile in args.dumpfile: + # load XML from .dump file + data = cppcheckdata.CppcheckData(dumpfile) + + for cfg in data.iterconfigurations(): + if not args.quiet: + srcfile = data.files[0] + print('Checking %s, config %s...' % (srcfile, cfg.name)) + check_MTunsafe(cfg) + checkstatic(cfg) + + sys.exit(cppcheckdata.EXIT_CODE) diff --git a/addons/y2038.py b/addons/y2038.py new file mode 100755 index 00000000000..b17d41dd330 --- /dev/null +++ b/addons/y2038.py @@ -0,0 +1,602 @@ +#!/usr/bin/env python3 +# +# cppcheck addon for Y2038 safeness detection +# +# This addon provides comprehensive Y2038 (Year 2038 Problem) detection for C/C++ code. +# It extracts compiler flags from cppcheck dump file configuration to determine +# Y2038 safety, suppressing warnings when proper configuration is detected. +# +# Key Features: +# - Extraction of Y2038-related flags from cppcheck dump file configuration +# - Compiler flag parsing and validation from cppcheck's project parsing +# - Warning suppression when proper Y2038 configuration is found +# - Support for both _TIME_BITS=64 and _FILE_OFFSET_BITS=64 requirements +# - Priority-based flag resolution (dump file configuration > source code directives) +# +# Detects: +# +# 1. _TIME_BITS being defined to something else than 64 bits +# 2. _FILE_OFFSET_BITS being defined to something else than 64 bits +# 3. _USE_TIME_BITS64 being defined when _TIME_BITS is not +# 4. Any Y2038-unsafe symbol when proper Y2038 configuration is not present +# 5. Dump file configurations that affect Y2038 safety +# +# Warning Suppression: +# When both _TIME_BITS=64 AND _FILE_OFFSET_BITS=64 are detected (prioritizing dump file +# configuration over source code directives), Y2038 warnings are suppressed and an +# informational message is displayed instead. +# +# Example usage: +# $ cppcheck --addon=y2038 path-to-src/test.c +# $ cppcheck --dump file.c && python3 y2038.py file.c.dump +# + +from __future__ import print_function + +import cppcheckdata +import sys +import re + +# Y2038 flags are extracted by cppcheck core during project parsing +# and passed through dump file configuration - no redundant parsing needed + +# -------------------------------- +# Y2038 safety constants +# -------------------------------- + +# Y2038-safe bit values +Y2038_SAFE_TIME_BITS = 64 +Y2038_SAFE_FILE_OFFSET_BITS = 64 + +# -------------------------------------------- +# #define/#undef detection regular expressions +# -------------------------------------------- + +# test for '#define _TIME_BITS 64' +re_define_time_bits_64 = re.compile(rf'^\s*#\s*define\s+_TIME_BITS\s+{Y2038_SAFE_TIME_BITS}\s*$') + +# test for '#define _TIME_BITS ...' (combine w/ above to test for 'not 64') +re_define_time_bits = re.compile(r'^\s*#\s*define\s+_TIME_BITS\s+.*$') + +# test for '#undef _TIME_BITS' (if it ever happens) +re_undef_time_bits = re.compile(r'^\s*#\s*undef\s+_TIME_BITS\s*$') + +# test for '#define _USE_TIME_BITS64' +re_define_use_time_bits64 = re.compile(r'^\s*#\s*define\s+_USE_TIME_BITS64\s*$') + +# test for '#undef _USE_TIME_BITS64' (if it ever happens) +re_undef_use_time_bits64 = re.compile(r'^\s*#\s*undef\s+_USE_TIME_BITS64\s*$') + +# test for '#define _FILE_OFFSET_BITS 64' +re_define_file_offset_bits_64 = re.compile(rf'^\s*#\s*define\s+_FILE_OFFSET_BITS\s+{Y2038_SAFE_FILE_OFFSET_BITS}\s*$') + +# test for '#define _FILE_OFFSET_BITS ...' (combine w/ above to test for 'not 64') +re_define_file_offset_bits = re.compile(r'^\s*#\s*define\s+_FILE_OFFSET_BITS\s+.*$') + +# test for '#undef _FILE_OFFSET_BITS' (if it ever happens) +re_undef_file_offset_bits = re.compile(r'^\s*#\s*undef\s+_FILE_OFFSET_BITS\s*$') + +# -------------------------------------------- +# Compiler flag parsing regular expressions +# -------------------------------------------- + +# test for '_TIME_BITS=64' in compiler flags +re_flag_time_bits_64 = re.compile(rf'_TIME_BITS={Y2038_SAFE_TIME_BITS}(?:\s|$|;)') + +# test for '_TIME_BITS=...' in compiler flags (combine w/ above to test for 'not 64') +re_flag_time_bits = re.compile(r'_TIME_BITS=(\d+)') + +# test for '_USE_TIME_BITS64' in compiler flags +re_flag_use_time_bits64 = re.compile(r'_USE_TIME_BITS64(?:\s|$|=|;)') + +# test for '_FILE_OFFSET_BITS=64' in compiler flags +re_flag_file_offset_bits_64 = re.compile(rf'_FILE_OFFSET_BITS={Y2038_SAFE_FILE_OFFSET_BITS}(?:\s|$|;)') + +# test for '_FILE_OFFSET_BITS=...' in compiler flags +re_flag_file_offset_bits = re.compile(r'_FILE_OFFSET_BITS=(\d+)') + +# -------------------------------- +# List of Y2038-unsafe identifiers +# -------------------------------- + +# This is WIP. Eventually it should contain all identifiers (types +# and functions) which would be affected by the Y2038 bug. + +id_Y2038 = { + # Y2038-unsafe types by definition + 'time_t' + # Types using Y2038-unsafe types + 'lastlog', + 'msqid_ds', + 'semid_ds', + 'timeb', + 'timespec', + 'timeval', + 'utimbuf', + 'itimerspec', + 'clnt_ops', + 'elf_prstatus', + 'itimerval', + 'ntptimeval', + 'rusage', + 'timex', + 'utmp', + 'utmpx', + # APIs using 2038-unsafe types + 'ctime', + 'ctime_r', + 'difftime', + 'gmtime', + 'gmtime_r', + 'localtime', + 'localtime_r', + 'mktime', + 'stime', + 'timegm', + 'timelocal', + 'time', + 'msgctl', + 'ftime', + 'aio_suspend', + 'clock_getres', + 'clock_gettime', + 'clock_nanosleep', + 'clock_settime', + 'futimens', + 'mq_timedreceive', + 'mq_timedsend', + 'nanosleep', + 'pselect', + 'pthread_cond_timedwait', + 'pthread_mutex_timedlock', + 'pthread_rwlock_timedrdlock', + 'pthread_rwlock_timedwrlock', + 'sched_rr_get_interval', + 'sem_timedwait', + 'sigtimedwait', + 'timespec_get', + 'utimensat', + 'adjtime', + 'pmap_rmtcall', + 'clntudp_bufcreate', + 'clntudp_create', + 'futimes', + 'gettimeofday', + 'lutimes', + 'select', + 'settimeofday', + 'utimes', + 'utime', + 'timerfd_gettime', + 'timerfd_settime', + 'timer_gettime', + 'timer_settime', + 'fstatat', + 'fstat', + '__fxstatat', + '__fxstat', + 'lstat', + '__lxstat', + 'stat', + '__xstat', + 'struct itimerval', + 'setitimer', + 'getitimer', + 'ntp_gettime', + 'getrusage', + 'wait3', + 'wait4', + 'adjtimex', + 'ntp_adjtime', + 'getutent_r', + 'getutent', + 'getutid_r', + 'getutid', + 'getutline_r', + 'getutline', + 'login', + 'pututline', + 'updwtmp', + 'getutxent', + 'getutxid', + 'getutxline', + 'pututxline' +} + + + + + + + + + +def parse_dump_config(config_name): + """ + Parse Y2038-related flags from cppcheck dump file configuration name. + + This function analyzes the cppcheck dump file configuration name (which contains + preprocessor definitions extracted by cppcheck from project files like compile_commands.json) + to extract Y2038-related definitions. It looks for _TIME_BITS, _USE_TIME_BITS64, and + _FILE_OFFSET_BITS definitions and validates their values. + + Args: + config_name (str): The cppcheck configuration name from dump file + (e.g., "_TIME_BITS=64;_FILE_OFFSET_BITS=64") + + Returns: + dict: Dictionary containing Y2038-related flag information with keys: + - 'time_bits_defined' (bool): Whether _TIME_BITS is defined + - 'time_bits_value' (int|None): Value of _TIME_BITS (None if not defined) + - 'use_time_bits64_defined' (bool): Whether _USE_TIME_BITS64 is defined + - 'file_offset_bits_defined' (bool): Whether _FILE_OFFSET_BITS is defined + - 'file_offset_bits_value' (int|None): Value of _FILE_OFFSET_BITS (None if not defined) + + Example: + >>> parse_dump_config("_TIME_BITS=64;_FILE_OFFSET_BITS=64") + { + 'time_bits_defined': True, + 'time_bits_value': 64, + 'use_time_bits64_defined': False, + 'file_offset_bits_defined': True, + 'file_offset_bits_value': 64 + } + """ + result = { + 'time_bits_defined': False, + 'time_bits_value': None, + 'use_time_bits64_defined': False, + 'file_offset_bits_defined': False, + 'file_offset_bits_value': None + } + + if not config_name: + return result + + try: + # Check for _TIME_BITS=64 (correct value) + if re_flag_time_bits_64.search(config_name): + result['time_bits_defined'] = True + result['time_bits_value'] = Y2038_SAFE_TIME_BITS + else: + # Check for _TIME_BITS=other_value + match = re_flag_time_bits.search(config_name) + if match: + result['time_bits_defined'] = True + try: + result['time_bits_value'] = int(match.group(1)) + except (ValueError, IndexError): + # Malformed _TIME_BITS value, treat as undefined + result['time_bits_defined'] = False + result['time_bits_value'] = None + + # Check for _USE_TIME_BITS64 + if re_flag_use_time_bits64.search(config_name): + result['use_time_bits64_defined'] = True + + # Check for _FILE_OFFSET_BITS=64 (correct value) + if re_flag_file_offset_bits_64.search(config_name): + result['file_offset_bits_defined'] = True + result['file_offset_bits_value'] = Y2038_SAFE_FILE_OFFSET_BITS + else: + # Check for _FILE_OFFSET_BITS=other_value + match = re_flag_file_offset_bits.search(config_name) + if match: + result['file_offset_bits_defined'] = True + try: + result['file_offset_bits_value'] = int(match.group(1)) + except (ValueError, IndexError): + # Malformed _FILE_OFFSET_BITS value, treat as undefined + result['file_offset_bits_defined'] = False + result['file_offset_bits_value'] = None + + except (AttributeError, TypeError, ValueError): + # If any unexpected error occurs during parsing, return empty result + # This ensures the addon continues to work even with malformed configurations + # Note: We catch specific exceptions rather than broad Exception for better debugging + pass + + return result + + +def check_y2038_safe(dumpfile, quiet=False): + """ + Main function to check Y2038 safety of C/C++ code from cppcheck dump files. + + This function performs comprehensive Y2038 analysis including: + 1. Extraction of Y2038-related compiler flags from cppcheck dump file configuration + 2. Analysis of source code preprocessor directives + 3. Warning suppression when proper Y2038 configuration is detected + 4. Reporting of Y2038-unsafe symbols and configurations + + The function implements a priority-based approach for Y2038 flag detection: + - Dump file configuration (from cppcheck's project parsing - highest priority) + - Source code #define directives (fallback) + + Warning suppression occurs when both _TIME_BITS=64 AND _FILE_OFFSET_BITS=64 + are detected from any source. When warnings are suppressed, an informational + message is displayed indicating the configuration source and suppression count. + + Args: + dumpfile (str): Path to the cppcheck XML dump file (.dump extension) + quiet (bool, optional): If True, suppress informational messages. Defaults to False. + + Returns: + bool: True if code is Y2038-safe, False if Y2038 issues were detected + + Raises: + Exception: May raise exceptions from cppcheckdata parsing or file I/O operations + + Example: + >>> check_y2038_safe("test.c.dump") # Normal operation + True + >>> check_y2038_safe("test.c.dump", quiet=True) # Suppress info messages + False + """ + # Assume that the code is Y2038 safe until proven otherwise + y2038safe = True + # load XML from .dump file + data = cppcheckdata.CppcheckData(dumpfile) + + srcfile = data.files[0] + + for cfg in data.iterconfigurations(): + if not quiet: + print('Checking %s, config %s...' % (srcfile, cfg.name)) + safe_ranges = [] + safe = -1 + time_bits_defined = False + srclinenr = 0 + + # Priority-based flag detection: dump file configuration > source code directives + # 1. Check dump file configuration (from cppcheck's project parsing - highest priority) + dump_config_flags = parse_dump_config(cfg.name) + # Initialize effective flags with dump file configuration + effective_flags = { + 'time_bits_defined': dump_config_flags['time_bits_defined'], + 'time_bits_value': dump_config_flags['time_bits_value'], + 'use_time_bits64_defined': dump_config_flags['use_time_bits64_defined'], + 'file_offset_bits_defined': dump_config_flags['file_offset_bits_defined'], + 'file_offset_bits_value': dump_config_flags['file_offset_bits_value'] + } + + # Determine configuration source for reporting + config_source = None + has_dump_config = (dump_config_flags['time_bits_defined'] or + dump_config_flags['file_offset_bits_defined'] or + dump_config_flags['use_time_bits64_defined']) + if has_dump_config: + config_source = "cppcheck configuration" + + # Track time_bits_defined for _USE_TIME_BITS64 validation + time_bits_defined = effective_flags['time_bits_defined'] + + # Check effective _TIME_BITS value (from dump file configuration) + if effective_flags['time_bits_defined']: + if effective_flags['time_bits_value'] != Y2038_SAFE_TIME_BITS: + fake_directive = type('FakeDirective', (), { + 'file': srcfile, 'linenr': 0, 'column': 0, + 'str': 'cppcheck configuration: _TIME_BITS=%s' % effective_flags['time_bits_value'] + })() + cppcheckdata.reportError(fake_directive, 'error', + '_TIME_BITS must be defined equal to 64 (found in cppcheck configuration: _TIME_BITS=%s)' % effective_flags['time_bits_value'], + 'y2038', + 'type-bits-not-64') + y2038safe = False + + # Check effective _FILE_OFFSET_BITS value (from dump file configuration) + if effective_flags['file_offset_bits_defined']: + if effective_flags['file_offset_bits_value'] != Y2038_SAFE_FILE_OFFSET_BITS: + fake_directive = type('FakeDirective', (), { + 'file': srcfile, 'linenr': 0, 'column': 0, + 'str': 'cppcheck configuration: _FILE_OFFSET_BITS=%s' % effective_flags['file_offset_bits_value'] + })() + cppcheckdata.reportError(fake_directive, 'error', + '_FILE_OFFSET_BITS must be defined equal to 64 (found in cppcheck configuration: _FILE_OFFSET_BITS=%s)' % effective_flags['file_offset_bits_value'], + 'y2038', + 'file-offset-bits-not-64') + y2038safe = False + + # Check effective _USE_TIME_BITS64 (from dump file configuration) + if effective_flags['use_time_bits64_defined']: + if not time_bits_defined: + # _USE_TIME_BITS64 defined without _TIME_BITS is problematic + fake_directive = type('FakeDirective', (), { + 'file': srcfile, 'linenr': 0, 'column': 0, + 'str': 'cppcheck configuration: _USE_TIME_BITS64' + })() + cppcheckdata.reportError(fake_directive, 'warning', + '_USE_TIME_BITS64 is defined in cppcheck configuration but _TIME_BITS was not', + 'y2038', + 'type-bits-undef') + y2038safe = False + else: + # _USE_TIME_BITS64 defined WITH _TIME_BITS - this is correct + safe = 0 # Start of file is safe + + # 2. Fallback to source code directives when dump file configuration is not available + source_time_bits_defined = False # pylint: disable=unused-variable + source_file_offset_bits_defined = False # pylint: disable=unused-variable + source_file_offset_bits_value = None # pylint: disable=unused-variable + source_use_time_bits64_defined = False # pylint: disable=unused-variable + + # Track which flags came from source code for mixed scenario reporting + source_flags_used = { + 'time_bits': False, + 'file_offset_bits': False, + 'use_time_bits64': False + } + for directive in cfg.directives: + # track source line number + if directive.file == srcfile: + srclinenr = directive.linenr + + # Process source code directives as fallback when dump config is not available + # check for correct _TIME_BITS if present + if re_define_time_bits_64.match(directive.str): + source_time_bits_defined = True + # Only use source directive if dump config doesn't define _TIME_BITS + if not effective_flags['time_bits_defined']: + effective_flags['time_bits_defined'] = True + effective_flags['time_bits_value'] = Y2038_SAFE_TIME_BITS + time_bits_defined = True + source_flags_used['time_bits'] = True + elif re_define_time_bits.match(directive.str): + source_time_bits_defined = False + # Only use source directive if dump config doesn't define _TIME_BITS + if not effective_flags['time_bits_defined']: + source_flags_used['time_bits'] = True + cppcheckdata.reportError(directive, 'error', + '_TIME_BITS must be defined equal to 64', + 'y2038', + 'type-bits-not-64') + y2038safe = False + elif re_undef_time_bits.match(directive.str): + source_time_bits_defined = False + # Only use source directive if dump config doesn't define _TIME_BITS + if not effective_flags['time_bits_defined']: + time_bits_defined = False + source_flags_used['time_bits'] = True + # check for correct _FILE_OFFSET_BITS if present + if re_define_file_offset_bits_64.match(directive.str): + source_file_offset_bits_defined = True + source_file_offset_bits_value = Y2038_SAFE_FILE_OFFSET_BITS + # Only use source directive if dump config doesn't define _FILE_OFFSET_BITS + if not effective_flags['file_offset_bits_defined']: + effective_flags['file_offset_bits_defined'] = True + effective_flags['file_offset_bits_value'] = Y2038_SAFE_FILE_OFFSET_BITS + source_flags_used['file_offset_bits'] = True + elif re_define_file_offset_bits.match(directive.str): + source_file_offset_bits_defined = False + # Only use source directive if dump config doesn't define _FILE_OFFSET_BITS + if not effective_flags['file_offset_bits_defined']: + source_flags_used['file_offset_bits'] = True + cppcheckdata.reportError(directive, 'error', + '_FILE_OFFSET_BITS must be defined equal to 64', + 'y2038', + 'file-offset-bits-not-64') + y2038safe = False + elif re_undef_file_offset_bits.match(directive.str): + source_file_offset_bits_defined = False + source_file_offset_bits_value = None + # Only use source directive if dump config doesn't define _FILE_OFFSET_BITS + if not effective_flags['file_offset_bits_defined']: + effective_flags['file_offset_bits_defined'] = False + effective_flags['file_offset_bits_value'] = None + source_flags_used['file_offset_bits'] = True + + # check for _USE_TIME_BITS64 (un)definition + if re_define_use_time_bits64.match(directive.str): + safe = int(srclinenr) + source_use_time_bits64_defined = True + # Only use source directive if dump config doesn't define _USE_TIME_BITS64 + if not effective_flags['use_time_bits64_defined']: + effective_flags['use_time_bits64_defined'] = True + source_flags_used['use_time_bits64'] = True + # warn about _TIME_BITS not being defined (check effective flags) + if not time_bits_defined: + cppcheckdata.reportError(directive, 'warning', + '_USE_TIME_BITS64 is defined but _TIME_BITS was not', + 'y2038', + 'type-bits-undef') + elif re_undef_use_time_bits64.match(directive.str): + unsafe = int(srclinenr) + source_use_time_bits64_defined = False + # Only use source directive if dump config doesn't define _USE_TIME_BITS64 + if not effective_flags['use_time_bits64_defined']: + source_flags_used['use_time_bits64'] = True + # do we have a safe..unsafe area? + if unsafe > safe >= 0: + safe_ranges.append((safe, unsafe)) + safe = -1 + + # check end of source beyond last directive + if len(cfg.tokenlist) > 0: + unsafe = int(cfg.tokenlist[-1].linenr) + if unsafe > safe >= 0: + safe_ranges.append((safe, unsafe)) + + # Determine if Y2038 warnings should be suppressed + # Require BOTH _TIME_BITS=64 AND _FILE_OFFSET_BITS=64 for complete Y2038 safety + y2038_safe_config = ( + effective_flags['time_bits_defined'] and + effective_flags['time_bits_value'] == Y2038_SAFE_TIME_BITS and + effective_flags['file_offset_bits_defined'] and + effective_flags['file_offset_bits_value'] == Y2038_SAFE_FILE_OFFSET_BITS + ) + + # Update config_source for suppression reporting based on mixed scenarios + if y2038_safe_config: + # Determine configuration source for mixed scenarios + dump_flags_count = sum([ + dump_config_flags['time_bits_defined'], + dump_config_flags['file_offset_bits_defined'], + dump_config_flags['use_time_bits64_defined'] + ]) + source_flags_count = sum(source_flags_used.values()) + + if dump_flags_count > 0 and source_flags_count > 0: + # Mixed scenario: both dump config and source directives used + config_source = "mixed configuration (cppcheck configuration and source code directives)" + elif dump_flags_count > 0: + # Only dump config used + config_source = "cppcheck configuration" + elif source_flags_count > 0: + # Only source directives used + config_source = "source code directives" + else: + # Fallback (shouldn't happen if y2038_safe_config is True) + config_source = "configuration" + + # go through all tokens + warnings_suppressed = 0 + for token in cfg.tokenlist: + if token.str in id_Y2038: + is_in_safe_range = any(lower <= int(token.linenr) <= upper + for (lower, upper) in safe_ranges) + + if not is_in_safe_range: + if y2038_safe_config: + # Count suppressed warnings but don't report them + warnings_suppressed += 1 + else: + # Report the warning as before + cppcheckdata.reportError(token, 'warning', + token.str + ' is Y2038-unsafe', + 'y2038', + 'unsafe-call') + y2038safe = False + token = token.next + + # Print suppression message if warnings were suppressed + if warnings_suppressed > 0 and config_source and not quiet: + print('Y2038 warnings suppressed: Found proper Y2038 configuration in %s (_TIME_BITS=%d and _FILE_OFFSET_BITS=%d)' % (config_source, Y2038_SAFE_TIME_BITS, Y2038_SAFE_FILE_OFFSET_BITS)) + print('Suppressed %d Y2038-unsafe function warning(s)' % warnings_suppressed) + + return y2038safe + + +def get_args_parser(): + parser = cppcheckdata.ArgumentParser() + return parser + + +if __name__ == '__main__': + parser = get_args_parser() + args = parser.parse_args() + + exit_code = 0 + quiet = args.quiet or args.cli + + if not args.dumpfile: + if not args.quiet: + print("no input files.") + sys.exit(0) + + for dumpfile in args.dumpfile: + if not quiet: + print('Checking ' + dumpfile + '...') + + check_y2038_safe(dumpfile, quiet) + + sys.exit(cppcheckdata.EXIT_CODE) diff --git a/build-pcre.txt b/build-pcre.txt index 28893a92e42..9f4e8e06e29 100644 --- a/build-pcre.txt +++ b/build-pcre.txt @@ -1,58 +1,63 @@ -PCRE is a library that is used by the optional "rules" feature. (It adds -some additional features to the command line client.) It's readily available -on Linux and Mac OS X, but must be obtained separately for Windows. - -If you're using qmake to generate makefiles, the following behavior applies: - -- If you're not on Windows, it assumes by default that you have PCRE and want - to enable rules support. - -- If you're not on Windows, you can disable rules support (removing the PCRE - dependency) by passing HAVE_RULES=no to qmake. - -- If you are on Windows, but have PCRE available, you can enable rules support - by passing HAVE_RULES=yes to qmake. - - - Note: This includes using build.bat since it calls qmake - to use PCRE and - build.bat, you need to run set HAVE_RULES=yes before each run of build.bat - - -Some temporary build instructions. This is work in progress. - - -Windows - -Visual Studio - -To build pcre I downloaded the sourcecode from www.pcre.org. I downloaded cmake 2.8. -Then I built the lib with: - cmake . - nmake - -The resulting files can be downloaded here (please try if it works): - http://cppcheck.sf.net/pcre-8.10-vs.zip - - -MINGW (Qt 4.7 SDK) - -I downloaded pcre-8.0-lib.zip from here: http://software-download.name/pcre-library-windows/ - - -Linux - -The normal Makefile should work - -Install pcre on ubuntu might be needed: -sudo apt-get install libpcre3 libpcre3-dev - - -Mac OSX - -Install pcre: - - sudo port install pcre - -Ensure /path/to/pcre.h is in CXXFLAGS, e.g: - - export CXXFLAGS=${CXXFLAGS}:/opt/local/include - +PCRE is a library that is used by the optional "rules" feature for the command +line version of cppcheck. It is readily available on Linux and Mac OS X, but +must be obtained separately for Windows. + +Build instructions +------------------ + +Windows +------- + +Visual Studio + +To build PCRE, download the source code from www.pcre.org and +CMake (https://cmake.org/download/). We assume you use Visual Studio 2015 - +otherwise adapt the commands for your version. + +VS Solution file + cmake . -G "Visual Studio 14 2015" + Open PCRE.sln with VS IDE or via cmd: + call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 + MSBuild PCRE.sln /target:Build /property:Configuration="Release" + + For 64-bit target: cmake . -G "Visual Studio 14 2015 Win64" + +or using NMake + call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 + cmake . -G "NMake Makefiles" + nmake + +or using MSYS + cmake . -G "MSYS Makefiles" + make + + +Linux +----- + +The normal Makefile should work. + +Install PCRE on Ubuntu might be needed: + sudo apt-get install libpcre3 libpcre3-dev + + +Mac OSX +------- + +Install PCRE: + +homebre + brew install pcre + +or macport + sudo port install pcre + +Ensure /path/to/pcre.h is in CXXFLAGS, e.g: + +for homebrew + export CXXFLAGS=${CXXFLAGS}:/usr/local/include + +or macport + export CXXFLAGS=${CXXFLAGS}:/opt/local/include + +Or for MSVC copy pcre.lib and pcre.h in /externals directory. diff --git a/build.bat b/build.bat deleted file mode 100644 index 326e1a7d21f..00000000000 --- a/build.bat +++ /dev/null @@ -1,69 +0,0 @@ -@echo off -REM A simple script to build different cppcheck targets from project root -REM folder. This script can be run from VS prompt or Qt prompt. -REM -REM Usage: build [release|debug] -REM where is any of cppcheck/gui/tests/all -REM release or debug is the configuration -REM all-target builds both cppcheck and gui. -REM -REM Run the command before build.bat to enable rules using pcre: -REM set HAVE_RULES=yes -REM -REM TODO: -REM - run tests too - -if "%1" == "" goto help - -REM QT prompt sets QMAKESPEC -if "%QMAKESPEC%" == "" ( -REM parse qmakespec to see if it's some msvc - if "%QMAKESPEC:~6,4%" == "msvc" ( - set MAKE=nmake - ) else ( - set MAKE=mingw32-make - ) -) else ( - set MAKE=nmake -) - -if "%2" == "" set TARGET=release -if "%2" == "release" set TARGET=release -if "%2" == "debug" set TARGET=debug - -if "%1" == "cppcheck" goto cppcheck -if "%1" == "gui" goto gui -if "%1" == "tests" goto tests -if "%1" == "all" goto cppcheck -goto help - -:cppcheck -cd cli -qmake -config %TARGET% HAVE_RULES=%HAVE_RULES% -%MAKE% -cd .. -if "%1" == "all" goto gui -goto end - -:gui -cd gui -qmake -config %TARGET% HAVE_RULES=%HAVE_RULES% -%MAKE% -lrelease gui.pro -cd .. -goto end - -:tests -cd test -qmake -config %TARGET% HAVE_RULES=%HAVE_RULES% -%MAKE% -cd .. -goto end - -:help -echo "Syntax: build [debug|release]" -echo " where is any of cppcheck/gui/tests/all" -echo " debug or release define used configuration" -echo " all- target builds both cppcheck and gui. - -:end diff --git a/cfg/avr.cfg b/cfg/avr.cfg new file mode 100644 index 00000000000..bb21afac352 --- /dev/null +++ b/cfg/avr.cfg @@ -0,0 +1,402 @@ + + + + + + + + + + + + + + + + + + + + + + + false + + + 0:255 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + 0: + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + diff --git a/cfg/bento4.cfg b/cfg/bento4.cfg new file mode 100644 index 00000000000..50f3cac00c9 --- /dev/null +++ b/cfg/bento4.cfg @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + diff --git a/cfg/boost.cfg b/cfg/boost.cfg new file mode 100644 index 00000000000..722c4c83cd7 --- /dev/null +++ b/cfg/boost.cfg @@ -0,0 +1,1284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + arg1==0?0:(arg1<0?-1:1) + + + + + + + + false + + + + arg1<0?1:0 + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + 5.000000000000000000000000000000000000e-01 + + + false + + + + 3.333333333333333333333333333333333333e-01 + + + false + + + + 6.666666666666666666666666666666666666e-01 + + + false + + + + 6.666666666666666666666666666666666666e-01 + + + false + + + + 1.66666666666666666666666666666666666666666e-01 + + + false + + + + 7.500000000000000000000000000000000000e-01 + + + false + + + + 1.414213562373095048801688724209698078e+00 + + + false + + + + 1.732050807568877293527446341505872366e+00 + + + false + + + + 7.071067811865475244008443621048490392e-01 + + + false + + + + 6.931471805599453094172321214581765680e-01 + + + false + + + + -3.665129205816643270124391582326694694e-01 + + + false + + + + 1.177410022515474691011569326459699637e+00 + + + false + + + + 7.071067811865475244008443621048490392e-01 + + + false + + + + 3.141592653589793238462643383279502884e+00 + + + false + + + + 1.570796326794896619231321691639751442e+00 + + + false + + + + 1.047197551196597746154214461093167628e+00 + + + false + + + + 5.235987755982988730771072305465838140e-01 + + + false + + + + 6.283185307179586476925286766559005768e+00 + + + false + + + + 2.094395102393195492308428922186335256e+00 + + + false + + + + 2.356194490192344928846982537459627163e+00 + + + false + + + + 4.188790204786390984616857844372670512e+00 + + + false + + + + 1.591549430918953357688837633725143620e-01 + + + false + + + + 3.989422804014326779399460599343818684e-01 + + + false + + + + 1.772453850905516027298167483341145182e+00 + + + false + + + + 1.253314137315500251207882642405522626e+00 + + + false + + + + 2.506628274631000502415765284811045253e+00 + + + false + + + + 9.189385332046727417803297364056176398e-01 + + + false + + + + 5.641895835477562869480794515607725858e-01 + + + false + + + + 5.641895835477562869480794515607725858e-01 + + + false + + + + 1.415926535897932384626433832795028841e-01 + + + false + + + + 8.584073464102067615373566167204971158e-01 + + + false + + + + 7.953167673715975443483953350568065807e-01 + + + false + + + + 2.245915771836104547342715220454373502e+01 + + + false + + + + 9.869604401089358618834490999876151135e+00 + + + false + + + + 1.644934066848226436472415166646025189e+00 + + + false + + + + 3.100627668029982017547631506710139520e+01 + + + false + + + + 1.464591887561523263020142527263790391e+00 + + + false + + + + 6.827840632552956814670208331581645981e-01 + + + false + + + + 2.718281828459045235360287471352662497e+00 + + + false + + + + 6.065306597126334236037995349911804534e-01 + + + false + + + + 2.314069263277926900572908636794854738e+01 + + + false + + + + 1.648721270700128146848650787814163571e+00 + + + false + + + + 4.342944819032518276511289189166050822e-01 + + + false + + + + 2.302585092994045684017991454684364207e+00 + + + false + + + + 2.302585092994045684017991454684364207e+00 + + + false + + + + 1.745329251994329576923690768488612713e-02 + + + false + + + + 5.729577951308232087679815481410517033e+01 + + + false + + + + 8.414709848078965066525023216302989996e-01 + + + false + + + + 5.403023058681397174009366074429766037e-01 + + + false + + + + 1.175201193643801456882381850595600815e+00 + + + false + + + + 1.543080634815243778477905620757061682e+00 + + + false + + + + 1.618033988749894848204586834365638117e+00 + + + false + + + + 4.812118250596034474977589134243684231e-01 + + + false + + + + 2.078086921235027537601322606117795767e+00 + + + false + + + + 5.772156649015328606065120900824024310e-01 + + + false + + + + 1.732454714600633473583025315860829681e+00 + + + false + + + + 3.331779238077186743183761363552442266e-01 + + + false + + + + 1.644934066848226436472415166646025189e+00 + + + false + + + + 1.202056903159594285399738161511449990e+00 + + + false + + + + 9.159655941772190150546035149323841107e-01 + + + false + + + + 1.282427129100622636875342568869791727e+00 + + + false + + + + 2.685452001065306445309714835481795693e+00 + + + false + + + + 1.139547099404648657492793019389846112e+00 + + + false + + + + 6.311106578189371381918993515442277798e-01 + + + false + + + + 3.245089300687638062848660410619754415e+00 + + + false + + + + 2.450893006876380628486604106197544154e-01 + + + false + + + + 6.366197723675813430755350534900574481e-01 + + + false + + + + 7.978845608028653558798921198687637369e-01 + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + true + + + + + + + boost::lock_guard + boost::mutex::scoped_lock + boost::recursive_mutex::scoped_lock + boost::unique_lock + boost::shared_lock + + + boost::mutex + boost::recursive_mutex + + + diff --git a/cfg/bsd.cfg b/cfg/bsd.cfg new file mode 100644 index 00000000000..158d7a8a885 --- /dev/null +++ b/cfg/bsd.cfg @@ -0,0 +1,567 @@ + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + 0: + + + + + + + + + + + 0: + + + + + + + + 0: + + + + + + + + + + + 0: + + + + + + + + 0: + + + + + 0: + + + + + + + + + + + 0: + + + + + + + + 0: + + + + + 0: + + + + + + + + + + + + + + 0: + + + + + + + + 0: + + + + + 0: + + + + + + + + + + + 0: + + + + + + + + 0: + + + + + 0: + + + + + + + + + false + + + + + + false + + + + + + + + + 1: + + + + + false + + + + + 2: + + + + + false + + + + false + + + + + + + 0: + + + + + + + + + false + + + + + + + 1: + + + + + + + + + + -1: + + + + + + + + true + + + + + + + + + + + + true + + + + + + + + + + + + + + + true + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + false + + + + + + 0: + + + + 0: + + + + reallocarray + free + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/cairo.cfg b/cfg/cairo.cfg new file mode 100644 index 00000000000..d766abffc2e --- /dev/null +++ b/cfg/cairo.cfg @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + diff --git a/cfg/cppcheck-cfg.rng b/cfg/cppcheck-cfg.rng new file mode 100644 index 00000000000..a54c967aaac --- /dev/null +++ b/cfg/cppcheck-cfg.rng @@ -0,0 +1,751 @@ + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + maybe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + error-code + + + + + + + + + + (::)?([a-zA-Z_:][a-zA-Z_0-9:]*[ ])*([a-zA-Z_][a-zA-Z_0-9]*::)*([a-zA-Z_][a-zA-Z_0-9]*([ ]?[*& ])*)+ + + + + + + + + + + + + all|([0-9]*:[0-9]*) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + error + warning + style + performance + portability + information + + + + + + Obsolescent + Obsolete + + + + + + + + + + + c99 + + + + + + + + + + + any + variadic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ([-!]?[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?[,:])*([-!]?[0-9]+(\.[0-9]+)?([eE][-+]?[0-9]+)?)? + + + + + + + + + strlen + sizeof + mul + + + + + + + + + + + + + + + value + + + + + + + + + + + + + argvalue + + + + + + + + + + + + + + + + + + + + + + + + first + middle + last + + + + + + + + + + + + + + [.][a-z]+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + std-like + + + + + std-like + + + + + + + + + erase + insert + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + array-like + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bool + char + short + int + long + long long + + + + + + + 1 + 2 + 4 + 8 + + + + + + + s + u + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 40 + + + + + + 0 + 2 + + + + + + in + out + inout + + + + + + true + false + + + + + + [a-zA-Z_][a-zA-Z_0-9]* + + + + + + [a-zA-Z_][a-zA-Z_0-9:]* + + + + + + [a-zA-Z_][a-zA-Z_0-9:,]* + + + + + + malloc(:[1-5])?|calloc(:[1-5],[1-5])?|strdup(:[1-5])? + + + + + + resize + clear + push + pop + find + find-const + insert + erase + append + change-content + change-internal + change + + + + + + at_index + item + buffer + buffer-nt + start-iterator + end-iterator + iterator + size + empty + + + + + + 1 + 9223372036854775807 + + + diff --git a/cfg/cppcheck-lib.cfg b/cfg/cppcheck-lib.cfg new file mode 100644 index 00000000000..6a76155a9f8 --- /dev/null +++ b/cfg/cppcheck-lib.cfg @@ -0,0 +1,72 @@ + + + + false + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + -50:50 + + + + + + false + + + + + + -50:50 + + + + + + false + + + + + + diff --git a/cfg/cppunit.cfg b/cfg/cppunit.cfg new file mode 100644 index 00000000000..1caf400db19 --- /dev/null +++ b/cfg/cppunit.cfg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + false + + + + + + + + + false + + + + + + + + + + diff --git a/cfg/dpdk.cfg b/cfg/dpdk.cfg new file mode 100644 index 00000000000..32ef8bcad4b --- /dev/null +++ b/cfg/dpdk.cfg @@ -0,0 +1,11 @@ + + + + true + + + + + + + diff --git a/cfg/embedded_sql.cfg b/cfg/embedded_sql.cfg new file mode 100644 index 00000000000..81281facf0d --- /dev/null +++ b/cfg/embedded_sql.cfg @@ -0,0 +1,4 @@ + + + + diff --git a/cfg/emscripten.cfg b/cfg/emscripten.cfg new file mode 100644 index 00000000000..7a5c5903cf5 --- /dev/null +++ b/cfg/emscripten.cfg @@ -0,0 +1,108 @@ + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + emscripten_asm_const_ptr + emscripten_asm_const_ptr_sync_on_main_thread + free + + + + + + + + + + + + + + + + + + + diff --git a/cfg/ginac.cfg b/cfg/ginac.cfg new file mode 100644 index 00000000000..c40d5c92510 --- /dev/null +++ b/cfg/ginac.cfg @@ -0,0 +1,12848 @@ + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + false + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + false + + + + + + + false + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + false + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + diff --git a/cfg/gnu.cfg b/cfg/gnu.cfg new file mode 100644 index 00000000000..1c8d1597a7f --- /dev/null +++ b/cfg/gnu.cfg @@ -0,0 +1,1738 @@ + + + + free + get_current_dir_name + + + asprintf + free + + + xmalloc + xcalloc + xstrdup + xrealloc + free + xfree + + + + backtrace_symbols + free + + + pvalloc + free + + + false + + ((arg1 & 0xff00u) >> 8) | ((arg1 & 0x00ffu) << 8) + + + + + + + + + + + + false + + ((arg1 & 0xff000000ul) >> 24) | ((arg1 & 0x00ff0000ul) >> 8) | ((arg1 & 0x0000ff00ul) << 8) | ((arg1 & 0x000000fful) << 24) + + + + + + + + + + + + false + + ((arg1 & 0xff00000000000000ull) >> 56) | ((arg1 & 0x00ff000000000000ull) >> 40) | ((arg1 & 0x0000ff0000000000ull) >> 24) | ((arg1 & 0x000000ff00000000ull) >> 8) | ((arg1 & 0x00000000ff000000ull) << 8) | ((arg1 & 0x0000000000ff0000ull) << 24) | ((arg1 & 0x000000000000ff00ull) << 40) | ((arg1 & 0x00000000000000ffull) << 56) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + 0: + + + + + + false + + + + + + + 0: + + + + + + + + + + 0: + + + + + + + + + + + false + arg1 + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + true + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + true + + + + + + + + + + + + 0: + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + 0: + + + + + + 0: + + + + + + 1: + + + + + + + + + false + + + + + 0: + + + + + 0: + + + + + 1: + + + + + + + + + false + + + + + + + + + + + + + + + + + 1: + + + + 0: + + + + + + + + + + + + + 0: + + + + + + + + + false + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + arg1>=0 && arg1<=0x7F + false + + + + 0:255 + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + 0: + + + + + + + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + + + + + + + + 0: + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + 0: + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + 0: + + + + + + + + + + + + + + + false + + + + + + 0: + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + false + + + + + 0: + + + + + 0: + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + 0: + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + + + 0: + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + 0:4294967295 + + + + + 0:4294967295 + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + 0: + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + 0: + + + + + 0: + + + + + + false + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + 0: + + + + 0: + + + + + + + + + + + + arg1==0 &0 + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + 1: + + + + + false + + + + + + + + + + + false + + + + 0: + + + + + + + + + 0: + + + + + + + + + + false + + + + 0: + + + + + + + + + 1: + + + + + + + + + + false + + + + 0: + + + + + + + + + 1: + + + + + + + + + + + + + + false + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + + false + + + + + false + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + 1: + + + + + + + + + + -1: + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + true + + + + + + + + + mkostemp + mkstemps + mkostemps + close + + + close + epoll_create + + + close + epoll_create1 + + + + + + + + + + + + + + + + diff --git a/cfg/googletest.cfg b/cfg/googletest.cfg new file mode 100644 index 00000000000..c32eef7274b --- /dev/null +++ b/cfg/googletest.cfg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/gtk.cfg b/cfg/gtk.cfg new file mode 100644 index 00000000000..b561aad91b2 --- /dev/null +++ b/cfg/gtk.cfg @@ -0,0 +1,23189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + g_thread_new + g_thread_try_new + g_thread_ref + g_thread_unref + g_thread_join + + + g_variant_iter_copy + g_variant_iter_new + g_variant_iter_free + + + g_source_new + g_idle_source_new + g_timeout_source_new + g_timeout_source_new_seconds + g_child_watch_source_new + g_cancellable_source_new + g_io_create_watch + g_source_ref + g_source_unref + + + g_date_time_new + g_date_time_new_now + g_date_time_new_now_local + g_date_time_new_now_utc + g_date_time_new_from_unix_local + g_date_time_new_from_unix_utc + g_date_time_new_from_timeval_local + g_date_time_new_from_timeval_utc + g_date_time_new_local + g_date_time_new_utc + g_date_time_add + g_date_time_add_years + g_date_time_add_months + g_date_time_add_weeks + g_date_time_add_days + g_date_time_add_hours + g_date_time_add_minutes + g_date_time_add_seconds + g_date_time_add_full + g_date_time_to_timezone + g_date_time_to_local + g_date_time_to_utc + g_date_time_ref + g_date_time_unref + + + g_dir_open + g_dir_rewind + g_dir_close + + + g_timer_new + g_timer_destroy + + + g_file_attribute_info_list_new + g_file_attribute_info_list_dup + g_file_attribute_info_list_ref + g_file_attribute_info_list_unref + + + g_slist_alloc + g_slist_copy + g_slist_copy_deep + g_slist_free + g_slist_free_1 + g_slist_free_full + + + g_variant_new + g_variant_new_va + g_variant_new_boolean + g_variant_new_byte + g_variant_new_int16 + g_variant_new_uint16 + g_variant_new_int32 + g_variant_new_uint32 + g_variant_new_int64 + g_variant_new_uint64 + g_variant_new_handle + g_variant_new_double + g_variant_new_string + g_variant_new_take_string + g_variant_new_printf + g_variant_new_signature + g_variant_new_object_path + g_variant_new_variant + g_variant_new_objv + g_variant_new_strv + g_variant_new_bytestring + g_variant_new_bytestring_array + g_variant_new_maybe + g_variant_new_array + g_variant_new_tuple + g_variant_new_dict_entry + g_variant_new_fixed_array + g_variant_new_from_data + g_variant_new_from_bytes + g_variant_builder_end + g_variant_new_parsed_va + g_variant_new_parsed + g_variant_byteswap + g_variant_get_child_value + g_variant_get_normal_form + g_variant_parse + g_variant_ref + g_variant_take_ref + g_variant_builder_add + g_variant_builder_add_value + g_variant_builder_add_parsed + g_variant_ref_sink + g_variant_unref + + + g_variant_iter_new + g_variant_iter_free + + + g_variant_type_new + g_variant_type_copy + g_variant_type_new_array + g_variant_type_new_dict_entry + g_variant_type_new_maybe + g_variant_type_new_tuple + g_variant_type_free + + + g_allocator_new + g_allocator_free + + + g_bookmark_file_new + g_bookmark_file_free + + + g_srv_target_new + g_srv_target_free + + + g_string_chunk_new + g_string_chunk_free + + + g_test_log_buffer_new + g_test_log_buffer_free + + + g_value_array_new + g_value_array_free + + + g_cache_new + g_cache_destroy + + + g_cclosure_new + g_cclosure_new_swap + g_cclosure_new_object + g_cclosure_new_object_swap + g_closure_new_object + g_closure_new_simple + g_closure_ref + g_closure_unref + + + g_array_new + g_array_sized_new + g_array_ref + g_array_free + g_array_unref + + + g_async_queue_new + g_async_queue_new_full + g_async_queue_ref + g_async_queue_unref + + + g_byte_array_new + g_byte_array_sized_new + g_byte_array_new_take + g_byte_array_sized_new + g_bytes_unref_to_array + g_byte_array_ref + g_byte_array_free + g_byte_array_unref + + + g_checksum_new + g_checksum_copy + g_checksum_free + + + g_main_loop_new + g_main_new + g_main_loop_ref + g_main_loop_unref + g_main_destroy + + + g_main_context_new + g_main_context_ref + g_main_context_unref + g_main_destroy + + + g_thread_pool_new + g_thread_pool_free + + + g_error_copy + g_error_new_valist + g_error_new_literal + g_error_new + g_error_free + + + g_string_new + g_string_new_len + g_string_sized_new + g_variant_print_string + g_string_free + + + g_ptr_array_new + g_ptr_array_new_full + g_ptr_array_new_with_free_func + g_ptr_array_ref + g_ptr_array_free + g_ptr_array_unref + + + g_pattern_spec_new + g_pattern_spec_free + + + g_key_file_new + g_key_file_ref + g_key_file_free + g_key_file_unref + + + g_io_module_scope_new + g_io_module_scope_free + + + g_ascii_strdown + g_ascii_strup + g_base64_decode + g_base64_encode + g_bookmark_file_get_description + g_bookmark_file_get_mime_type + g_bookmark_file_get_title + g_bookmark_file_to_data + g_build_filename + g_build_filenamev + g_build_path + g_build_pathv + g_bytes_unref_to_data + g_compute_checksum_for_bytes + g_compute_checksum_for_data + g_compute_checksum_for_string + g_compute_hmac_for_data + g_compute_hmac_for_string + g_convert + g_convert_with_fallback + g_convert_with_iconv + g_credentials_to_string + g_date_time_format + g_filename_display_basename + g_filename_display_name + g_filename_from_uri + g_filename_to_uri + g_get_codeset + g_get_current_dir + g_get_locale_variants + g_key_file_get_start_group + g_key_file_to_data + g_malloc + g_realloc + g_malloc0 + g_malloc0_n + g_malloc_n + g_realloc_n + g_memdup + g_path_get_basename + g_path_get_dirname + g_slice_alloc + g_slice_alloc0 + g_slice_copy + g_strcompress + g_strconcat + g_strdup + g_strdup_printf + g_strdup_vprintf + g_strescape + g_strjoin + g_strjoinv + g_strndup + g_strnfill + g_time_val_to_iso8601 + g_try_malloc + g_try_realloc + g_try_malloc0 + g_try_malloc0_n + g_try_malloc_n + g_try_realloc_n + g_ucs4_to_utf16 + g_ucs4_to_utf8 + g_unicode_canonical_decomposition + g_utf16_to_ucs4 + g_utf16_to_utf8 + g_utf8_casefold + g_utf8_collate_key + g_utf8_collate_key_for_filename + g_utf8_normalize + g_utf8_strdown + g_utf8_strreverse + g_utf8_strup + g_utf8_substring + g_utf8_to_ucs4 + g_utf8_to_ucs4_fast + g_utf8_to_ucs4_fast + g_utf8_to_utf16 + g_key_file_get_locale_string + g_key_file_get_value + g_key_file_get_string + g_key_file_get_boolean_list + g_key_file_get_integer_list + g_key_file_get_double_list + g_key_file_get_comment + g_dbus_proxy_get_name_owner + g_file_info_get_attribute_as_string + g_file_attribute_matcher_to_string + g_app_launch_context_get_environment + g_app_launch_context_get_startup_notify_id + g_filename_completer_get_completion_suffix + g_inet_address_mask_to_string + g_variant_dup_string + g_variant_dup_bytestring + g_variant_get_objv + g_variant_get_strv + g_variant_print + g_datalist_id_dup_data + g_dir_make_tmp + g_filename_from_utf8 + g_filename_to_utf8 + g_file_read_link + g_find_program_in_path + g_format_size + g_format_size_for_display + g_format_size_full + g_hostname_to_ascii + g_hostname_to_unicode + g_locale_from_utf8 + g_locale_to_utf8 + g_markup_escape_text + g_markup_printf_escaped + g_markup_vprintf_escaped + g_match_info_expand_references + g_match_info_fetch + g_match_info_fetch_named + g_option_context_get_help + g_regex_escape_nul + g_regex_escape_string + g_regex_replace + g_regex_replace_eval + g_regex_replace_literal + g_shell_quote + g_shell_unquote + g_uri_escape_string + g_uri_parse_scheme + g_uri_unescape_segment + g_uri_unescape_string + g_variant_type_dup_string + g_value_dup_string + g_register_data + g_free + + + g_hash_table_new_full + g_hash_table_new + g_hash_table_ref + g_hash_table_destroy + g_hash_table_unref + + + g_io_channel_unix_new + g_io_channel_win32_new_fd + g_io_channel_win32_new_socket + g_io_channel_win32_new_messages + g_io_channel_new_file + g_io_channel_ref + g_io_channel_close + g_io_channel_shutdown + g_io_channel_unref + + + g_emblemed_icon_get_emblems + g_list_alloc + g_list_copy + g_list_copy_deep + g_app_info_get_all + g_app_info_get_all_for_type + g_app_info_get_fallback_for_type + g_app_info_get_recommended_for_type + g_io_modules_load_all_in_directory + g_io_modules_load_all_in_directory_with_scope + g_hash_table_get_keys + g_hash_table_get_values + g_list_free + g_list_free_1 + g_list_free_full + + + g_regex_new + g_regex_ref + g_regex_unref + + + g_node_new + g_node_copy + g_node_copy_deep + g_node_destroy + + + g_time_zone_new + g_time_zone_new_local + g_time_zone_new_utc + g_time_zone_ref + g_time_zone_unref + + + g_markup_parse_context_new + g_markup_parse_context_free + + + g_mapped_file_new + g_mapped_file_new_from_fd + g_mapped_file_ref + g_mapped_file_free + g_mapped_file_unref + + + g_mutex_new + g_mutex_free + + + g_mem_chunk_new + g_mem_chunk_free + + + g_option_group_new + g_option_group_free + + + g_option_context_new + g_option_context_free + + + g_rand_new + g_rand_copy + g_rand_new_with_seed + g_rand_new_with_seed_array + g_rand_free + + + g_queue_new + g_queue_copy + g_queue_free + g_queue_free_full + + + g_slice_new + g_slice_free + g_slice_free1 + + + g_sequence_new + g_sequence_free + + + g_completion_new + g_completion_free + + + g_chunk_new + g_chunk_free + + + g_bytes_new + g_bytes_new_take + g_bytes_new_static + g_bytes_new_with_free_func + g_bytes_new_from_bytes + g_byte_array_free_to_bytes + g_memory_output_stream_steal_as_bytes + g_variant_get_data_as_bytes + g_mapped_file_get_bytes + g_bytes_ref + g_bytes_unref + + + g_bookmark_file_get_uris + g_bookmark_file_get_groups + g_bookmark_file_get_applications + g_key_file_get_groups + g_key_file_get_keys + g_strdupv + g_strsplit + g_strsplit_set + g_uri_list_extract_uris + g_key_file_get_string_list + g_key_file_get_locale_string_list + g_file_info_list_attributes + g_file_info_get_attribute_stringv + g_app_launch_context_get_environment + g_filename_completer_get_completions + g_io_module_query + g_variant_dup_objv + g_variant_dup_bytestring_array + g_environ_setenv + g_environ_unsetenv + g_get_environ + g_listenv + g_match_info_fetch_all + g_regex_split + g_regex_split_full + g_regex_split_simple + g_regex_split_simple + g_variant_dup_strv + g_strfreev + + + g_hmac_new + g_hmac_copy + g_hmac_ref + g_hmac_unref + + + g_hook_alloc + g_hook_ref + g_hook_unref + g_hook_destroy + g_hook_free + + + g_date_new + g_date_new_dmy + g_date_new_julian + g_date_free + + + g_variant_builder_new + g_variant_builder_ref + g_variant_builder_unref + + + g_cond_new + g_cond_free + + + g_app_launch_context_new + g_app_info_create_from_commandline + g_app_info_dup + g_app_info_get_default_for_type + g_app_info_get_default_for_uri_scheme + g_application_new + g_application_get_dbus_connection + g_buffered_input_stream_new + g_buffered_output_stream_new + g_cancellable_new + g_charset_converter_new + g_converter_input_stream_new + g_converter_output_stream_new + g_credentials_new + g_data_input_stream_new + g_data_output_stream_new + g_dbus_auth_observer_new + g_dbus_connection_new_finish + g_dbus_connection_new_sync + g_dbus_connection_new_for_address_finish + g_dbus_connection_new_for_address_sync + g_dbus_message_new + g_dbus_message_new_signal + g_dbus_message_new_method_call + g_dbus_message_new_method_reply + g_dbus_message_new_method_error + g_dbus_message_new_method_error_valist + g_dbus_message_new_method_error_literal + g_dbus_object_manager_client_new_finish + g_dbus_object_manager_client_new_sync + g_dbus_object_manager_client_new_for_bus_finish + g_dbus_object_manager_client_new_for_bus_sync + g_dbus_object_manager_server_new + g_dbus_object_manager_server_get_connection + g_dbus_object_proxy_new + g_dbus_object_skeleton_new + g_dbus_proxy_new_finish + g_dbus_proxy_new_sync + g_dbus_proxy_new_for_bus_finish + g_dbus_proxy_new_for_bus_sync + g_emblemed_icon_new + g_emblem_new + g_emblem_new_with_origin + g_file_icon_new + g_file_icon_get_file + g_file_info_new + g_file_info_dup + g_file_info_get_icon + g_file_info_get_symbolic_icon + g_file_info_get_attribute_object + g_file_info_get_deletion_date + g_filename_completer_new + g_inet_address_mask_new + g_inet_address_mask_new_from_string + g_inet_address_mask_get_address + g_inet_socket_address_new + g_inet_socket_address_get_address + g_initable_new + g_initable_new_valist + g_initable_newv + g_io_module_new + g_io_module_scope_new + g_keyfile_settings_backend_new + g_memory_input_stream_new + g_memory_input_stream_new_from_data + g_memory_input_stream_new_from_bytes + g_memory_output_stream_new + g_memory_output_stream_new_resizable + g_memory_settings_backend_new + g_null_settings_backend_new + g_menu_item_new + g_menu_item_new_section + g_menu_item_new_submenu + g_menu_item_new_from_model + g_menu_new + g_mount_operation_new + g_network_address_new + g_network_service_new + g_object_new + g_param_spec_pool_new + g_pollable_source_new + g_private_new + g_proxy_address_new + g_ptr_array_sized_new + g_relation_new + g_scanner_new + g_settings_new + g_signal_type_cclosure_new + g_simple_action_group_new + g_simple_action_new + g_simple_async_result_new + g_simple_permission_new + g_socket_client_new + g_socket_listener_new + g_socket_new + g_socket_service_new + g_tcp_wrapper_connection_new + g_test_dbus_new + g_themed_icon_new + g_threaded_socket_service_new + g_tls_client_connection_new + g_tls_file_database_new + g_tls_password_new + g_tls_server_connection_new + g_unix_signal_source_new + g_zlib_compressor_new + g_zlib_decompressor_new + g_object_ref + g_object_unref + gtk_widget_destroy + + + g_tree_new + g_tree_new_full + g_tree_new_with_data + g_tree_ref + g_tree_unref + g_tree_destroy + + + g_file_attribute_matcher_new + g_file_attribute_matcher_subtract + g_file_attribute_matcher_ref + g_file_attribute_matcher_unref + + + + false + + + + + true + + + + true + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + false + + + false + + + false + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + + false + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + false + + + false + + + false + + + false + + + + false + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + false + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + 0: + + + + + + false + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + 0: + + + + + + false + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + 0: + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + 0: + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + false + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + arg1 + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + g_value_set_object_take_ownership has been deprecated since version 2.4 and should not be used in newly-written code. Use g_value_take_object() instead. + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + g_value_set_string_take_ownership has been deprecated since version 2.4 and should not be used in newly-written code. Use g_value_take_string() instead. + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + false + + + + + + + + 0:255 + + + + + false + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + 0:255 + + + + + false + + + + + + + + 0:255 + + + + + false + + + + + + + + 0:255 + + + + + false + + + + + + + + 0:255 + + + + + false + + + + + + + + 0:255 + + + + + false + + + + + + + + 0:255 + + + + + false + + + + + + + + 0:255 + + + + + false + + + + + + + + 0:255 + + + + + false + + + + + + + + 0:255 + + + + + false + + + + + + + + 0:255 + + + + + false + + + + + + + + 0:255 + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + 0,2:36 + + + + + false + + + + + + + + + + + 0,2:36 + + + + + false + + + + + + + + + + + + + + false + + + + + + + 0:255 + + + + + + false + + + + + + + 0:255 + + + + + false + + + + + + + + 0:255 + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + false + + + + + + + + + false + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + g_basename has been deprecated since version 2.2 and should not be used in newly-written code. Use g_path_get_basename() instead, but notice that g_path_get_basename() allocates new memory for the returned string, unlike this function which returns a pointer into the argument. + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + g_dirname is deprecated and should not be used in newly-written code. Use g_path_get_dirname() instead. + + + + + + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + 0: + + + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + false + + + + false + + + + false + + + + + + false + + + + false + + + + false + + + + false + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + false + + + + + false + + + + + + + + + + + false + + + + + + + + 1: + + + + + false + + + + false + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + 0: + + + + + + + + + + 0: + + + + + 0: + + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + 0: + + + + + + + + + + + + false + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + false + + + + + false + + + g_strcasecmp has been deprecated since version 2.2 and should not be used in newly-written code. + + + + + + + + + + + + + + + + false + arg1 + + + + + + + + + + false + arg1 + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + false + + + + + false + + + + + + + + false + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + g_strncasecmp has been deprecated since version 2.2 and should not be used in newly-written code. + + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + false + + + + + + + + + + + + + + + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + 0: + + + + + + false + + + + + 0: + + + + + 0: + + + + + + + false + + + + + 0: + + + + + + + false + + + + 0: + + + + + 0: + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + g_async_queue_timed_pop_unlocked is deprecated and should not be used in newly-written code.use g_async_queue_timeout_pop_unlocked(). + + + + + + false + + + + + + + + 0: + + + + + false + g_async_queue_unref_and_unlock has been deprecated since version 2.8 and should not be used in newly-written code. Reference counting is done atomically. so g_async_queue_unref() can be used regardless of the queues lock. + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + false + + + + + + + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + false + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + + 0: + + + + + + + + + + + 0: + + + + + 0: + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + false + + + + + + + + + + + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + g_string_down has been deprecated since version 2.2 and should not be used in newly-written code. This function uses the locale-specific tolower() function, which is almost never the right thing. Use g_string_ascii_down() or g_utf8_strdown() instead. + + + + + + + + + false + + + + + + + + + + + + + false + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + 0: + + + + + + false + + g_string_sprintf is deprecated and should not be used in newly-written code. This function has been renamed to g_string_printf(). + + + + + + + + + + + + + + + + false + + g_string_sprintfa is deprecated and should not be used in newly-written code. This function has been renamed to g_string_append_printf() + + + + + + + + + + + + + + + false + + + + + false + + g_string_up has been deprecated since version 2.2 and should not be used in newly-written code. This function uses the locale-specific toupper() function, which is almost never the right thing. Use g_string_ascii_up() or g_utf8_strup() instead. + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + g_tree_traverse has been deprecated since version 2.2 and should not be used in newly-written code. The order of a balanced tree is somewhat arbitrary. If you just want to visit all nodes in sorted order, use g_tree_foreach() instead. If you really need to visit nodes in a different order, consider using an n-ary tree. + + + + + + + false + + + + + + + + + false + + g_type_class_add_private has been deprecated since version 2.58 and should not be used in newly-written code. Use the G_ADD_PRIVATE() macro with the G_DEFINE_* family of macros to add instance private data to a type. + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + true + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + gtk_hbox_new has been deprecated since version 3.2 and should not be used in newly-written code. You can use gtk_box_new() with GTK_ORIENTATION_HORIZONTAL instead, which is a quick and easy change. But the recommendation is to switch to GtkGrid, since GtkBox is going to go away eventually. See Migrating from other containers to GtkGrid. + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + gtk_vbox_new has been deprecated since version 3.2 and should not be used in newly-written code. You can use gtk_box_new() with GTK_ORIENTATION_VERTICAL instead, which is a quick and easy change. But the recommendation is to switch to GtkGrid, since GtkBox is going to go away eventually. See Migrating from other containers to GtkGrid. + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + false + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + true + + gtk_exit is deprecated and should not be used in newly-written code. Use the standard exit() function instead. + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + gtk_signal_connect_object_while_alive is deprecated and should not be used in newly-written code. Use g_signal_connect_object() instead, passing G_CONNECT_SWAPPED as connect_flags. + + + + + + + + false + + + + + + false + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + + false + + gtk_label_get is deprecated and should not be used in newly-written code. + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + + false + + + + false + + + + + false + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + 0: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/icu.cfg b/cfg/icu.cfg new file mode 100644 index 00000000000..5e1f9163fd0 --- /dev/null +++ b/cfg/icu.cfg @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/kde.cfg b/cfg/kde.cfg new file mode 100644 index 00000000000..1131d5e0c50 --- /dev/null +++ b/cfg/kde.cfg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + diff --git a/cfg/libcerror.cfg b/cfg/libcerror.cfg new file mode 100644 index 00000000000..ce621e99d44 --- /dev/null +++ b/cfg/libcerror.cfg @@ -0,0 +1,203 @@ + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/libcurl.cfg b/cfg/libcurl.cfg new file mode 100644 index 00000000000..949b6de0282 --- /dev/null +++ b/cfg/libcurl.cfg @@ -0,0 +1,487 @@ + + + + + + + + + + + curl_easy_init + curl_easy_duphandle + curl_easy_cleanup + + + curl_easy_escape + curl_easy_unescape + curl_escape + curl_unescape + curl_free + + + curl_getenv + curl_maprintf + curl_mvaprintf + free + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + 0: + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + 0: + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + false + + + + + + + + + + 0: + + + + + false + + + + + + false + + + This function will be removed from the public libcurl API in a near future. It will instead be made "available" by source code access only, and then as curlx_getenv(). + + + + + + + + false + + + These functions will be removed from the public libcurl API in the future. Do not use them in any new programs or projects. + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + Usage of curl_multi_socket is deprecated, whereas the function is equivalent to curl_multi_socket_action with ev_bitmask set to 0. + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + These functions will be removed from the public libcurl API in the future. Do not use them in any new programs or projects. + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + These functions will be removed from the public libcurl API in a near future. They will instead be made "available" by source code access only, and then as curlx_strequal() and curlx_strenqual(). + + + + + + + + + + + + + + false + + + + + These functions will be removed from the public libcurl API in a near future. They will instead be made "available" by source code access only, and then as curlx_strequal() and curlx_strenqual(). + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + + 0: + + + diff --git a/cfg/libsigc++.cfg b/cfg/libsigc++.cfg new file mode 100644 index 00000000000..f03804fa8e5 --- /dev/null +++ b/cfg/libsigc++.cfg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + false + + + + + diff --git a/cfg/lua.cfg b/cfg/lua.cfg new file mode 100644 index 00000000000..bf3971dffc2 --- /dev/null +++ b/cfg/lua.cfg @@ -0,0 +1,316 @@ + + + + + + + + + + + + + + + + + true + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + 1: + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + 0: + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + true + + + + + + + + + + diff --git a/cfg/mfc.cfg b/cfg/mfc.cfg new file mode 100644 index 00000000000..1a8100f2ef0 --- /dev/null +++ b/cfg/mfc.cfg @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/microsoft_atl.cfg b/cfg/microsoft_atl.cfg new file mode 100644 index 00000000000..3cd784bbf70 --- /dev/null +++ b/cfg/microsoft_atl.cfg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/microsoft_sal.cfg b/cfg/microsoft_sal.cfg new file mode 100644 index 00000000000..36371a3610b --- /dev/null +++ b/cfg/microsoft_sal.cfg @@ -0,0 +1,490 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/microsoft_unittest.cfg b/cfg/microsoft_unittest.cfg new file mode 100644 index 00000000000..35c9c5a9a37 --- /dev/null +++ b/cfg/microsoft_unittest.cfg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/motif.cfg b/cfg/motif.cfg new file mode 100644 index 00000000000..f4221a23018 --- /dev/null +++ b/cfg/motif.cfg @@ -0,0 +1,318 @@ + + + + false + + + + + + false + + + + + false + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + false + + + + + false + + + + + + + MrmCloseHierarchy + MrmOpenHierarchy + MrmOpenHierarchyPerDisplay + + + + XmStringFree + XmStringCreateLocalized + XmStringCreateSimple + XmStringGenerate + XmCvtCTToXmString + + + XtFree + XmFontListEntryGetTag + XmTextGetString + XmCvtXmStringToCT + XmWidgetGetBaselines + + + XmFontListEntryFree + XmFontListCreate + XmFontListAppendEntry + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + false + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XtFree + XtMalloc + XtCalloc + XtRealloc + XtNew + XtNewString + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + XOpenDisplay + XCloseDisplay + + + diff --git a/cfg/nspr.cfg b/cfg/nspr.cfg new file mode 100644 index 00000000000..99ad465829b --- /dev/null +++ b/cfg/nspr.cfg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/ntl.cfg b/cfg/ntl.cfg new file mode 100644 index 00000000000..6c42dfb09a1 --- /dev/null +++ b/cfg/ntl.cfg @@ -0,0 +1,6907 @@ + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + diff --git a/cfg/opencv2.cfg b/cfg/opencv2.cfg new file mode 100644 index 00000000000..80b51ad7a08 --- /dev/null +++ b/cfg/opencv2.cfg @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cv::fastMalloc + cv::fastFree + + + + + true + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + 0: + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + diff --git a/cfg/opengl.cfg b/cfg/opengl.cfg new file mode 100644 index 00000000000..ec37abf5516 --- /dev/null +++ b/cfg/opengl.cfg @@ -0,0 +1,581 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + diff --git a/cfg/openmp.cfg b/cfg/openmp.cfg new file mode 100644 index 00000000000..d853af2286a --- /dev/null +++ b/cfg/openmp.cfg @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + omp_target_alloc + omp_target_free + + + omp_alloc + omp_free + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + This routine has been deprecated. See OpenMP specification. + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + This routine has been deprecated. See OpenMP specification. + + + + + + + false + + + + + + 1: + + + + + false + + + + + + + + 0: + + + + + false + + + + + + + + 0: + + + diff --git a/cfg/openssl.cfg b/cfg/openssl.cfg new file mode 100644 index 00000000000..d6dd39bdf81 --- /dev/null +++ b/cfg/openssl.cfg @@ -0,0 +1,174 @@ + + + + + + + + + EVP_CIPHER_CTX_new + EVP_CIPHER_CTX_free + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + 0: + + + diff --git a/cfg/pcre.cfg b/cfg/pcre.cfg new file mode 100644 index 00000000000..2ab79ee94c5 --- /dev/null +++ b/cfg/pcre.cfg @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/posix.cfg b/cfg/posix.cfg new file mode 100644 index 00000000000..751142bacc1 --- /dev/null +++ b/cfg/posix.cfg @@ -0,0 +1,6445 @@ + + + + + + + + false + + + + + + + + + + false + + + + + + + 0: + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + 0: + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + 0: + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + 0: + + + + + + + arg1>=0x30 && arg1<=0x39 || arg1>=0x41 && arg1 <=0x5A || arg1>=0x61 && arg1 <=0x7A + false + + + + 0:255 + + + + + + + + + + + arg1>='A' && arg1<='Z' || arg1>='a' && arg1 <='z' + false + + + + 0:255 + + + + + + + + + + + arg1==' ' || arg1=='\t' + false + + + + 0:255 + + + + + + + + + + + arg1==0x7F || arg1<=0x1F + false + + + + 0:255 + + + + + + + + + + + arg1>='0' && arg1<='9' + false + + + + 0:255 + + + + + + + + + + + arg1>=0x21 && arg1<=0x7E + false + + + + 0:255 + + + + + + + + + + + arg1>=0x61 && arg1<=0x7A + false + + + + 0:255 + + + + + + + + + + + arg1>=0x20 && arg1<=0x7E + false + + + + 0:255 + + + + + + + + + + + arg1>=0x21 && arg1<=0x2F || arg1>=0x3A && arg1<=0x40 || arg1>=0x5B && arg1<=0x60 || arg1>=0x7B && arg1<=0x7E + false + + + + 0:255 + + + + + + + + + + + arg1>=0x09 && arg1<=0x0D || arg1==0x20 + false + + + + 0:255 + + + + + + + + + + + arg1>=0 && arg1<=0x7F + false + + + + + 0:255 + + + + + + + arg1>=0x41 && arg1<=0x5A + false + + + + 0:255 + + + + + + + + + + arg1>=0x30 && arg1<=0x39 || arg1>=0x41 && arg1<=0x46 || arg1>=0x61 && arg1<=0x66 + false + + + + 0:255 + + + + + + + + + false + + + + + 0: + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + dlopen + dlclose + + + + false + + + + + + 0: + + + + + + + + + 0: + + + + + false + + + + + + 0: + + + + + + + + + + false + + + + + + 0: + + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + 0: + + + + + false + + + + + 0: + + + + + 0: + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + 0: + + + + + + + + false + + + + + + 0: + + + + + + + + + false + + + + + + 0: + + + + + + + + false + + + + + + + + + + false + + + + + + 0: + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + 0: + + + + + + + + + false + + + + + + 0: + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + 0: + + + + + false + + + + + 0:999999 + + Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. +The obsolescent function 'usleep' is called. POSIX.1-2001 declares usleep() function obsolescent and POSIX.1-2008 removes it. It is recommended that new applications use the 'nanosleep' or 'setitimer' function. + + + + true + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + 0: + + + + + + + false + + Non reentrant function 'getrpcent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getrpcent_r'. + + + + + false + + + + + + + + Non reentrant function 'getrpcbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getrpcbyname_r'. + + + + + false + + + + + + + Non reentrant function 'getrpcbynumber' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getrpcbynumber_r'. + + + + + false + + + Non reentrant function 'getprotoent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getprotoent_r'. + + + + + false + + + + + + + + + Non reentrant function 'getprotobyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getprotobyname_r'. + + + + + false + + + + + + + Non reentrant function 'getprotobynumber' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getprotobynumber_r'. + + + + + false + + + Non reentrant function 'getservent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getservent_r'. + + + + + false + + + + + + + + + + + + + Non reentrant function 'getservbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getservbyname_r'. + + + + + false + + + + + + + + + + + + Non reentrant function 'getservbyport' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getservbyport_r'. + + + + + false + + + Non reentrant function 'getnetent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getnetent_r'. + + + + + false + + + + + + + + + Non reentrant function 'getnetbyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getnetbyname_r'. + + + + + false + + + + + + + + + + + Non reentrant function 'getnetbyaddr' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getnetbyaddr_r'. + + + + + false + + + Non reentrant function 'gethostent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gethostent_r'. + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + Non reentrant function 'gethostbyname2' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gethostbyname2_r'. + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + 0: + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + Obsolete function 'mktemp' called. It is recommended to use 'mkstemp' or 'mkdtemp' instead. +The function 'mktemp' is considered to be dangerous due to race conditions and some implementations generating only up to 26 different filenames out of each template. This function has been removed in POSIX.1-2008. Use 'mkstemp' or 'mkdtemp' instead. + + + + false + + + + + + + + + 0: + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + 0: + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + 0: + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + 0: + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + 0: + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + 0: + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + 0: + + + + + + + + false + + + 0: + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + -20:19 + + + + + false + + + + + + false + + + + + 0: + + + + + false + + + + + + + + + + + + + 0: + + + + + false + + + + + + 0: + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + 0: + + + + + + + + + + + + + false + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + + + 0: + + + + + 0: + + + + + + + 1: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0: + + + + + + + + 0: + + + + + + + + + + + 0: + + + + + + + + 0: + + + + + + + + + false + + + + + + 0: + + + + + + + + + 0: + + + + + + + false + + + 0: + + + + + + + + + + + 0: + + + + + + + + + + + + + 0: + + + + + + + + 0: + + + + + + + + + + + + + 0: + + + + + + + + + 0: + + + + + + + + + + + + + + + + 0: + + + + + + + + + + + + + 0: + + + + + + + + + 0: + + + + + + + + + + + + + + 0: + + + + + + + + + + + + + + + + + + + 0: + + + + + + + + + 0: + + + + + + + + + + + + + + + false + + + + + + + + 1: + + + + + + + + + + + + + 0: + + + + + + + + + + + false + + + + + + + + 1: + + + + + + + + + + + + + 0: + + + + + + + + + + + false + + + + + + + + 1: + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + 0: + + + + + + + + + + + + + false + + + + + + 0: + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + 0: + + + + + + + + + + false + + + + + + + + + + + 0: + + + + 0: + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + 0: + + + + + + + 0: + + + + + + + + + false + + + + + + + + + + + false + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + false + Non reentrant function 'getpwent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwent_r'. + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + + + + + false + + + + + + + + + + + 0: + + + + + + + + + + + false + + + + + + Non reentrant function 'getpwnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwnam_r'. + + + + + Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + 0: + + + + + + + + + + + false + + + + + Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + 1: + + + + + + + + + + + false + + + + + + + + + + + + + + + + 1: + + + + + + + + + + + + false + + + + + + + + + + + 0: + + + + + 0: + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + + 0: + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + 0: + + + + + + + + + + + false + + + + 0: + + + + + + false + + + + + + + + + + + + + + + false + + + + 0: + + + + + + + + + + + false + + + + 0: + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + 0: + + + + + + + + + 0:2 + + + + + + + false + + + + + 0: + + + + + + + + + 0:2 + + + + + + + false + + + + + 0: + + + + + + + + + 0:2 + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + false + + + + + 0: + + + + + + + + + + 0: + + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + Non reentrant function 'gmtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gmtime_r'. + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + Obsolescent function 'makecontext' called. Applications are recommended to be rewritten to use POSIX threads. + + + + false + + + + + + + + Obsolescent function 'swapcontext' called. Applications are recommended to be rewritten to use POSIX threads. + + + + false + + + + + Obsolescent function 'getcontext' called. Applications are recommended to be rewritten to use POSIX threads. + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + true + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + 0: + + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + + + + + + + + + + false + + + + 1: + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + + + 0: + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + Non reentrant function 'tempnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'tempnam_r'. + + + + + + false + + + + + + + + + + + + + Non reentrant function 'crypt' called. For threadsafe applications it is recommended to use the reentrant replacement function 'crypt_r'. + + + + + + false + + + 0: + + + + Non reentrant function 'ttyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'ttyname_r'. + + + + + + false + + + 0: + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + Non reentrant function 'getspnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getspnam_r'. + + + + + + false + + Non reentrant function 'getspent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getspent_r'. + + + + + + false + + + + + + + Non reentrant function 'fgetspent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'fgetspent_r'. + + + + + + false + + + + + + + + Non reentrant function 'sgetspent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'sgetspent_r'. + + + + + + false + + + + + + + Non reentrant function 'fgetpwent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'fgetpwent_r'. + + + + + + false + + Non reentrant function 'getgrent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrent_r'. + + + + + + false + + + + + + + + + 0: + + + + + + + + + + false + + + + + + + Non reentrant function 'fgetgrent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'fgetgrent_r'. + + + + false + + + + + + + + + + + + + Non reentrant function 'getnetgrent' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getnetgrent_r'. + + + + + + false + + + + + + + + Non reentrant function 'getgrnam' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrnam_r'. + + + + + + false + + + + + + Non reentrant function 'getgrgid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getgrgid_r'. + + + + + + + false + + + + + + + + + + + + + + + + + 0: + + + + + + + + + + + false + + + + + + + + + + + + + + + + 0: + + + + + + + + + + false + + Non reentrant function 'getlogin' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getlogin_r'. + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + 0:255 + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + Non reentrant function 'ctermid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'ctermid_r'. + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + 0:2 + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + arg1==0 &0 + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + 0: + + + + + + + false + + + + + + 0: + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + true + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + 0: + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + false + + + + + false + + + + + + + + + + 1: + + + + + + + + false + + + + + + + + + + + 0: + + + + + + + + false + + + + 0: + + + + + valloc + free + + + posix_memalign + free + + + scandir + free + + + strndup + wcsdup + free + + + getline + getdelim + free + + + mmap + mmap64 + munmap + + + open + mkstemp + creat + openat + socket + close + fdopen + + + opendir + fdopendir + closedir + + + fdopen + fclose + + + popen + pclose + + + mq_open + mq_close + + + getaddrinfo + freeaddrinfo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/protobuf.cfg b/cfg/protobuf.cfg new file mode 100644 index 00000000000..8ff5570c952 --- /dev/null +++ b/cfg/protobuf.cfg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/cfg/python.cfg b/cfg/python.cfg new file mode 100644 index 00000000000..30479cd87b8 --- /dev/null +++ b/cfg/python.cfg @@ -0,0 +1,674 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PyMem_Malloc + PyMem_Calloc + PyMem_Realloc + PyMem_Free + + + PyMem_RawMalloc + PyMem_RawCalloc + PyMem_RawRealloc + PyMem_RawFree + + + PyObject_Malloc + PyObject_Calloc + PyObject_Realloc + PyObject_Free + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + true + + + + + + + + true + + + + + + + + + false + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + 0: + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + false + NULL + + + + + + + + + + + + + + + false + NULL + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + NULL + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + 1: + + + + 0: + + + + + + false + + + + + + + + + false + + + + + 0: + + + + + + + + false + + + + + + 0: + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + diff --git a/cfg/qt.cfg b/cfg/qt.cfg new file mode 100644 index 00000000000..66f6e78b3b6 --- /dev/null +++ b/cfg/qt.cfg @@ -0,0 +1,5605 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + READ + + READ + WRITE + NOTIFY + + + + + connect + + + + + invokeMethod + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + false + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + 0: + + + + + false + + + + + 0: + + + + + false + + + + + + 0: + + + + + false + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + 0: + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + 0: + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + 0: + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + 0,2:36 + + + + + + false + + + + + + + + + 0,2:36 + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + false + + + + + + + false + + + + + + + + + 0,2:36 + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + 0,2:36 + + + + + + false + + + + + + + + + 0,2:36 + + + + + + false + + + + + + + + + 0,2:36 + + + + + + false + + + + + + + + + 0,2:36 + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + true + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + :-1,1: + + + + 1:12 + + + + + 1:31 + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + 0: + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + 0: + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + false + + + + + + + + + false + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + QApplication + QMutexLocker + QRect + QRectF + QSize + QSizeF + QPoint + QPointF + QRegion + QTransform + + + QMutex + QRecursiveMutex + QSemaphore + QReadWriteLock + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/ruby.cfg b/cfg/ruby.cfg new file mode 100644 index 00000000000..fbf037fb1e9 --- /dev/null +++ b/cfg/ruby.cfg @@ -0,0 +1,142 @@ + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + true + + + + + + + + + + + + + + + diff --git a/cfg/sdl.cfg b/cfg/sdl.cfg new file mode 100644 index 00000000000..effc3eab68d --- /dev/null +++ b/cfg/sdl.cfg @@ -0,0 +1,354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + -1 + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + SDL_FreeSurface + SDL_CreateRGBSurface + SDL_CreateRGBSurfaceFrom + SDL_ConvertSurface + TTF_RenderUTF8_Blended + IMG_LoadPNG_RW + IMG_LoadJPG_RW + IMG_Load + + + SDL_DestroyMutex + SDL_CreateMutex + + + SDL_WaitThread + SDL_CreateThread + + + SDL_RWclose + SDL_RWFromFile + + + SDL_FreeRW + SDL_AllocRW + + + Mix_FreeMusic + Mix_LoadMUSType_RW + + diff --git a/cfg/selinux.cfg b/cfg/selinux.cfg new file mode 100644 index 00000000000..31a48c6da5e --- /dev/null +++ b/cfg/selinux.cfg @@ -0,0 +1,3621 @@ + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + get_default_type + free + + + + + + + + false + + + + + + 0:5 + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + selabel_open + selabel_close + + + + + + false + + + + + + + + + + + + + + + + + + + + + selabel_lookup + freecon + + + + + false + + + + + + + + + + + + + + + + + + + + + selabel_lookup_raw + freecon + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + selabel_get_digests_all_partial_matches + free + + + selabel_get_digests_all_partial_matches + free + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + selabel_lookup_best_match + freecon + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + selabel_lookup_best_match_raw + freecon + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + context_new + context_free + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + get_ordered_context_list + freeconary + + + + + false + + + + + + + + + + + + + + + + + + + + + get_ordered_context_list_with_level + freeconary + + + + + false + + + + + + + + + + + + + + + + + get_default_context + freecon + + + + + false + + + + + + + + + + + + + + + + + + + + + get_default_context_with_level + freecon + + + + + false + + + + + + + + + + + + + + + + + + + + + + get_default_context_with_role + freecon + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + get_default_context_with_rolelevel + freecon + + + + + false + + + + + + + + + + + + query_user_context + freecon + + + + + false + + + + + + + + + + + + + manual_user_enter_context + freecon + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + avc_sid_to_context + freecon + + + + + false + + + + + + + + + + + + avc_sid_to_context + freecon + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + 0,1 + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + false + + + + + 0,1 + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + getcon + freecon + + + + + false + + + + + + + + getcon_raw + freecon + + + + + false + + + + + + + + getprevcon + freecon + + + + + false + + + + + + + + getprevcon_raw + freecon + + + + + false + + + + + + + + getexeccon + freecon + + + + + false + + + + + + + + getexeccon_raw + freecon + + + + + false + + + + + + + + + + + + getpidcon + freecon + + + + + false + + + + + + + + + + + + getpidcon_raw + freecon + + + + + false + + + + + + + + + + + + getpidprevcon + freecon + + + + + false + + + + + + + + + + + + getpidprevcon_raw + freecon + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + getfscreatecon + freecon + + + + + false + + + + + + + + getfscreatecon_raw + freecon + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + getkeycreatecon + freecon + + + + + false + + + + + + + + getkeycreatecon_raw + freecon + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + getsockcreatecon + freecon + + + + + false + + + + + + + + getsockcreatecon_raw + freecon + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + 0: + + + + + + + getpeercon + freecon + + + + + false + + + + + + 0: + + + + + + + getpeercon_raw + freecon + + + + + + false + + + + + + + + + + + + + getfilecon + freecon + + + + + false + + + + + + + + + + + + + getfilecon_raw + freecon + + + + + false + + + + + + + + + + + + + lgetfilecon + freecon + + + + + false + + + + + + + + + + + + + lgetfilecon_raw + freecon + + + + + false + + + + + + 0: + + + + + + + fgetfilecon + freecon + + + + + false + + + + + + 0: + + + + + + + fgetfilecon_raw + freecon + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + false + + + + + + 0:4 + + + + + + false + + + + + 0:4 + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + security_compute_create + freecon + + + + + false + + + + + + + + + + + + + + + + + + + + + + security_compute_create_raw + freecon + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + security_compute_create_name + freecon + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + security_compute_create_name_raw + freecon + + + + + false + + + + + + + + + + + + + + + + + + + + + + security_compute_relabel + freecon + + + + + false + + + + + + + + + + + + + + + + + + + + + + security_compute_relabel + freecon + + + + + false + + + + + + + + + + + + + + + + + + + + + + security_compute_member + freecon + + + + + false + + + + + + + + + + + + + + + + + + + + + + security_compute_member_raw + freecon + + + + + false + + + + + + + + + + + + + + + + + + security_compute_user + freeconary + + + + + false + + + + + + + + + + + + + + + + + + security_compute_user_raw + freeconary + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + security_get_initial_context + freecon + + + + + false + + + + + + + + + + + + + security_get_initial_context_raw + freecon + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + 0,1 + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + 0 + + + + + + false + + + + + + + + + + + security_get_boolean_names + free + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + 0,1 + + + + + + false + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + security_canonicalize_context + freecon + + + + + false + + + + + + + + + + + + + security_canonicalize_context + freecon + + + + + + false + + + + + + + false + + + + + 0,1 + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + Disabling SELinux at runtime is deprecated and may not be supported on modern Linux kernels. + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + security_av_string + free + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + 0:7 + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + matchpathcon + freecon + + + + + false + + + + + + + + + + + + + + + + + matchpathcon_index + freecon + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + matchmediacon + freecon + + + + + + false + + + + + + + + + + + false + + + + + + + + + + selinux_boolean_sub + free + + + + + + false + + + + + + + + selinux_getpolicytype + free + + + + + + false + + + + + + + false + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + selinux_raw_context_to_color + free + + + + + false + + + + + + + + + + + + + selinux_trans_to_raw_context + free + + + + + false + + + + + + + + + + + + + selinux_raw_to_trans_context + free + + + + + + false + + + + + + + + + + + + + + + + getseuserbyname + free + + + getseuserbyname + free + + + + + false + + + + + + + + + + + + + + + + + + + + getseuser + free + + + getseuser + free + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + This function is not thread safe. Be very sure that no other threads are calling into libselinux when this is called. + + diff --git a/cfg/sfml.cfg b/cfg/sfml.cfg new file mode 100644 index 00000000000..4b9be7bbd4e --- /dev/null +++ b/cfg/sfml.cfg @@ -0,0 +1,301 @@ + + + + false + + + + + false + + + + + + + false + + + + + false + + + + + false + + + + + false + + + + false + + + + + + false + + + + + + false + + + + + + + + 0: + + + + false + + + + + 0: + + + + + + + false + + + + 0: + + + + + + + false + + + + + + + false + + + + + + + false + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + false + + + + + + + + false + + + + false + + + + + + + + + + + + + + + + false + + + + false + + + + + + false + + + + + false + + + + + + false + + + + + false + + + + + + + false + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + 0: + + + + false + + + + 0:100 + + + + false + + + + false + + + + + + false + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/sqlite3.cfg b/cfg/sqlite3.cfg new file mode 100644 index 00000000000..6c5811f1f75 --- /dev/null +++ b/cfg/sqlite3.cfg @@ -0,0 +1,1571 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sqlite3_malloc + sqlite3_malloc64 + sqlite3_free + + + + sqlite3_str_new + sqlite3_str_finish + + + + sqlite3_str_finish + sqlite3_free + + + + sqlite3_mprintf + sqlite3_vmprintf + sqlite3_free + + + + sqlite3_expanded_sql + sqlite3_free + + + + + sqlite3_open + sqlite3_open16 + sqlite3_open_v2 + sqlite3_close + sqlite3_close_v2 + + + + + + false + + + + + + + 1: + + + + + + + 0: + + + + + + + + + + false + + + + + + + 1: + + + + + + + + + + + false + + + + + + + 1: + + + + + + + + + + false + + + + + + + + 1: + + + + + + false + + + + + + + 1: + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + -1:127 + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + 1: + + + + + false + + + + + 1: + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + The sqlite3_prepare() interface is legacy and should be avoided + + + + + + + + + + + + + + + + + + + + + false + + The sqlite3_prepare16() interface is legacy and should be avoided + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + 0: + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + diff --git a/cfg/std.cfg b/cfg/std.cfg new file mode 100644 index 00000000000..ec5fbb72548 --- /dev/null +++ b/cfg/std.cfg @@ -0,0 +1,9232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + true + + + + + + + arg1>0?arg1:-arg1 + false + + + + + + + + + + + arg1>0?arg1:-arg1 + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + acos(arg1) + false + + + + -1.0:1.0 + + + + + + + acos(arg1) + false + + + + -1.0:1.0 + + + + + + + acos(arg1) + false + + + + -1.0:1.0 + + + + + + + acosh(arg1) + false + + + + 1.0: + + + + + + + acosh(arg1) + false + + + + 1.0: + + + + + + + acosh(arg1) + false + + + + 1.0: + + + + + + + false + + + + + + + + + + false + + + + + + + + + 26: + + + + + + + + + + + + + + + + + + + + + sqrt(arg1) + false + + + + 0.0: + + + + + + + sqrt(arg1) + false + + + + 0.0: + + + + + + + sqrt(arg1) + false + + + + 0.0: + + + + + + + + + false + + + + + + + + + + sinh(arg1) + false + + + + + + + + + + sinh(arg1) + false + + + + + + + + + + sinh(arg1) + false + + + + + + + + + + sin(arg1) + false + + + + + + + + + + sin(arg1) + false + + + + + + + + + + sin(arg1) + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + asin(arg1) + false + + + -1.0:1.0 + + + + + + + + asin(arg1) + false + + + -1.0:1.0 + + + + + + + + asin(arg1) + false + + + -1.0:1.0 + + + + + + + + + + false + + + + + + + + + + asinh(arg1) + false + + + + + + + + + + asinh(arg1) + false + + + + + + + + + + asinh(arg1) + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + + + + tan(arg1) + false + + + + + + + + + + tan(arg1) + false + + + + + + + + + + tan(arg1) + false + + + + + + + + + + + + false + + + + + + + + + + tanh(arg1) + false + + + + + + + + + + tanh(arg1) + false + + + + + + + + + + tanh(arg1) + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + 1:31 + + + + + + false + + + + + + + + + false + + + + + 1:31 + + + + + + false + + + + + + + + + + + atan(arg1) + false + + + + + + + + + + atan(arg1) + false + + + + + + + + + + atan(arg1) + false + + + + + + + + + + + + false + + + + + + + + + + + tgamma(arg1) + false + + + + + !0.0: + + + + + + + + tgamma(arg1) + false + + + + + !0.0: + + + + + + + + tgamma(arg1) + false + + + + + !0.0: + + + + + + + trunc(arg1) + false + + + + + + + + + + trunc(arg1) + false + + + + + + + + + + trunc(arg1) + false + + + + + + + + + + atanh(arg1) + false + + + + -1.0:1.0 + + + + + + + atanh(arg1) + false + + + + -1.0:1.0 + + + + + + + atanh(arg1) + false + + + + -1.0:1.0 + + + + + + + + + false + + + + + + + + + + atan2(arg1, arg2) + false + + + + + + + + + + + + + atan2(arg1, arg2) + false + + + + + + + + + + + + + atan2(arg1, arg2) + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + 0: + + + + 0: + + + + + + + ceil(arg1) + false + + + + + + + + + + ceil(arg1) + false + + + + + + + + + + ceil(arg1) + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + cbrt(arg1) + false + + + + + + + + + + cbrt(arg1) + false + + + + + + + + + + cbrt(arg1) + false + + + + + + + + + + cos(arg1) + false + + + + + + + + + + cos(arg1) + false + + + + + + + + + + cos(arg1) + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + 26: + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + :-1,1: + + + + + + + false + + + + + + + :-1,1: + + + + + true + + + + + + + + + + + erf(arg1) + false + + + + + + + + + + erf(arg1) + false + + + + + + + + + + erf(arg1) + false + + + + + + + + + + erfc(arg1) + false + + + + + + + + + + erfc(arg1) + false + + + + + + + + + + erfc(arg1) + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + exp(arg1) + false + + + + + + + + + + exp(arg1) + false + + + + + + + + + + exp(arg1) + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + exp2(arg1) + false + + + + + + + + + + exp2(arg1) + false + + + + + + + + + + exp2(arg1) + false + + + + + + + + + + expm1(arg1) + false + + + + + + + + + + expm1(arg1) + false + + + + + + + + + + expm1(arg1) + false + + + + + + + + + true + + + + + + + false + + + + + + + + + + + + fabs(arg1) + false + + + + + + + + + + fabs(arg1) + false + + + + + + + + + + fabs(arg1) + false + + + + + + + + + + fdim(arg1, arg2) + false + + + + + + + + + + + + + fdim(arg1, arg2) + false + + + + + + + + + + + + + fdim(arg1, arg2) + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + floor(arg1) + false + + + + + + + + + + floor(arg1) + false + + + + + + + + + + floor(arg1) + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + fmax(arg1,arg2) + false + + + + + + + + + + + + + fmax(arg1,arg2) + false + + + + + + + + + + + + + fmax(arg1,arg2) + false + + + + + + + + + + + + + fmin(arg1,arg2) + false + + + + + + + + + + + + + fmin(arg1,arg2) + false + + + + + + + + + + + + + fmin(arg1,arg2) + false + + + + + + + + + + + + + fmod(arg1,arg2) + false + + + + + + + !0.0 + + + + + + + fmod(arg1,arg2) + false + + + + + + + !0.0 + + + + + + + fmod(arg1,arg2) + false + + + + + + + !0.0 + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + 0: + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + hypot(arg1, arg2) + false + + + + + + + + + + + + + + + + hypot(arg1, arg2) + false + + + + + + + + + + + + + hypot(arg1, arg2) + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + 0:2 + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + 0: + + + + + + + + + + false + + + + + + + + 0: + + + + + + false + + + + + + + + 0: + + + + + + false + + + + + + + 0: + + + + + + + + + + + + false + + + + 0:255 + + + + + + false + + + + + + + + + false + + + + + + false + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + 0: + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + 0: + + + + + + false + + + + + + false + + + + 0:255 + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + Obsolete function 'gets' called. It is recommended to use 'fgets' or 'gets_s' instead. +The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun if the input data exceeds the size of the buffer. It is recommended to use the functions 'fgets' or 'gets_s' instead. + + + + + false + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + arg1>=0x30 && arg1<=0x39 || arg1>=0x41 && arg1 <=0x5A || arg1>=0x61 && arg1 <=0x7A + false + + + + + 0:255 + + + + + + + arg1>=0x30 && arg1<=0x39 || arg1>=0x41 && arg1 <=0x5A || arg1>=0x61 && arg1 <=0x7A + false + + + + + + + + + + + arg1>='A' && arg1<='Z' || arg1>='a' && arg1 <='z' + false + + + + + 0:255 + + + + + + + arg1>='A' && arg1<='Z' || arg1>='a' && arg1 <='z' + false + + + + + + + + + + + arg1==' ' || arg1=='\t' + false + + + + + 0:255 + + + + + + + arg1==' ' || arg1=='\t' + false + + + + + + + + + + + arg1==0x7F || arg1<=0x1F + false + + + + + 0:255 + + + + + + + arg1==0x7F || arg1<=0x1F + false + + + + + + + + + + + + false + + + + + + + + + + + + + arg1>='0' && arg1<='9' + false + + + + + 0:255 + + + + + + + arg1>='0' && arg1<='9' + false + + + + + + + + + + + arg1>=0x21 && arg1<=0x7E + false + + + + + 0:255 + + + + + + + arg1>=0x21 && arg1<=0x7E + false + + + + + + + + + + + arg1>=0x61 && arg1<=0x7A + false + + + + + 0:255 + + + + + + + arg1>=0x61 && arg1<=0x7A + false + + + + + + + + + + + arg1>=0x20 && arg1<=0x7E + false + + + + + 0:255 + + + + + + + arg1>=0x20 && arg1<=0x7E + false + + + + + + + + + + + arg1>=0x21 && arg1<=0x2F || arg1>=0x3A && arg1<=0x40 || arg1>=0x5B && arg1<=0x60 || arg1>=0x7B && arg1<=0x7E + false + + + + + 0:255 + + + + + + + arg1>=0x21 && arg1<=0x2F || arg1>=0x3A && arg1<=0x40 || arg1>=0x5B && arg1<=0x60 || arg1>=0x7B && arg1<=0x7E + false + + + + + + + + + + + arg1>=0x09 && arg1<=0x0D || arg1==0x20 + false + + + + + 0:255 + + + + + + + arg1>=0x09 && arg1<=0x0D || arg1==0x20 + false + + + + + + + + + + + arg1>=0x41 && arg1<=0x5A + false + + + + + 0:255 + + + + + + + arg1>=0x41 && arg1<=0x5A + false + + + + + + + + + + + arg1>=0x30 && arg1<=0x39 || arg1>=0x41 && arg1<=0x46 || arg1>=0x61 && arg1<=0x66 + false + + + + + 0:255 + + + + + + + arg1>=0x30 && arg1<=0x39 || arg1>=0x41 && arg1<=0x46 || arg1>=0x61 && arg1<=0x66 + false + + + + + + + + + + + + false + + + + + + + + + + + + + arg1 < 'A' || arg1 > 'Z' ? arg1 : arg1 + 32 + false + + + + + + + + + + arg1 < 'a' || arg1 > 'z' ? arg1 : arg1 - 32 + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + arg1>0?arg1:-arg1 + false + + + + + + + + + + arg1>0?arg1:-arg1 + false + + + + + + + + + + ldexp(arg1,arg2) + false + + + + + + + + + + + + + ldexp(arg1,arg2) + false + + + + + + + + + + + + + ldexp(arg1,arg2) + false + + + + + + + + + + + + + + lgamma(arg1) + false + + + + + !0.0: + + + + + + + + lgamma(arg1) + false + + + + + !0.0: + + + + + + + + lgamma(arg1) + false + + + + + !0.0: + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + false + + + + + 0: + + + + + + + false + + + + + + + :-1,1: + + + + + + + false + + + + + + + :-1,1: + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + log(arg1) + false + + + + 4.94066e-324: + + + + + + log(arg1) + false + + + + 1.4013e-45: + + + + + + log(arg1) + false + + + + 4.94066e-324: + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + arg1>arg2?1:0 + false + + + + + + + + + + + + + arg1>arg2?1:0 + false + + + + + + + + + + + + + arg1 >= arg2?1:0 + false + + + + + + + + + + + + + arg1 >= arg2?1:0 + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + logb(arg1) + false + + + + + + + + + + logb(arg1) + false + + + + + + + + + + logb(arg1) + false + + + + + + + + + + arg1<arg2?1:0 + false + + + + + + + + + + + + + arg1 <= arg2?1:0 + false + + + + + + + + + + + + + (arg1<arg2 || arg1>arg2)?1:0 + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + ilogb(arg1) + false + + + + + + + + + + ilogb(arg1) + false + + + + + + + + + + ilogb(arg1) + false + + + + + + + + + + log10(arg1) + false + + + + 4.94066e-324: + + + + + + + log10(arg1) + false + + + + 1.4013e-45: + + + + + + + log10(arg1) + false + + + + 4.94066e-324: + + + + + + + log1p(arg1) + false + + + + + + + + + + log1p(arg1) + false + + + + + + + + + + log1p(arg1) + false + + + + + + + + + + log2(arg1) + false + + + + 4.94066e-324: + + + + + + + log2(arg1) + false + + + + 1.4013e-45: + + + + + + + log2(arg1) + false + + + + 4.94066e-324: + + + + + + + nearbyint(arg1) + false + + + + + + + + + + nearbyint(arg1) + false + + + + + + + + + + nearbyint(arg1) + false + + + + + + + + + + nextafter(arg1) + false + + + + + + + + + + + + + nextafter(arg1) + false + + + + + + + + + + + + + nextafter(arg1) + false + + + + + + + + + + + + + nexttoward(arg1) + false + + + + + + + + + + + + + nexttoward(arg1) + false + + + + + + + + + + + + + nexttoward(arg1) + false + + + + + + + + + + + true + + + + + + + + + + + + + + false + + + 0: + + + + + + + false + + + 0: + + + + + + + false + + + + + + 0: + + + + + + + + + false + + + + + + + + + + 0: + + + + + 0: + + + + + + + + false + + + + + + + + + + 0: + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + 0: + + + + + + + + + 0: + + + + + false + + + + + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + 0: + + + + + + + 0: + + + + + + false + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + pow(arg1, arg2) + false + + + + + + + + + + + + + pow(arg1, arg2) + false + + + + + + + + + + + + + pow(arg1, arg2) + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + !0.0 + + + + + + + + + + + false + + + + + + + !0.0 + + + + + + + + + + + false + + + + + + + !0.0 + + + + + + + + + + remainder(arg1,arg2) + false + + + + + + + !0.0 + + + + + + + remainder(arg1,arg2) + false + + + + + + + !0.0 + + + + + + + remainder(arg1,arg2) + false + + + + + + + !0.0 + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + 0: + + + + 0: + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + 0: + + + + 0: + + + + + + + + + false + + + + + + + + + + 0: + + + + 0: + + + + + + + + + + + false + + + + + 0: + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + 0: + + + + + + false + + + + + 0: + + + + + + false + + + + + 0: + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + 0: + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + round(arg1) + false + + + + + + + + + + round(arg1) + false + + + + + + + + + + round(arg1) + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + maybe + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + 0:2 + + + + 0: + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + 0:255 + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + arg1 + false + + + + + + + + + + + + + + + false + + + + + + + + + 1: + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + + + + + + strlen(arg1) + false + + + + + + + + + + arg1 + false + + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + 0: + + + + + + + + + + false + + + + + + + + + + 0: + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + 0: + + + + + + + + + false + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + 0:255 + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + 0: + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + 0: + + + + + + + false + + + + + + + false + + + + + + arg1 < 'A' || arg1 > 'Z' ? arg1 : arg1 + 32 + false + + + + + 0:255 + + + + + + arg1 < 'a' || arg1 > 'z' ? arg1 : arg1 - 32 + false + + + + + 0:255 + + + + + + false + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + 0: + + + + 0:255 + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + arg1<arg2?arg2:arg1>arg3?arg3:arg1 + + + + + + + + + + + + + + + + + false + + + arg1<arg2?arg1:arg2 + + + + + + + + + + + false + + + arg1>arg2?arg1:arg2 + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + 0: + + + + + + false + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + 0: + + + + + + + false + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + false + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + 0: + + + + + false + + + + + 0: + + + + + false + + + + + + + + + + false + + + + + 0: + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + arg1 + + + + + + + + + + + + + false + & arg1 + + + + + false + + + + false + + + + + + + false + + + 0: + + + + + + + + false + + + 0: + + + + + + + + false + + + 0: + + + + + + + + false + + + 0: + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + 0: + + + + + 0: + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + 0: + + + + 0: + + + + + + + false + + + 0: + + + + 0: + + + + + + + false + + + 0: + + + + 0: + + + + + + + false + + + 0: + + + + 0: + + + + + + + false + + + + false + + + + + + + + false + + + + + + + + + 0: + + + + + false + + + + + + + + + 0: + + + + + false + + + + + + + + + 0: + + + + + false + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + + + + + false + + + + + + + + + + + 2:36 + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + 0: + + + + + + + + false + + + 0: + + + + 0: + + + + + + false + + + 0: + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + 0: + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + true + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + 0: + + + + + + false + + + 0: + + + + + + false + + + 0: + + + + 0: + + + + + + false + + + + + + + + false + + + + + + + + false + + + false + + + + + + + false + + + false + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + malloc,std::malloc + calloc,std::calloc + aligned_alloc,std::aligned_alloc + realloc,std::realloc + free,std::free + + + strdup,std::strdup + free,std::free + + + fopen,std::fopen + tmpfile,std::tmpfile + freopen,std::freopen + fclose,std::fclose + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + std::fstream + std::wfstream + std::ofstream + std::wofstream + std::basic_fstream + std::basic_ofstream + std::insert_iterator + std::lock_guard + std::scoped_lock + std::unique_lock + std::shared_lock + std::pair + std::complex + std::exception + std::logic_error + std::domain_error + std::invalid_argument + std::length_error + std::out_of_range + std::future_error + std::runtime_error + std::range_error + std::overflow_error + std::underflow_error + std::regex_error + std::system_error + std::format_error + std::bad_typeid + std::bad_cast + std::monostate + std::bad_optional_access + std::bad_expected_access + std::bad_weak_ptr + std::bad_function_call + std::bad_alloc + std::bad_array_new_length + std::bad_exception + std::ios_base::failure + std::filesystem::filesystem_error + std::bad_variant_access + std::span + std::stringstream + std::wstringstream + std::istringstream + std::wistringstream + std::ostringstream + std::wostringstream + + + std::mutex + std::recursive_mutex + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/tinyxml2.cfg b/cfg/tinyxml2.cfg new file mode 100644 index 00000000000..e652fa9c11d --- /dev/null +++ b/cfg/tinyxml2.cfg @@ -0,0 +1,37 @@ + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + diff --git a/cfg/vcl.cfg b/cfg/vcl.cfg new file mode 100644 index 00000000000..bf288ce32b1 --- /dev/null +++ b/cfg/vcl.cfg @@ -0,0 +1,4 @@ + + + + diff --git a/cfg/windows.cfg b/cfg/windows.cfg new file mode 100644 index 00000000000..6a0bd111afa --- /dev/null +++ b/cfg/windows.cfg @@ -0,0 +1,17237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CreatePen + CreateBrushIndirect + CreateDIBPatternBrush + CreateDIBPatternBrushPt + CreateHatchBrush + CreatePatternBrush + CreateSolidBrush + CreateFont + CreateFontIndirect + CreateFontIndirectEx + CreateBitmap + CreateBitmapIndirect + CreateCompatibleBitmap + CreateDIBitmap + CreateDIBSection + CreateDiscardableBitmap + CreateEllipticRgn + CreateEllipticRgnIndirect + CreatePolygonRgn + CreatePolyPolygonRgn + CreateRectRgn + CreateRectRgnIndirect + CreateRoundRectRgn + CreateHalftonePalette + CreatePalette + DeleteObject + + + closesocket + socket + + + CreateThread + CreateFile + CreateFileA + CreateFileW + OpenFile + CreateJobObject + CreateRemoteThread + CreateConsoleScreenBuffer + OpenBackupEventLog + OpenEventLog + CreateFileMapping + CreateFileMappingFromApp + CreateFileMappingNuma + CreateMemoryResourceNotification + OpenFileMapping + CreateNamedPipe + CreateEvent + CreateEventA + CreateEventW + CreateEventEx + CreateEventExA + CreateEventExW + CreateMutex + CreateMutexA + CreateMutexW + CreateMutexEx + CreateMutexExA + CreateMutexExW + CreateSemaphore + CreateSemaphoreA + CreateSemaphoreW + CreateSemaphoreEx + CreateSemaphoreExA + CreateSemaphoreExW + CreateTimerQueue + CreateWaitableTimer + OpenEvent + OpenEventA + OpenEventW + OpenMutex + OpenMutexA + OpenMutexW + OpenSemaphore + OpenSemaphoreA + OpenSemaphoreW + OpenWaitableTimer + OpenJobObject + OpenProcess + OpenThread + CreateMailslot + CloseHandle + + + FindFirstFile + FindFirstFileW + FindFirstFileA + FindFirstFileEx + FindFirstFileExW + FindFirstFileExA + FindFirstFileNameW + FindFirstFileNameTransactedW + FindFirstStreamTransactedW + FindFirstFileTransacted + FindFirstFileTransactedA + FindFirstFileTransactedW + FindFirstStreamW + FindClose + + + OpenSCManager + OpenService + CreateService + CloseServiceHandle + + + LockServiceDatabase + UnlockServiceDatabase + + + HeapCreate + HeapDestroy + + + _wfopen + _tfopen + _wfopen_s + _tfopen_s + fclose + _fcloseall + + + _open + _topen + _wopen + _close + + + _popen + _wpopen + _tpopen + _pclose + + + LoadLibrary + LoadLibraryA + LoadLibraryW + LoadLibraryEx + LoadLibraryExA + LoadLibraryExW + + + FreeLibrary + FreeLibraryAndExitThread + + + UuidToString + UuidToStringA + UuidToStringW + RpcStringFree + + + ExAllocatePool + ExAllocatePoolWithQuota + ExAllocatePoolWithQuotaTag + ExAllocatePoolWithTag + ExAllocatePoolWithTagPriority + ExFreePool + ExFreePoolWithTag + + + _dupenv_s + _wdupenv_s + _tdupenv_s + free + + + HeapAlloc + HeapReAlloc + HeapFree + + + IoAllocateErrorLogEntry + IoWriteErrorLogEntry + IoFreeErrorLogEntry + + + IoAllocateIrp + IoFreeIrp + IofCallDriver + IoCallDriver + + + IoAllocateMdl + IoFreeMdl + + + MmAllocateContiguousMemory + MmFreeContiguousMemory + + + MmAllocateContiguousMemorySpecifyCache + MmAllocateContiguousMemorySpecifyCacheNode + MmFreeContiguousMemorySpecifyCache + + + IoAllocateWorkItem + IoFreeWorkItem + + + RtlAllocateHeap + RtlFreeHeap + + + ExAllocateFromPagedLookasideList + ExFreeToPagedLookasideList + + + ExAllocateFromNPagedLookasideList + ExFreeToNPagedLookasideList + + + AllocateHeap + FreeHeap + + + AllocateLsaHeap + FreeLsaHeap + + + AllocatePrivateHeap + FreePrivateHeap + + + VirtualAlloc + VirtualFree + + + VirtualAllocEx + VirtualAllocExNuma + VirtualFreeEx + + + LocalAlloc + LocalFree + + + GlobalAlloc + GlobalFree + SetClipboardData + + + MapViewOfFile + MapViewOfFileEx + MapViewOfFileExNuma + MapViewOfFileFromApp + UnmapViewOfFile + + + RtlCreateHeap + RtlDestroyHeap + + + strdup + wcsdup + _strdup + _wcsdup + _mbsdup + _tcsdup + _malloc_dbg + _calloc_dbg + _strdup_dbg + _wcsdup_dbg + _tcsdup_dbg + free + _free_dbg + + + _aligned_malloc + _aligned_malloc_dbg + _aligned_offset_malloc + _aligned_offset_malloc_dbg + _aligned_free + _aligned_free_dbg + + + CoTaskMemAlloc + CoTaskMemFree + + + _malloca + + _freea + + + AllocateAndInitializeSid + FreeSid + + + + false + + + + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + false + + + + + + + 0: + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + 0: + + + + false + + + + + + + + 0: + + + + + true + + + true + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + 0: + + + + + + + false + + + + + + 0: + + + + + false + + + + + + + + + + false + + + + + 0: + + + + + + + + 0: + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + false + + + + + + arg1 + false + + + + + + + + + + + + + + + arg1 + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + 1: + + Security Warning: Consider using StringCchCopy instead. Using this function incorrectly can compromise the security of your application. This function uses structured exception handling (SEH) to catch access violations and other errors. When this function catches SEH errors, it returns NULL without null-terminating the string and without notifying the caller of the error. The caller is not safe to assume that insufficient space is the error condition. + + + + false + + + + + + + + + + + + + + + 1: + + Security Warning: Consider using StringCchCopy instead. Using this function incorrectly can compromise the security of your application. This function uses structured exception handling (SEH) to catch access violations and other errors. When this function catches SEH errors, it returns NULL without null-terminating the string and without notifying the caller of the error. The caller is not safe to assume that insufficient space is the error condition. + + + + + false + + + + + + + + + + 1: + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + 1: + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + It is recommend you use _stricmp instead. + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + 0: + + + + + + + + + + + false + + + + + + + + + 0: + + + + 0: + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + These POSIX functions are deprecated. Use the ISO C++ conformant _strdup, _wcsdup, _mbsdup instead. + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + + false + strcmp(arg1,arg2) + + + + + + + + + + + + + + + + + false + strcmp(arg1,arg2) + + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + 0:2 + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + false + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + arg1>0?arg1:-arg1 + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + 0 + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + 0: + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + false + + + + 0: + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + 0: + + + + 0: + + + + + + false + + + + + + false + + + + + + + + + + + + + + + false + + + 0: + + + + + false + + + + + + + + + + + + + + + + 0: + + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + + + + false + + + + + + + + + + + + 0: + + + + + + false + + + + 0: + + + + + + + + false + + + + + + + + + + + false + + strlen(arg1) + + + + + + + + + + + + + + + false + + strlen(arg1) + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + 0: + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + 0 + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + 0: + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + true + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + 1: + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + Due to security concerns it is not recommended to use this function, see MSDN for details. + + + + + + + + + + + + + + + + false + + + Due to security concerns it is not recommended to use this function, see MSDN for details. + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + Due to security concerns it is not recommended to use this function, see MSDN for details. + + + + + + + + + + + + + + + + false + + Due to security concerns it is not recommended to use this function, see MSDN for details. + + + + + + + + + false + + + + + + + + + 1: + + + + + + + + + + false + + + + + + + + + 1: + + + + + + + + + 0 + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + 1: + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + 0,1 + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + 0: + + + + + + false + + + + 0: + + This function is deprecated because a more secure version is available '_malloca'. + + + + false + + + + + + + + arg1 + false + + + + + + + + + + arg1 + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + 0: + + + + + false + + + + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + 1: + + + + + false + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + arg1 < 'A' || arg1 > 'Z' ? arg1 : arg1 + 32 + false + + + + 0:255 + + + + + + + false + + + + 0:255 + + + + + + + + + + false + + + + + + + + + + + + arg1 < 'a' || arg1 > 'z' ? arg1 : arg1 - 32 + false + + + + 0:255 + + + + + + + false + + + + 0:255 + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + 0: + + + + + + + + + + false + + + + + + + + + + + + + 0: + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + 2:36 + + + + + false + + + + + + + + + + + + + + 2:36 + + + + + + false + + + + + + + + + + 0: + + + + + + + + + + false + + + + + + 0: + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + This function is obsolete. The ControlTrace function supersedes this function. + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + + 0: + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + GetVersion may be altered or unavailable for releases after Windows 8.1. Instead, use the Version Helper functions + + + + false + + + GetVersionEx may be altered or unavailable for releases after Windows 8.1. Instead, use the Version Helper functions + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/wxsqlite3.cfg b/cfg/wxsqlite3.cfg new file mode 100644 index 00000000000..0987c3d5275 --- /dev/null +++ b/cfg/wxsqlite3.cfg @@ -0,0 +1,1955 @@ + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + false + + + + + + + false + + + + diff --git a/cfg/wxsvg.cfg b/cfg/wxsvg.cfg new file mode 100644 index 00000000000..c4e60d630f0 --- /dev/null +++ b/cfg/wxsvg.cfg @@ -0,0 +1,16905 @@ + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -3.402823e+38:3.402823e+38 + + + + + false + + + + + + -3.402823e+38:3.402823e+38 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + -3.402823e+38:3.402823e+38 + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -3.402823e+38:3.402823e+38 + + + + + false + + + + + + -3.402823e+38:3.402823e+38 + + + + + -3.402823e+38:3.402823e+38 + + + + + false + + + + + + -3.402823e+38:3.402823e+38 + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + + + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + + + + + + + false + + + + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + false + + + + + + false + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + -1.79769e+308:1.79769e+308 + + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + -1.79769e+308:1.79769e+308 + + + + + -1.79769e+308:1.79769e+308 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg new file mode 100644 index 00000000000..9dea60761d1 --- /dev/null +++ b/cfg/wxwidgets.cfg @@ -0,0 +1,17313 @@ + + + + + wxAcceleratorEntry + wxAny + wxArchiveIterator + wxArrayDouble + wxArrayInt + wxArrayPtrVoid + wxArrayShort + wxArrayString + wxBitmap + wxBitmapBundle + wxBitmapHandler + wxBoxSizer + wxBrush + wxChar + wxUniChar + wxUniCharRef + wxColour + wxColourDatabase + wxCursor + wxDateSpan + wxDelegateRendererNative + wxHeaderButtonParams + wxRendererNative + wxRendererVersion + wxTextWrapper + wxDCClipper + wxDCBrushChanger + wxDCFontChanger + wxDCPenChanger + wxDCTextColourChanger + wxDCTextBgColourChanger + wxDCTextBgModeChanger + wxFileType + wxFont + wxFlexGridSizer + wxFontEnumerator + wxFontInfo + wxFontList + wxFontMetrics + wxGBPosition + wxGBSizerItem + wxGBSpan + wxGDIObject + wxGraphicsBrush + wxGraphicsFont + wxGraphicsGradientStop + wxGraphicsGradientStops + wxGraphicsMatrix + wxGraphicsPath + wxGridBagSizer + wxGridSizer + wxIcon + wxIconBundle + wxIconLocation + wxIFFHandler + wxImage + wxImageHandler + wxGIFHandler + wxJPEGHandler + wxPCXHandler + wxPNGHandler + wxPNMHandler + wxTGAHandler + wxTIFFHandler + wxXPMHandler + wxMask + wxMetafile + wxNativeFontInfo + wxPalette + wxPen + wxPenList + wxPoint + wxPoint2DDouble + wxPoint2DInt + wxPosition + wxRealPoint + wxRegion + wxRegionContain + wxRegionIterator + wxRegEx + wxRect + wxSize + wxSizer + wxSizerItem + wxSplitterRenderParams + wxStaticBoxSizer + wxStdDialogButtonSizer + wxSystemOptions + wxSystemSettings + wxTarEntry + wxTarInputStream + wxTimeSpan + wxUString + wxVariant + wxVariantData + wxVariantDataCurrency + wxVariantDataErrorCode + wxVariantDataSafeArray + wxVector + wxVersionInfo + wxWrapSizer + wxZipEntry + wxZipInputStream + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + 0: + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + "#arg1" + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + This is the same as 'wxString::IsEmpty' and is kept for wxWidgets 1.xx compatibility. You should not use it in new code. + + + + false + + + + + + This is a wxWidgets 1.xx compatibility function; you should not use it in new code. + + + + + false + + + + This is a wxWidgets 1.xx compatibility function; you should not use it in new code. + + + + + false + + + + + + + + false + + + + This is a wxWidgets 1.xx compatibility function; you should not use it in new code. + + + + + false + + + + + This is a wxWidgets 1.xx compatibility function; you should not use it in new code. + + + + + + false + + + + + This is the same as 'wxString::Len' and is kept for wxWidgets 1.xx compatibility. You should not use it in new code. + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + true + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + 10,16 + + + + + + + false + + + + + + + + + + + + false + + + + 0: + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + 0: + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + 0: + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + 1: + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + 0: + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + This function is deprecated and kept mostly for backwards compatibility. Please override 'wxApp::MacOpenFiles' method instead in any new code. + + + + false + + + + + This function is deprecated, use 'wxPlatformInfo::GetBitness()' instead. + + + + false + + + + + + + + + This function is deprecated, please use 'ToWChar()' instead. + + + + false + + + + + + + + + This function is deprecated, please use 'FromWChar()' instead. + + + + false + + + + + + + This function has been deprecated in favour of 'wxMenuBar::SetMenuLabel()'. + + + + false + + + + + This function only exists for compatibility, please override FormatTimeMS() in the new code. + + + + false + + + + + This function is deprecated. Please use 'wxMenuItem::GetMenuLabel()' or 'wxMenuItem::GetMenuLabelText()' instead. + + + + false + + + + + This function is deprecated. Please use 'wxMenuItem::GetItemLabel()' or 'wxMenuItem::GetItemLabelText()' instead. + + + + false + + + + + This function is deprecated in favour of 'wxMenuItem::GetItemLabel()'. + + + + false + + + + + + This function is deprecated, use 'wxPlatformInfo::GetBitness()' instead. + + + + false + + + + + + + This function is deprecated, use 'wxPGProperty::AddPrivateChild()' instead. + + + + false + + + + This function is deprecated. Ids generated by it can conflict with the Ids defined by the user code, use wxID_ANY to assign ids which are guaranteed to not conflict with the user-defined ids for the controls and menu items you create instead of using this function. + + + + false + + + + + + + + This function is deprecated, use 'wxPGProperty::GetValueAsString()' instead. + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + This function is deprecated, use 'wxPlatformInfo::GetBitnessName()' instead. + + + + false + + + + This function is deprecated, use 'wxPlatformInfo::SetBitness()' instead. + + + + false + + + + This function is deprecated in favour of 'wxMenuItem::SetItemLabel()'. + + + + false + + + + + + + This function is deprecated, please use 'wxFileName::SplitPath()' instead. + + + + false + + + + + + + + + + + + This function is deprecated. This is the old way of detecting tool right clicks, although it will still work, you should use the EVT_TOOL_RCLICKED() macro instead. + + + + false + + + + + + The setup dialog is deprecated, though retained for backward compatibility. + + + + false + + + + + + + This function has been deprecated, use 'wxWindow::Close()' instead. + + + + false + + + + + + The setup dialog is deprecated, though retained for backward compatibility. + + + + false + + + + + + + This function is deprecated use 'CreateThread()' instead. + + + + false + + + + This function is deprecated in favour of 'IsShown()'. + + + + false + + + + + + + This function is deprecated and kept mostly for backwards compatibility. Please override 'PushBack' method instead in any new code. + + + + + false + + + + + + This function should be used instead of changing 'wxCAL_NO_YEAR_CHANGE' style bit directly. It allows or disallows the user to change the year interactively. Only in generic 'wxCalendarCtrl'. + + + + false + + + + + + + This function is deprecated. Construct a wxFileName with wxPATH_UNIX and then use wxFileName::GetFullPath(wxPATH_DOS) instead. + + + + false + + + + + + This function is deprecated. + + + + false + + + + + This function is kept mostly for backwards compatibility. Use 'LastReadCount()' or 'LastWriteCount()' instead. 'LastCount()' is still needed for use with less commonly used functions: 'Discard()', 'Peek()', and 'Unread()'. + + + + + false + + + + + This function is deprecated. + + + + false + + + + This function is deprecated, use GetStream() instead + + + + false + + + + + + This function is deprecated because its name is misleading: notice that the argument is in milliseconds, not microseconds. Please use either 'wxMilliSleep()' or 'wxMicroSleep()' depending on the resolution you need. + + + + false + + + + + + + This function is kept mostly for backwards compatibility. + + + + false + + + + This function is deprecated, use 'wxWindow::SetInitialSize' instead. + + + + false + + + + This function is deprecated, use 'wxTextInputStream::ReadLine()' or 'wxTextInputStream::ReadWord()' instead. + + + + + false + + + + Use 'wxStyledTextEvent::GetString()' instead. + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + This function is deprecated. + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + This function is deprecated, use 'wxDC::SetPalette' instead. + + + + + false + + + + + This function is deprecated and kept mostly for backwards compatibility. Please override 'GetMargins()' method instead in any new code. + + + + false + + + + + + + + + false + + + + + This function is deprecated and kept mostly for backwards compatibility. Please override 'Dismiss()' method instead in any new code. + + + + + false + + This function is deprecated and kept mostly for backwards compatibility. Please override 'Popup()' method instead in any new code. + + + + + false + + + + + + This function is deprecated and kept mostly for backwards compatibility. Please override 'SetMargins()' method instead in any new code. + + + + + false + + + + + + + + + + + + + + + + This function is deprecated and kept mostly for backwards compatibility. Please override 'wxDataViewCustomRenderer::ActivateCell()' method instead in any new code. + + + + + false + + + + + + + + + + + + + + + + + + + This function is deprecated and kept mostly for backwards compatibility. Please override 'wxDataViewCustomRenderer::ActivateCell()' method instead in any new code. + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + This function is deprecated and is replaced by 'wxLog' functionality. + + + + + false + + + + + + This function is deprecated and is replaced by 'wxLog' functionality. + + + + + false + + + + + + This function is deprecated. Construct a 'wxFileName' with 'wxPATH_DOS' and then use 'wxFileName::GetFullPath(wxPATH_UNIX)' instead. + + + + + false + + + + + + + This function is deprecated. Please use 'wxFileName::SplitPath()' instead. + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + This function is deprecated. + + + + + + false + + + + + + + + false + + + + + + This function is deprecated. This is exactly the same as 'FitInside()' in wxWidgets 2.9 and later, please replace calls to it with 'FitInside()'. + + + + false + + + + + + This function is deprecated. This function does not free the old sizer which may result in memory leaks, use 'wxSizerItem::AssignSizer' which does free it instead. + + + + false + + + + + + + + + This is identical to 'wxSizerItem::SetMinSize()', prefer to use the other function, as its name is more clear + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + 0: + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + This function is deprecated. This function does not free the old sizer which may result in memory leaks, use 'wxSizerItem::AssignSpacer' which does free it instead. + + + + false + + + + + + This function is for backward compatibility only, and applications should use 'wxHelpControllerBase::DisplaySection()' instead. + + + + + + false + + + + + This function is deprecated. + + + + false + + + + + This function is deprecated in favour of 'wxIconizeEvent::IsIconized()'. + + + + false + + + + + This function is deprecated, use 'wxList::GetCount()' instead. Returns the number of elements in the list. + + + + + + false + + + + + + This function is deprecated since version 3.1.2, dimensions and depth can only be set at construction time. + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + This function is deprecated, please use 'wxWindow::FindWindowByLabel()' instead. + + + + false + + + + + + This function is deprecated, please use 'wxWindow::FindWindowByName()' instead. + + + + false + + + + + + This function is deprecated, please use 'wxFileName::CreateTempFileName()' instead. + + + + false + + + + + + + + + + This function is deprecated, use 'wxGetUserId()' with no arguments instead. + + + + false + + + + + + + + + + This function is deprecated, use 'wxGetEmailAddress()' with no arguments instead. + + + + false + + + + + + + + + + This function is deprecated, use 'wxGetHostName()' with no arguments instead. + + + + false + + + + + + + + + + This function is deprecated, use 'wxGetUserName()' with no arguments instead. + + + + false + + + + + + + + + + + + This function is deprecated, use 'wxGetCwd()' instead. + + + + false + + + + + + + + + + + + + + This function is deprecated. Please use 'wxGrid::SetCellAlignment(row, col, horiz, vert)' instead. + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + 0 + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + 0: + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + strlen(arg1) + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + This is the same as wxString::Trim() except that it doesn't change this string. This is a wxWidgets 1.xx compatibility function; you should not use it in new code. + + + + + + + + + + + false + + + + + + + + + false + + + + + + This function is deprecated since version 3.1.2, dimensions and depth can only be set at construction time. + + + + + false + + + + 0: + + + + + + + + + + false + + + + + + + + + + 0,2:36 + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + 0,1 + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + 0: + + + + + 0: + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + 0: + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + true + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + 0: + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + 0: + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + 1: + + + + + + + + false + + + 1: + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + false + + + + + + + + + + 0: + + + + + false + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + false + + + + + 0: + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + 0: + + + + + + false + + + + + false + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + 0: + + + + + + + + + false + + + + + + 0: + + + + + false + + + + + + 0: + + + + + false + + + + + + + 0: + + + + + false + + + + + + 1: + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + 0: + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + 1: + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + 0: + + + + + + + false + + + + + + + 0: + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + 0: + + + + + 0: + + + + + + false + + + + + + + 0: + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + false + + + + + + 0: + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + 0:59 + + + + + + + false + + + + + 0:60 + + + + + + + false + + + + + 0:23 + + + + + + + false + + + + + + + + + + false + + + + 1:12 + + + + + + + false + + + + + 1:31 + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + 0: + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + 1: + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + false + + + + + 0.0:1.0 + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + This is a wxWidgets 1.xx compatibility function. Use 'wxString::Mid' in new applications instead. + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + arg1<arg2?arg1:arg2 + + + + + + + + + + + false + + arg1>arg2?arg1:arg2 + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + 1: + + + + + + + + + false + + + + + 0: + + + + + + + false + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + This is a wxWidgets 1.xx compatibility function. Use 'wxString::Find' in new applications instead. + + + + + + + + false + + This is a wxWidgets 1.xx compatibility function. You should not use it in new code. + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + This is a wxWidgets 1.xx compatibility function. Use 'wxString::Truncate' in new applications instead. + + + + false + + + + + + + + + + false + + + This is a wxWidgets 1.xx compatibility function. Use 'wxString::MakeUpper' in new applications instead. + + + + false + + + This is a wxWidgets 1.xx compatibility function. Use 'wxString::MakeLower' in new applications instead. + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + 0:255 + + + + 0:255 + + + + 0:255 + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + 0: + + + + 1: + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + 1: + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + 0: + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + 0: + + + + + 0: + + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + 0: + + + + + false + + + + + + + + 0: + + + + + false + + + + + + + + 0: + + + + + + false + + + + + + + + 0: + + + + + + + false + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + 0:15 + + + + + + + + false + + + + + + + + + 0:15 + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + 0: + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + false + + + + + 0: + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + false + + + + + + + + 0: + + + + + 1: + + + + + false + + + + + + 0: + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + false + + + + + 0: + + + + 0: + + + + + + + 0: + + + + + + false + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + + + false + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + Please note that this method does the same thing as the standard 'reserve()' one and should not be used in new code. + + + + + false + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + 0: + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + + + false + + + + + + diff --git a/cfg/zephyr.cfg b/cfg/zephyr.cfg new file mode 100644 index 00000000000..999de4ea1b5 --- /dev/null +++ b/cfg/zephyr.cfg @@ -0,0 +1,113 @@ + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + 0:2147483647 + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cfg/zlib.cfg b/cfg/zlib.cfg new file mode 100644 index 00000000000..e6584cd6ca1 --- /dev/null +++ b/cfg/zlib.cfg @@ -0,0 +1,1450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + :16 + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + :16 + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + false + + + + + + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + + 0: + + + + + + + + + + + + false + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + gzopen + gzopen64 + gzdopen + gzopen_w + gzclose + gzclose_r + gzclose_w + + + + + + false + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + false + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + 0: + + + + + 0: + + + + + + + + + + + + + false + + + + + + + + + + + + + + + 0: + + + + + + + + false + + + + + + + + + + 0: + + + + + 0: + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + 0: + + + + + + + false + + + + + + + + + 0:255 + + + + + + + + false + + + + + + + + + + + false + + + + 0:255 + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + 0: + + + + + + + + + + 0: + + + + + + + + false + + + + 0: + + + + + + + + + + 0: + + + + + + + + false + + + + 0: + + + + + 0: + + + + + + + + + + + + false + + + + 0: + + + + + + + + + + 0: + + + + + + + + false + + + + 0: + + + + + + + + + + 0: + + + + + + + + false + + + + 0: + + + + + 0: + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + false + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + + + false + + + + + + + + + + + + + false + + + + + + + + + + + false + + + + + + + + + + + + + + + + diff --git a/clang-tidy.md b/clang-tidy.md new file mode 100644 index 00000000000..f00a39cde12 --- /dev/null +++ b/clang-tidy.md @@ -0,0 +1,221 @@ +# clang-tidy + +Below are the reasoning why certain checks are (currently) disabled for out code base + +## Externals + +We do not perform static analysis of the source of the external libraries. `simplecpp` has its own CI with a clang-tidy workflow. + +## Disabled Checks + +`abseil-*`
+`altera-*`
+`android-*`
+`boost-*`
+`darwin-*`
+`fuchsia-*`
+`linuxkernel-*`
+`llvm-*`
+`llvmlibc-*`
+`mpi-*`
+`objc-*`
+`openmp-*`
+`zircon-*`
+ +These are disabled since the platforms/libraries in question are not targeted by us. + +`cert-*`
+`cppcoreguidelines-*`
+`google-*`
+`hicpp-*`
+ +These are coding guidelines we do not follow. Some of the checks might be explicitly enabled though. + +`readability-braces-around-statements`
+`readability-isolate-declaration`
+`readability-uppercase-literal-suffix`
+`readability-identifier-length`
+ +These do not reflect the style we are (currently) enforcing. + +`readability-function-size`
+`readability-function-cognitive-complexity`
+ +We are not interested in the size/complexity of a function. + +`readability-magic-numbers`
+ +These do not (always) increase readability. + +`bugprone-macro-parentheses`
+ +To be documented. + +`readability-implicit-bool-conversion`
+ +This does not appear to be useful as it is reported on very common code. + +`bugprone-narrowing-conversions`
+`performance-no-automatic-move`
+ +It was decided not to apply these. + +`modernize-loop-convert`
+ +These might change the behavior of code which might not be intended (need to file an upstream issue) + +`modernize-raw-string-literal`
+ +This leads to a mismatch of raw string literals and regular ones and does reduce the readability. + +`-clang-analyzer-*`
+ +Disabled because of false positives (need to file upstream bug reports). The checks are also quite time consuming. + +`misc-non-private-member-variables-in-classes`
+ +We intentionally use this. + +`misc-no-recursion`
+ +Leads to lots of "false positives". This seem to enforce a coding guidelines of certain codebases. + +`bugprone-easily-swappable-parameters`
+ +This produces a lot of noise and they are not fixable that easily. + +`readability-container-data-pointer`
+ +Disable because of false positives and inconsistent warnings (need to file an upstream bug report). + +`misc-const-correctness`
+ +Work in progress. + +`bugprone-assignment-in-if-condition`
+ +Is reported for valid patterns we are using. + +`readability-suspicious-call-argument`
+ +Produces a lot of false positives since it is too vague in its analysis. + +`performance-inefficient-string-concatenation`
+ +Produces warnings which might be considered false positives starting with C++11 - see https://github.com/llvm/llvm-project/issues/54526. + +`modernize-avoid-c-arrays`
+ +Produces warnings when `const char[]` is being used which is quite common in our code. Does not make sense to enable before C++17 when `std::string_view` becomes available. +Also reports a false positive about templates which deduce the array length: https://github.com/llvm/llvm-project/issues/60053. + +`misc-include-cleaner`
+ +We run this separately via `clang-include-cleaner` in the `iwyu.yml` workflow as the findings of the include checkers still need to be reviewed manually before applying them. + +`readability-use-concise-preprocessor-directives`
+ +Does not improve the readability. + +`bugprone-branch-clone`
+`modernize-return-braced-init-list`
+`misc-throw-by-value-catch-by-reference`
+`bugprone-signed-char-misuse`
+`concurrency-mt-unsafe`
+`misc-use-anonymous-namespace`
+`performance-avoid-endl`
+`bugprone-switch-missing-default-case`
+`bugprone-empty-catch`
+`readability-avoid-nested-conditional-operator`
+`modernize-use-designated-initializers`
+`readability-enum-initial-value`
+`modernize-use-trailing-return-type`
+`misc-unconventional-assign-operator`
+`bugprone-throwing-static-initialization`
+`bugprone-command-processor`
+`misc-multiple-inheritance`
+ +To be evaluated (need to remove exclusion). + +`cppcoreguidelines-missing-std-forward`
+`cppcoreguidelines-avoid-const-or-ref-data-members`
+`cppcoreguidelines-macro-usage`
+`cppcoreguidelines-pro-type-member-init`
+`cppcoreguidelines-prefer-member-initializer`
+`cppcoreguidelines-misleading-capture-default-by-value`
+`bugprone-argument-comment.CommentBoolLiterals`
+`cert-err33-c`
+`google-readability-namespace-comments`
+`cppcoreguidelines-special-member-functions`
+ +To be evaluated (need to enable explicitly). + +`modernize-type-traits`
+`modernize-use-nodiscard`
+`modernize-use-scoped-lock`
+ +These apply to codebases which use later standards then C++11 (C++17 is used when building with Qt6) so we cannot simply apply them. + +`portability-avoid-pragma-once`
+ +We are not interested in this. + +`readability-redundant-parentheses`
+ +Reports false positives - see https://github.com/llvm/llvm-project/issues/164125. + +`readability-inconsistent-ifelse-braces`
+ +The suggestions are too intrusive. + +`modernize-avoid-c-style-cast`
+ +Currently flags functional casts - see https://github.com/llvm/llvm-project/issues/186784. + +`misc-use-internal-linkage.AnalyzeTypes`
+ +Adding anonymous namespaces requires identation which is too instrusive right now. Would require changes to our fomatting configuration. + +### Disabled for performance reasons + +`portability-std-allocator-const`
+ +Only necessary for code which is exclusively compiled with `libc++`. Also disabled for performance reasons - see https://github.com/llvm/llvm-project/issues/57527#issuecomment-1237935132. + +`modernize-deprecated-ios-base-aliases`
+ +Warns about aliases which are removed in C++20. Also disabled for performance reasons - see https://github.com/llvm/llvm-project/issues/57527#issuecomment-1237935132. + +`bugprone-unchecked-optional-access`
+ +We are not using any `optional` implementation. Also disabled for performance reasons - see https://github.com/llvm/llvm-project/issues/57527#issuecomment-1237935132. + +`modernize-replace-auto-ptr`
+ +Still available until C++17. It is unlikely such code will ever be introduced. Also disabled for performance reasons - see https://github.com/llvm/llvm-project/issues/57527#issuecomment-1237935132. + +`readability-identifier-naming`
+ +We are currently using our own `naming.json` to enforce naming schemes. Also disabled for performance reasons - see https://github.com/llvm/llvm-project/issues/57527#issuecomment-1237935132. + +`portability-simd-intrinsics`
+ +We are not using SIMD instructions and it suggests to use `std::experimental::` features which might not be commonly available. Also disabled for performance reasons - see https://github.com/llvm/llvm-project/issues/57527#issuecomment-1237935132. + +`modernize-macro-to-enum`
+ +It does not seem to produce any warnings for us (needs to be investigated) and it is one of the more expensive checks. + +`misc-unused-using-decls`
+ +This is the most expensive check for several files and it is providing much in terms of code quality. Reported upstream as https://github.com/llvm/llvm-project/issues/72300. + +### Disabled for GUI only + +`readability-convert-member-functions-to-static`
+ +Disabled because of false positives with Qt `slot` methods (see https://github.com/llvm/llvm-project/issues/57520). + +`readability-redundant-access-specifiers`
+ +Reports warning with the Qt ` slots:` syntax in class declarations - see https://github.com/llvm/llvm-project/issues/60055. diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt new file mode 100644 index 00000000000..f63f3291849 --- /dev/null +++ b/cli/CMakeLists.txt @@ -0,0 +1,66 @@ +file(GLOB hdrs "*.h") +file(GLOB srcs "*.cpp") +file(GLOB mainfile "main.cpp") +list(REMOVE_ITEM srcs ${mainfile}) + +add_library(cli ${hdrs} ${srcs}) +target_include_directories(cli PUBLIC .) +target_link_libraries(cli PRIVATE cppcheck-core frontend tinyxml2 simplecpp picojson) +if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS) + target_precompile_headers(cli PRIVATE precompiled.h) +endif() + +if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 13) + # false positive warning in Clang 13 - caused by FD_ZERO macro + set_source_files_properties(processexecutor.cpp PROPERTIES COMPILE_FLAGS -Wno-reserved-identifier) +endif() + +if (BUILD_CLI) + list(APPEND cppcheck_SOURCES ${hdrs} ${mainfile}) + if (WIN32) + list(APPEND cppcheck_SOURCES version.rc) + endif() + + add_executable(cppcheck ${cppcheck_SOURCES}) + target_link_libraries(cppcheck cppcheck-core cli tinyxml2 simplecpp) + if (WIN32 AND NOT BORLAND) + if(NOT MINGW) + target_link_libraries(cppcheck Shlwapi.lib) + else() + target_link_libraries(cppcheck shlwapi) + endif() + endif() + target_link_libraries(cppcheck ${CMAKE_THREAD_LIBS_INIT}) + + add_dependencies(cppcheck copy_cfg) + add_dependencies(cppcheck copy_addons) + add_dependencies(cppcheck copy_platforms) + if (NOT DISABLE_DMAKE) + add_dependencies(cppcheck run-dmake) + endif() + + install(TARGETS cppcheck + RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} + COMPONENT applications) + + install(PROGRAMS ${CMAKE_SOURCE_DIR}/htmlreport/cppcheck-htmlreport + DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} + COMPONENT applications) + + install(FILES ${addons_py} + DESTINATION ${FILESDIR_DEF}/addons + COMPONENT headers) + + install(FILES ${addons_json} + DESTINATION ${FILESDIR_DEF}/addons + COMPONENT headers) + + install(FILES ${cfgs} + DESTINATION ${FILESDIR_DEF}/cfg + COMPONENT headers) + + install(FILES ${platforms} + DESTINATION ${FILESDIR_DEF}/platforms + COMPONENT headers) + +endif() diff --git a/cli/cli.pro b/cli/cli.pro deleted file mode 100644 index 7003c078e06..00000000000 --- a/cli/cli.pro +++ /dev/null @@ -1,53 +0,0 @@ -TEMPLATE = app -TARGET = cppcheck -DEPENDPATH += . -INCLUDEPATH += . ../lib -OBJECTS_DIR = temp -CONFIG += warn_on -CONFIG -= qt app_bundle - -BASEPATH = ../externals/tinyxml/ -include($$PWD/../externals/tinyxml/tinyxml.pri) -BASEPATH = ../lib/ -include($$PWD/../lib/lib.pri) - -SOURCES += main.cpp \ - cppcheckexecutor.cpp \ - cmdlineparser.cpp \ - filelister.cpp \ - pathmatch.cpp \ - threadexecutor.cpp - -HEADERS += cppcheckexecutor.h \ - cmdlineparser.h \ - filelister.h \ - pathmatch.h \ - threadexecutor.h - -CONFIG(release, debug|release) { - DEFINES += NDEBUG -} - -win32 { - CONFIG += embed_manifest_exe console - DEFINES += _CRT_SECURE_NO_WARNINGS - RC_FILE = cppcheck.rc - HEADERS += resource.h - LIBS += -lshlwapi -} - -# Add more strict compiling flags for GCC -contains(QMAKE_CXX, g++) { - QMAKE_CXXFLAGS_WARN_ON += -Wextra -pedantic -Wfloat-equal -Wcast-qual -Wlogical-op -Wno-long-long - - CONFIG(debug, debug|release) { - # checked STL - DEFINES += _GLIBCXX_DEBUG - } -} - -# Change Visual Studio compiler (CL) warning level to W4 -contains(QMAKE_CXX, cl) { - QMAKE_CXXFLAGS_WARN_ON -= -W3 - QMAKE_CXXFLAGS_WARN_ON += -W4 -} diff --git a/cli/cli.vcxproj b/cli/cli.vcxproj new file mode 100644 index 00000000000..05d1cf2916d --- /dev/null +++ b/cli/cli.vcxproj @@ -0,0 +1,262 @@ + + + + + Debug-PCRE + x64 + + + Debug + x64 + + + Release-PCRE + x64 + + + Release + x64 + + + + {35CBDF51-2456-3EC3-99ED-113C30858883} + cli + 10.0 + + + + Application + Unicode + false + v142 + + + Application + Unicode + false + v142 + + + Application + Unicode + false + v142 + + + Application + Unicode + false + v142 + + + + + + + + + + + + + + + + + + $(SolutionDir)bin\debug\ + $(SolutionDir)bin\debug\ + temp\$(Configuration)_$(PlatformName)\ + temp\$(Configuration)_$(PlatformName)\ + cppcheck + cppcheck + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + temp\$(Configuration)_$(PlatformName)\ + temp\$(Configuration)_$(PlatformName)\ + cppcheck + cppcheck + true + true + true + true + + + + ..\lib;..\frontend;..\externals;..\externals\picojson;..\externals\simplecpp;..\externals\tinyxml2;%(AdditionalIncludeDirectories) + true + ProgramDatabase + Disabled + CPPCHECKLIB_IMPORT;TINYXML2_IMPORT;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + Level4 + 4018;4127;4146;4244;4251;4267;4389;4701;4706;4800;4805 + true + Use + precompiled.h + precompiled.h + true + stdcpp14 + /Zc:throwingNew /Zc:__cplusplus %(AdditionalOptions) + + + shlwapi.lib;%(AdditionalDependencies) + ../externals;%(AdditionalLibraryDirectories) + true + Console + true + 8000000 + 8000000 + true + + + + + ..\lib;..\frontend;..\externals;..\externals\picojson;..\externals\simplecpp;..\externals\tinyxml2;%(AdditionalIncludeDirectories) + true + ProgramDatabase + Disabled + CPPCHECKLIB_IMPORT;TINYXML2_IMPORT;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + Level4 + 4018;4127;4146;4244;4251;4267;4389;4701;4706;4800;4805 + true + Use + precompiled.h + precompiled.h + true + stdcpp14 + /Zc:throwingNew /Zc:__cplusplus %(AdditionalOptions) + + + shlwapi.lib;%(AdditionalDependencies) + ../externals;%(AdditionalLibraryDirectories) + true + Console + true + 8000000 + 8000000 + true + + + + + ..\lib;..\frontend;..\externals;..\externals\picojson;..\externals\simplecpp;..\externals\tinyxml2;%(AdditionalIncludeDirectories) + false + MaxSpeed + CPPCHECKLIB_IMPORT;TINYXML2_IMPORT;NDEBUG;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + MultiThreadedDLL + Level4 + AnySuitable + true + Speed + true + true + true + 4018;4127;4146;4244;4251;4267;4389;4701;4706;4800;4805 + ProgramDatabase + true + Use + precompiled.h + precompiled.h + /Zc:throwingNew /Zc:__cplusplus %(AdditionalOptions) + true + stdcpp14 + + + shlwapi.lib;%(AdditionalDependencies) + ../externals;%(AdditionalLibraryDirectories) + true + Console + true + true + true + true + 8000000 + 8000000 + true + + + + + ..\lib;..\frontend;..\externals;..\externals\picojson;..\externals\simplecpp;..\externals\tinyxml2;%(AdditionalIncludeDirectories) + false + MaxSpeed + CPPCHECKLIB_IMPORT;TINYXML2_IMPORT;NDEBUG;HAVE_RULES;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) + MultiThreadedDLL + Level4 + AnySuitable + true + Speed + true + true + true + 4018;4127;4146;4244;4251;4267;4389;4701;4706;4800;4805 + ProgramDatabase + true + Use + precompiled.h + precompiled.h + /Zc:throwingNew /Zc:__cplusplus %(AdditionalOptions) + true + stdcpp14 + + + shlwapi.lib;%(AdditionalDependencies) + ../externals;%(AdditionalLibraryDirectories) + true + Console + true + true + true + true + 8000000 + 8000000 + true + + + + + + + + + + + + + + + + + + + + + {c183db5b-ad6c-423d-80ca-1f9549555a1a} + + + + + + + Create + Create + Create + Create + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cli/cli.vcxproj.filters b/cli/cli.vcxproj.filters new file mode 100644 index 00000000000..5d3bd1c86cc --- /dev/null +++ b/cli/cli.vcxproj.filters @@ -0,0 +1,94 @@ + + + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {6d3be647-edb6-43e6-a7eb-3031a2c7b655} + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/cli/cmdlinelogger.h b/cli/cmdlinelogger.h new file mode 100644 index 00000000000..75981c028cd --- /dev/null +++ b/cli/cmdlinelogger.h @@ -0,0 +1,37 @@ +/* -*- C++ -*- + * Cppcheck - A tool for static C/C++ code analysis + * Copyright (C) 2007-2024 Cppcheck team. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CMD_LINE_LOGGER_H +#define CMD_LINE_LOGGER_H + +#include + +class CmdLineLogger +{ +public: + virtual ~CmdLineLogger() = default; + + /** print a regular message */ + virtual void printMessage(const std::string &message) = 0; + /** print an error message */ + virtual void printError(const std::string &message) = 0; + /** print to the output */ + virtual void printRaw(const std::string &message) = 0; +}; + +#endif // CMD_LINE_LOGGER_H diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index f395ddd3d45..27cfe08d871 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -1,6 +1,6 @@ /* * Cppcheck - A tool for static C/C++ code analysis - * Copyright (C) 2007-2012 Daniel Marjamäki and Cppcheck team. + * Copyright (C) 2007-2026 Cppcheck team. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,305 +16,425 @@ * along with this program. If not, see . */ +#include "cmdlineparser.h" + +#include "addoninfo.h" +#include "check.h" +#include "checks.h" +#include "checkers.h" +#include "color.h" +#include "config.h" +#include "cppcheck.h" +#include "errorlogger.h" +#include "errortypes.h" +#include "filelister.h" +#include "filesettings.h" +#include "importproject.h" +#include "library.h" +#include "path.h" +#include "pathmatch.h" +#include "platform.h" +#include "settings.h" +#include "standards.h" +#include "suppressions.h" +#include "utils.h" + +#include "frontend.h" + #include +#include +#include +#include // EXIT_FAILURE +#include +#include #include +#include +#include +#include +#include #include -#include -#include -#include -#include // EXIT_FAILURE -#include "cppcheck.h" -#include "timer.h" -#include "settings.h" -#include "cmdlineparser.h" -#include "path.h" -#include "filelister.h" +#include +#include #ifdef HAVE_RULES -// xml is used in rules -#include +#include "regex.h" + +// xml is used for rules +#include "xml.h" #endif -static void AddFilesToList(const std::string& FileList, std::vector& PathNames) +static bool addFilesToList(const std::string& fileList, std::vector& pathNames) { - // to keep things initially simple, if the file can't be opened, just be - // silent and move on - // ideas : we could also require this should be an xml file, with the filenames - // specified in an xml structure - // we could elaborate this then, to also include the I-paths, ... - // basically for everything that makes the command line very long - // xml is a bonus then, since we can easily extend it - // we need a good parser then -> suggestion : TinyXml - // drawback : creates a dependency - std::istream *Files; - std::ifstream Infile; - if (FileList.compare("-") == 0) { // read from stdin - Files = &std::cin; + std::istream *files; + std::ifstream infile; + if (fileList == "-") { // read from stdin + files = &std::cin; } else { - Infile.open(FileList.c_str()); - Files = &Infile; + infile.open(fileList); + if (!infile.is_open()) + return false; + files = &infile; } - if (Files) { - std::string FileName; - while (std::getline(*Files, FileName)) { // next line - if (!FileName.empty()) { - PathNames.push_back(FileName); - } + std::string fileName; + while (std::getline(*files, fileName)) { // next line + if (!fileName.empty()) { + pathNames.emplace_back(std::move(fileName)); } } + + return true; } -static void AddInclPathsToList(const std::string& FileList, std::list& PathNames) +static bool addIncludePathsToList(const std::string& fileList, std::list& pathNames) { - // to keep things initially simple, if the file can't be opened, just be - // silent and move on - std::ifstream Files(FileList.c_str()); - if (Files) { - std::string PathName; - while (std::getline(Files, PathName)) { // next line - if (!PathName.empty()) { - PathName = Path::fromNativeSeparators(PathName); - PathName = Path::removeQuotationMarks(PathName); - PathNames.push_back(PathName); + std::ifstream files(fileList); + if (files) { + std::string pathName; + while (std::getline(files, pathName)) { // next line + if (!pathName.empty()) { + pathName = Path::removeQuotationMarks(std::move(pathName)); + pathName = Path::fromNativeSeparators(std::move(pathName)); + + // If path doesn't end with / or \, add it + if (!endsWith(pathName, '/')) + pathName += '/'; + + pathNames.emplace_back(std::move(pathName)); } } + return true; } + return false; } -CmdLineParser::CmdLineParser(Settings *settings) - : _settings(settings) - , _showHelp(false) - , _showVersion(false) - , _showErrorMessages(false) - , _exitAfterPrint(false) +static bool addPathsToSet(const std::string& fileName, std::set& set) { + std::list templist; + if (!addIncludePathsToList(fileName, templist)) + return false; + set.insert(templist.cbegin(), templist.cend()); + return true; } -void CmdLineParser::PrintMessage(const std::string &message) const -{ - std::cout << message << std::endl; +namespace { + class XMLErrorMessagesLogger : public ErrorLogger + { + void reportOut(const std::string & outmsg, Color /*c*/ = Color::Reset) override + { + std::cout << outmsg << std::endl; + } + + void reportErr(const ErrorMessage &msg) override + { + reportOut(msg.toXML()); + } + + void reportMetric(const std::string &metric) override + { + /* Not used here */ + (void) metric; + } + + void reportProgress(const std::string & /*filename*/, const char /*stage*/[], const std::size_t /*value*/) override + {} + }; } -bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[]) +CmdLineParser::CmdLineParser(CmdLineLogger &logger, Settings &settings, Suppressions &suppressions) + : mLogger(logger) + , mSettings(settings) + , mSuppressions(suppressions) +{} + +bool CmdLineParser::fillSettingsFromArgs(int argc, const char* const argv[]) { - for (int i = 1; i < argc; i++) { - if (strcmp(argv[i], "--version") == 0) { - _showVersion = true; - _exitAfterPrint = true; - return true; - } + const Result result = parseFromArgs(argc, argv); - // Flag used for various purposes during debugging - else if (strcmp(argv[i], "--debug") == 0) - _settings->debug = _settings->debugwarnings = true; + switch (result) { + case Result::Success: + break; + case Result::Exit: + Settings::terminate(); + return true; + case Result::Fail: + return false; + } - // Show debug warnings - else if (strcmp(argv[i], "--debug-warnings") == 0) - _settings->debugwarnings = true; + // Libraries must be loaded before FileLister is executed to ensure markup files will be + // listed properly. + if (!loadLibraries(mSettings)) + return false; - // Print out code that triggers false positive - else if (strcmp(argv[i], "--debug-fp") == 0) - _settings->debugFalsePositive = true; + if (!loadAddons(mSettings)) + return false; - // Enable all checks - will be removed in future - else if (strcmp(argv[i], "-a") == 0 || strcmp(argv[i], "--all") == 0) { - PrintMessage("cppcheck: '-a/--all' option is deprecated and will be removed in 1.55 release."); - PrintMessage("cppcheck: please use '--enable=all' instead."); + // Check that all include paths exist + { + for (auto iter = mSettings.includePaths.cbegin(); + iter != mSettings.includePaths.cend(); + ) { + const std::string path(Path::toNativeSeparators(*iter)); + if (Path::isDirectory(path)) + ++iter; + else { + // TODO: this bypasses the template format and other settings + // If the include path is not found, warn user and remove the non-existing path from the list. + if (mSettings.severity.isEnabled(Severity::information)) + std::cout << "(information) Couldn't find path given by -I '" << path << '\'' << std::endl; + iter = mSettings.includePaths.erase(iter); + } } + } - // Inconclusive checking (still in testing phase) - else if (strcmp(argv[i], "--inconclusive") == 0) - _settings->inconclusive = true; - - // Checking coding style - will be removed in the future - else if (strcmp(argv[i], "-s") == 0 || strcmp(argv[i], "--style") == 0) { - PrintMessage("cppcheck: '-s/--style' option is deprecated and will be removed in 1.55 release."); - PrintMessage("cppcheck: please use '--enable=style' instead."); + // Output a warning for the user if he tries to exclude headers + const std::vector& ignored = mIgnoredPaths; + const bool warn = std::any_of(ignored.cbegin(), ignored.cend(), [](const std::string& i) { + return Path::isHeader(i); + }); + if (warn) { + mLogger.printMessage("filename exclusion does not apply to header (.h and .hpp) files."); + mLogger.printMessage("Please use --suppress for ignoring results from the header files."); + } - const std::string errmsg = _settings->addEnabled("style"); - if (!errmsg.empty()) { - PrintMessage(errmsg); + const std::vector& pathnamesRef = mPathNames; + const std::list& fileSettingsRef = mFileSettings; + + // the inputs can only be used exclusively - CmdLineParser should already handle this + assert(!(!pathnamesRef.empty() && !fileSettingsRef.empty())); + + if (!fileSettingsRef.empty()) { + std::list fileSettings; + if (!mSettings.fileFilters.empty()) { + // filter only for the selected filenames from all project files + PathMatch filtermatcher(mSettings.fileFilters, Path::getCurrentPath()); + std::copy_if(fileSettingsRef.cbegin(), fileSettingsRef.cend(), std::back_inserter(fileSettings), [&](const FileSettings &fs) { + return filtermatcher.match(fs.filename()); + }); + if (fileSettings.empty()) { + for (const std::string& f: mSettings.fileFilters) + mLogger.printError("could not find any files matching the filter:" + f); return false; } } + else { + fileSettings = fileSettingsRef; + } - // Filter errors - else if (strncmp(argv[i], "--exitcode-suppressions", 23) == 0) { - std::string filename; + // TODO: de-duplicate - // exitcode-suppressions filename.txt - // Deprecated - if (strcmp(argv[i], "--exitcode-suppressions") == 0) { - ++i; + mFileSettings.clear(); - if (i >= argc || strncmp(argv[i], "-", 1) == 0 || - strncmp(argv[i], "--", 2) == 0) { - PrintMessage("cppcheck: No filename specified for the '--exitcode-suppressions' option."); - return false; - } - filename = argv[i]; - } - // exitcode-suppressions=filename.txt - else { - filename = 24 + argv[i]; - } + frontend::applyLang(fileSettings, mSettings, mEnforcedLang); - std::ifstream f(filename.c_str()); - if (!f.is_open()) { - PrintMessage("cppcheck: Couldn't open the file: \"" + std::string(filename) + "\"."); - return false; - } - const std::string errmsg(_settings->nofail.parseFile(f)); - if (!errmsg.empty()) { - PrintMessage(errmsg); - return false; - } - } + // sort the markup last + std::copy_if(fileSettings.cbegin(), fileSettings.cend(), std::back_inserter(mFileSettings), [&](const FileSettings &fs) { + return !mSettings.library.markupFile(fs.filename()) || !mSettings.library.processMarkupAfterCode(fs.filename()); + }); - // Filter errors - else if (strncmp(argv[i], "--suppressions-list=", 20) == 0) { - std::string filename = argv[i]+20; - std::ifstream f(filename.c_str()); - if (!f.is_open()) { - std::string message("cppcheck: Couldn't open the file: \""); - message += std::string(filename); - message += "\"."; - if (count(filename.begin(), filename.end(), ',') > 0 || - count(filename.begin(), filename.end(), '.') > 1) { - // If user tried to pass multiple files (we can only guess that) - // e.g. like this: --suppressions-list=a.txt,b.txt - // print more detailed error message to tell user how he can solve the problem - message += "\nIf you want to pass two files, you can do it e.g. like this:"; - message += "\n cppcheck --suppressions-list=a.txt --suppressions-list=b.txt file.cpp"; - } + std::copy_if(fileSettings.cbegin(), fileSettings.cend(), std::back_inserter(mFileSettings), [&](const FileSettings &fs) { + return mSettings.library.markupFile(fs.filename()) && mSettings.library.processMarkupAfterCode(fs.filename()); + }); - PrintMessage(message); - return false; - } - const std::string errmsg(_settings->nomsg.parseFile(f)); - if (!errmsg.empty()) { - PrintMessage(errmsg); - return false; - } + if (mFileSettings.empty()) { + mLogger.printError("could not find or open any of the paths given."); + return false; } + } - // Filter errors - // This is deprecated, see --supressions-list above - else if (strcmp(argv[i], "--suppressions") == 0) { - ++i; - - if (i >= argc) { - PrintMessage("cppcheck: No file specified for the '--suppressions' option."); - return false; + if (!pathnamesRef.empty()) { + std::list filesResolved; + // Execute recursiveAddFiles() to each given file parameter + // TODO: verbose log which files were ignored? + const PathMatch matcher(ignored, Path::getCurrentPath()); + for (const std::string &pathname : pathnamesRef) { + const std::string err = FileLister::recursiveAddFiles(filesResolved, Path::toNativeSeparators(pathname), mSettings.library.markupExtensions(), matcher, mSettings.debugignore); + if (!err.empty()) { + // TODO: bail out? + mLogger.printMessage(err); } + } - std::ifstream f(argv[i]); - if (!f.is_open()) { - std::string message("cppcheck: Couldn't open the file: \""); - message += std::string(argv[i]); - message += "\"."; - PrintMessage(message); - return false; - } - const std::string errmsg(_settings->nomsg.parseFile(f)); - if (!errmsg.empty()) { - PrintMessage(errmsg); + if (filesResolved.empty()) { + mLogger.printError("could not find or open any of the paths given."); + // TODO: PathMatch should provide the information if files were ignored + if (!ignored.empty()) + mLogger.printMessage("Maybe all paths were ignored?"); + return false; + } + + std::list files; + if (!mSettings.fileFilters.empty()) { + files = filterFiles(mSettings.fileFilters, filesResolved); + if (files.empty()) { + for (const std::string& f: mSettings.fileFilters) + mLogger.printError("could not find any files matching the filter:" + f); return false; } } + else { + files = std::move(filesResolved); + } - else if (strncmp(argv[i], "--suppress=", 11) == 0) { - std::string suppression = argv[i]+11; - const std::string errmsg(_settings->nomsg.addSuppressionLine(suppression)); - if (!errmsg.empty()) { - PrintMessage(errmsg); - return false; + // de-duplicate files + { + auto it = files.begin(); + while (it != files.end()) { + const std::string& absname = it->abspath(); + // TODO: log if duplicated files were dropped + files.erase(std::remove_if(std::next(it), files.end(), [&](const FileWithDetails& entry) { + return entry.abspath() == absname; + }), files.end()); + ++it; } } - // Enables inline suppressions. - else if (strcmp(argv[i], "--inline-suppr") == 0) - _settings->_inlineSuppressions = true; + frontend::applyLang(files, mSettings, mEnforcedLang); - // Verbose error messages (configuration info) - else if (strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--verbose") == 0) - _settings->_verbose = true; + // sort the markup last + std::copy_if(files.cbegin(), files.cend(), std::inserter(mFiles, mFiles.end()), [&](const FileWithDetails& entry) { + return !mSettings.library.markupFile(entry.path()) || !mSettings.library.processMarkupAfterCode(entry.path()); + }); - // Force checking of files that have "too many" configurations - else if (strcmp(argv[i], "-f") == 0 || strcmp(argv[i], "--force") == 0) - _settings->_force = true; + std::copy_if(files.cbegin(), files.cend(), std::inserter(mFiles, mFiles.end()), [&](const FileWithDetails& entry) { + return mSettings.library.markupFile(entry.path()) && mSettings.library.processMarkupAfterCode(entry.path()); + }); - // Write results in results.xml - else if (strcmp(argv[i], "--xml") == 0) - _settings->_xml = true; + if (mFiles.empty()) { + mLogger.printError("could not find or open any of the paths given."); + return false; + } + } - // Define the XML file version (and enable XML output) - else if (strncmp(argv[i], "--xml-version=", 14) == 0) { - std::string numberString(argv[i]+14); + return true; +} - std::istringstream iss(numberString); - if (!(iss >> _settings->_xml_version)) { - PrintMessage("cppcheck: argument to '--xml-version' is not a number."); - return false; +// TODO: normalize/simplify/native all path parameters +// TODO: error out on all missing given files/paths +CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const argv[]) +{ + mSettings.exename = Path::getCurrentExecutablePath(argv[0]); + + bool xmlOptionProvided = false; + bool outputFormatOptionProvided = false; + + // default to --check-level=normal from CLI for now + mSettings.setCheckLevel(Settings::CheckLevel::normal); + + // read --debug-lookup early so the option is available for the cppcheck.cfg loading + for (int i = 1; i < argc; i++) { + // Show debug warnings for lookup for configuration files + if (std::strcmp(argv[i], "--debug-lookup") == 0) + mSettings.debuglookup = true; + + else if (std::strncmp(argv[i], "--debug-lookup=", 15) == 0) { + const std::string lookup = argv[i] + 15; + if (lookup == "all") + mSettings.debuglookup = true; + else if (lookup == "addon") + mSettings.debuglookupAddon = true; + else if (lookup == "config") + mSettings.debuglookupConfig = true; + else if (lookup == "library") + mSettings.debuglookupLibrary = true; + else if (lookup == "platform") + mSettings.debuglookupPlatform = true; + else + { + mLogger.printError("unknown lookup '" + lookup + "'"); + return Result::Fail; } + } + } - if (_settings->_xml_version < 0 || _settings->_xml_version > 2) { - // We only have xml versions 1 and 2 - PrintMessage("cppcheck: '--xml-version' can only be 1 or 2."); - return false; + if (!loadCppcheckCfg()) + return Result::Fail; + + if (argc <= 1) { + printHelp(); + return Result::Exit; + } + + // check for exclusive options + for (int i = 1; i < argc; i++) { + // documentation.. + if (std::strcmp(argv[i], "--doc") == 0) { + std::ostringstream doc; + // Get documentation.. + for (const Check * const c : CheckInstances::get()) { + const std::string& name(c->name()); + const std::string info(c->classInfo()); + if (!name.empty() && !info.empty()) + doc << "## " << name << " ##\n" + << info << "\n"; } - // Enable also XML if version is set - _settings->_xml = true; + mLogger.printRaw(doc.str()); + return Result::Exit; } - // Only print something when there are errors - else if (strcmp(argv[i], "-q") == 0 || strcmp(argv[i], "--quiet") == 0) - _settings->_errorsOnly = true; - - // Append userdefined code to checked source code - else if (strncmp(argv[i], "--append=", 9) == 0) { - const std::string filename = 9 + argv[i]; - if (!_settings->append(filename)) { - PrintMessage("cppcheck: Couldn't open the file: \"" + filename + "\"."); - return false; + // print all possible error messages.. + if (std::strcmp(argv[i], "--errorlist") == 0) { + { + XMLErrorMessagesLogger xmlLogger; + std::cout << ErrorMessage::getXMLHeader(mSettings.cppcheckCfgProductName, 2); + CppCheck::getErrorMessages(xmlLogger); + std::cout << ErrorMessage::getXMLFooter(2) << std::endl; } + return Result::Exit; } - else if (strncmp(argv[i], "--enable=", 9) == 0) { - const std::string errmsg = _settings->addEnabled(argv[i] + 9); - if (!errmsg.empty()) { - PrintMessage(errmsg); - return false; - } - // when "style" is enabled, also enable "performance" and "portability" - if (_settings->isEnabled("style")) { - _settings->addEnabled("performance"); - _settings->addEnabled("portability"); - } + // Print help + if (std::strcmp(argv[i], "-h") == 0 || std::strcmp(argv[i], "--help") == 0) { + printHelp(); + return Result::Exit; } - // --error-exitcode=1 - else if (strncmp(argv[i], "--error-exitcode=", 17) == 0) { - std::string temp = argv[i]+17; - std::istringstream iss(temp); - if (!(iss >> _settings->_exitCode)) { - _settings->_exitCode = 0; - PrintMessage("cppcheck: Argument must be an integer. Try something like '--error-exitcode=1'."); - return false; - } + if (std::strcmp(argv[i], "--filesdir") == 0) { +#ifdef FILESDIR + mLogger.printRaw(FILESDIR); // TODO: should not include newline +#endif + return Result::Exit; + } + + if (std::strcmp(argv[i], "--version") == 0) { + const std::string version = getVersion(); + mLogger.printRaw(version); // TODO: should not include newline + return Result::Exit; + } + } + + bool debug = false; + bool inputAsFilter = false; // set by: --file-filter=+ + + ImportProject::Type projectType = ImportProject::Type::NONE; + ImportProject project; + std::string vsConfig; + + std::string platform; + char defaultSign = '\0'; + + std::vector lookupPaths{ + Path::getCurrentPath(), // TODO: do we want to look in CWD? + Path::getPathFromFilename(mSettings.exename), + }; + + bool executorAuto = true; + + for (int i = 1; i < argc; i++) { + if (argv[i][0] != '-') { + mPathNames.emplace_back(Path::fromNativeSeparators(Path::removeQuotationMarks(argv[i]))); } // User define - else if (strncmp(argv[i], "-D", 2) == 0) { + else if (std::strncmp(argv[i], "-D", 2) == 0) { std::string define; // "-D define" - if (strcmp(argv[i], "-D") == 0) { + if (std::strcmp(argv[i], "-D") == 0) { ++i; if (i >= argc || argv[i][0] == '-') { - PrintMessage("cppcheck: argument to '-D' is missing."); - return false; + mLogger.printError("argument to '-D' is missing."); + return Result::Fail; } define = argv[i]; @@ -324,42 +444,31 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[]) define = 2 + argv[i]; } - if (!_settings->userDefines.empty()) - _settings->userDefines += ";"; - _settings->userDefines += define; - } - // User undef - else if (strncmp(argv[i], "-U", 2) == 0) { - std::string undef; - - // "-U undef" - if (strcmp(argv[i], "-U") == 0) { - ++i; - if (i >= argc || argv[i][0] == '-') { - PrintMessage("cppcheck: argument to '-U' is missing."); - return false; - } + // No "=", append a "=1" + if (define.find('=') == std::string::npos) + define += "=1"; - undef = argv[i]; - } - // "-Uundef" - else { - undef = 2 + argv[i]; - } + if (!mSettings.userDefines.empty()) + mSettings.userDefines += ";"; + mSettings.userDefines += define; + } - _settings->userUndefs.insert(undef); + // -E + else if (std::strcmp(argv[i], "-E") == 0) { + mSettings.preprocessOnly = true; + mSettings.quiet = true; } // Include paths - else if (strncmp(argv[i], "-I", 2) == 0) { + else if (std::strncmp(argv[i], "-I", 2) == 0) { std::string path; // "-I path/" - if (strcmp(argv[i], "-I") == 0) { + if (std::strcmp(argv[i], "-I") == 0) { ++i; if (i >= argc || argv[i][0] == '-') { - PrintMessage("cppcheck: argument to '-I' is missing."); - return false; + mLogger.printError("argument to '-I' is missing."); + return Result::Fail; } path = argv[i]; } @@ -368,458 +477,1778 @@ bool CmdLineParser::ParseFromArgs(int argc, const char* const argv[]) else { path = 2 + argv[i]; } - path = Path::fromNativeSeparators(path); - path = Path::removeQuotationMarks(path); + path = Path::removeQuotationMarks(std::move(path)); + path = Path::fromNativeSeparators(std::move(path)); // If path doesn't end with / or \, add it - if (path[path.length()-1] != '/') + if (!endsWith(path,'/')) path += '/'; - _settings->_includePaths.push_back(path); - } else if (strncmp(argv[i], "--includes-file=", 16) == 0) { - // open this file and read every input file (1 file name per line) - AddInclPathsToList(16 + argv[i], _settings->_includePaths); - } - - // file list specified - else if (strncmp(argv[i], "--file-list=", 12) == 0) { - // open this file and read every input file (1 file name per line) - AddFilesToList(12 + argv[i], _pathnames); + mSettings.includePaths.emplace_back(std::move(path)); } - // Ignored paths - else if (strncmp(argv[i], "-i", 2) == 0) { - std::string path; + // User undef + else if (std::strncmp(argv[i], "-U", 2) == 0) { + std::string undef; - // "-i path/" - if (strcmp(argv[i], "-i") == 0) { + // "-U undef" + if (std::strcmp(argv[i], "-U") == 0) { ++i; if (i >= argc || argv[i][0] == '-') { - PrintMessage("cppcheck: argument to '-i' is missing."); - return false; + mLogger.printError("argument to '-U' is missing."); + return Result::Fail; } - path = argv[i]; - } - // "-ipath/" - else { - path = 2 + argv[i]; + undef = argv[i]; } - - if (!path.empty()) { - path = Path::fromNativeSeparators(path); - path = Path::simplifyPath(path.c_str()); - path = Path::removeQuotationMarks(path); - - if (!FileLister::fileExists(path) && FileLister::isDirectory(path)) { - // If directory name doesn't end with / or \, add it - if (path[path.length()-1] != '/') - path += '/'; - } - _ignoredPaths.push_back(path); + // "-Uundef" + else { + undef = 2 + argv[i]; } - } - // Report progress - else if (strcmp(argv[i], "--report-progress") == 0) { - _settings->reportProgress = true; + mSettings.userUndefs.insert(std::move(undef)); } - // --std - else if (strcmp(argv[i], "--std=posix") == 0) { - _settings->standards.posix = true; - } + else if (std::strncmp(argv[i], "--addon=", 8) == 0) + mSettings.addons.emplace(argv[i]+8); - // --C99 - else if (strcmp(argv[i], "--std=c99") == 0) { - _settings->standards.c99 = true; - } + else if (std::strncmp(argv[i],"--addon-python=", 15) == 0) + mSettings.addonPython.assign(argv[i]+15); - else if (strcmp(argv[i], "--std=c++11") == 0) { - _settings->standards.cpp11 = true; + else if (std::strcmp(argv[i],"--analyze-all-vs-configs") == 0) { + mSettings.analyzeAllVsConfigs = true; + mAnalyzeAllVsConfigsSetOnCmdLine = true; } - // Output formatter - else if (strcmp(argv[i], "--template") == 0 || - strncmp(argv[i], "--template=", 11) == 0) { - // "--template path/" - if (argv[i][10] == '=') - _settings->_outputFormat = argv[i] + 11; - else if ((i+1) < argc && argv[i+1][0] != '-') { - ++i; - _settings->_outputFormat = argv[i]; - } else { - PrintMessage("cppcheck: argument to '--template' is missing."); - return false; + // Check configuration + else if (std::strcmp(argv[i], "--check-config") == 0) + mSettings.checkConfiguration = true; + + else if (std::strcmp(argv[i], "--check-headers") == 0) + mSettings.checkHeaders = true; + + // Check level + else if (std::strncmp(argv[i], "--check-level=", 14) == 0) { + Settings::CheckLevel level = Settings::CheckLevel::normal; + const std::string level_s(argv[i] + 14); + if (level_s == "reduced") + level = Settings::CheckLevel::reduced; + else if (level_s == "normal") + level = Settings::CheckLevel::normal; + else if (level_s == "exhaustive") + level = Settings::CheckLevel::exhaustive; + else { + mLogger.printError("unknown '--check-level' value '" + level_s + "'."); + return Result::Fail; } - if (_settings->_outputFormat == "gcc") - _settings->_outputFormat = "{file}:{line}: {severity}: {message}"; - else if (_settings->_outputFormat == "vs") - _settings->_outputFormat = "{file}({line}): {severity}: {message}"; - else if (_settings->_outputFormat == "edit") - _settings->_outputFormat = "{file} +{line}: {severity}: {message}"; + mSettings.setCheckLevel(level); } - // Checking threads - else if (strncmp(argv[i], "-j", 2) == 0) { - std::string numberString; - - // "-j 3" - if (strcmp(argv[i], "-j") == 0) { - ++i; - if (i >= argc || argv[i][0] == '-') { - PrintMessage("cppcheck: argument to '-j' is missing."); - return false; - } + // Check library definitions + else if (std::strcmp(argv[i], "--check-library") == 0) { + mSettings.checkLibrary = true; + } - numberString = argv[i]; + else if (std::strcmp(argv[i], "--check-unused-templates") == 0) + mSettings.checkUnusedTemplates = true; + + else if (std::strncmp(argv[i], "--check-version=", 16) == 0) { + if (!loadCppcheckCfg()) + return Result::Fail; + const std::string actualVersion = getVersion(); + const std::string wantedVersion = argv[i] + 16; + if (actualVersion != wantedVersion) { + mLogger.printError("--check-version check failed. Aborting."); + return Result::Fail; } + } - // "-j3" - else - numberString = argv[i]+2; + else if (std::strncmp(argv[i], "--checkers-report=", 18) == 0) + mSettings.checkersReportFilename = argv[i] + 18; - std::istringstream iss(numberString); - if (!(iss >> _settings->_jobs)) { - PrintMessage("cppcheck: argument to '-j' is not a number."); - return false; - } + else if (std::strncmp(argv[i], "--checks-max-time=", 18) == 0) { + if (!parseNumberArg(argv[i], 18, mSettings.checksMaxTime, true)) + return Result::Fail; + } - if (_settings->_jobs > 10000) { - // This limit is here just to catch typos. If someone has - // need for more jobs, this value should be increased. - PrintMessage("cppcheck: argument for '-j' is allowed to be 10000 at max."); - return false; - } + else if (std::strcmp(argv[i], "--clang") == 0) { + mSettings.clang = true; } - // deprecated: auto deallocated classes.. - else if (strcmp(argv[i], "--auto-dealloc") == 0) { - ++i; - PrintMessage("cppcheck: '--auto-dealloc' option is deprecated and will be removed in 1.55 release."); + else if (std::strncmp(argv[i], "--clang=", 8) == 0) { + mSettings.clang = true; + mSettings.clangExecutable = argv[i] + 8; } - // print all possible error messages.. - else if (strcmp(argv[i], "--errorlist") == 0) { - _showErrorMessages = true; - _settings->_xml = true; - _exitAfterPrint = true; + else if (std::strcmp(argv[i], "--clang-tidy") == 0) { + mSettings.clangTidy = true; } - // documentation.. - else if (strcmp(argv[i], "--doc") == 0) { - std::ostringstream doc; - // Get documentation.. - for (std::list::iterator it = Check::instances().begin(); it != Check::instances().end(); ++it) { - const std::string name((*it)->name()); - const std::string info((*it)->classInfo()); - if (!name.empty() && !info.empty()) - doc << "===" << name << "===\n" - << info << "\n\n"; - } + else if (std::strncmp(argv[i], "--clang-tidy=", 13) == 0) { + mSettings.clangTidy = true; + mSettings.clangTidyExecutable = argv[i] + 13; + } - std::string doc2(doc.str()); - while (doc2.find("\n\n\n") != std::string::npos) - doc2.erase(doc2.find("\n\n\n"), 1); - std::cout << doc2; - _exitAfterPrint = true; - return true; + else if (std::strncmp(argv[i], "--config-exclude=",17) ==0) { + mSettings.configExcludePaths.insert(Path::fromNativeSeparators(argv[i] + 17)); } - // --test-2-pass Experimental 2-pass checking of files - // This command line flag will be removed - else if (strcmp(argv[i], "--test-2-pass") == 0) { - _settings->test_2_pass = true; + else if (std::strncmp(argv[i], "--config-excludes-file=", 23) == 0) { + // open this file and read every input file (1 file name per line) + const std::string cfgExcludesFile(23 + argv[i]); + if (!addPathsToSet(cfgExcludesFile, mSettings.configExcludePaths)) { + mLogger.printError("unable to open config excludes file at '" + cfgExcludesFile + "'"); + return Result::Fail; + } } - // show timing information.. - else if (strncmp(argv[i], "--showtime=", 11) == 0) { - const std::string showtimeMode = argv[i] + 11; - if (showtimeMode == "file") - _settings->_showtime = SHOWTIME_FILE; - else if (showtimeMode == "summary") - _settings->_showtime = SHOWTIME_SUMMARY; - else if (showtimeMode == "top5") - _settings->_showtime = SHOWTIME_TOP5; - else - _settings->_showtime = SHOWTIME_NONE; + else if (std::strncmp(argv[i], "--cppcheck-build-dir=", 21) == 0) { + std::string path = Path::fromNativeSeparators(argv[i] + 21); + if (path.empty()) { + mLogger.printError("no path has been specified for --cppcheck-build-dir"); + return Result::Fail; + } + if (endsWith(path, '/')) + path.pop_back(); + mSettings.buildDir = std::move(path); } -#ifdef HAVE_RULES - // Rule given at command line - else if (strncmp(argv[i], "--rule=", 7) == 0) { - Settings::Rule rule; - rule.pattern = 7 + argv[i]; - _settings->rules.push_back(rule); + else if (std::strcmp(argv[i], "--cpp-header-probe") == 0) { + mSettings.cppHeaderProbe = true; } - // Rule file - else if (strncmp(argv[i], "--rule-file=", 12) == 0) { - TiXmlDocument doc; - if (doc.LoadFile(12+argv[i])) { - TiXmlElement *node = doc.FirstChildElement(); - for (; node && node->ValueStr() == "rule"; node = node->NextSiblingElement()) { - Settings::Rule rule; + else if (std::strcmp(argv[i], "--debug-analyzerinfo") == 0) + mSettings.debugainfo = true; - TiXmlElement *pattern = node->FirstChildElement("pattern"); - if (pattern) { - rule.pattern = pattern->GetText(); - } + else if (std::strcmp(argv[i], "--debug-ast") == 0) + mSettings.debugast = true; - TiXmlElement *message = node->FirstChildElement("message"); - if (message) { - TiXmlElement *severity = message->FirstChildElement("severity"); - if (severity) - rule.severity = severity->GetText(); + // Show debug warnings for lookup for configuration files + else if (std::strcmp(argv[i], "--debug-clang-output") == 0) + mSettings.debugClangOutput = true; - TiXmlElement *id = message->FirstChildElement("id"); - if (id) - rule.id = id->GetText(); + // Show debug messages for ignored files + else if (std::strcmp(argv[i], "--debug-ignore") == 0) + mSettings.debugignore = true; - TiXmlElement *summary = message->FirstChildElement("summary"); - if (summary) - rule.summary = summary->GetText(); - } + else if (std::strcmp(argv[i], "--debug-ipc") == 0) + mSettings.debugipc = true; - if (!rule.pattern.empty()) - _settings->rules.push_back(rule); - } - } - } -#endif + // Show --debug output after the first simplifications + else if (std::strcmp(argv[i], "--debug") == 0 || + std::strcmp(argv[i], "--debug-normal") == 0) + debug = true; - // Check configuration - else if (strcmp(argv[i], "--check-config") == 0) { - _settings->checkConfiguration = true; - } + else if (std::strcmp(argv[i], "--debug-lookup") == 0) + continue; // already handled above - // Specify platform - else if (strncmp(argv[i], "--platform=", 11) == 0) { - std::string platform(11+argv[i]); - - if (platform == "win32A") - _settings->platform(Settings::Win32A); - else if (platform == "win32W") - _settings->platform(Settings::Win32W); - else if (platform == "win64") - _settings->platform(Settings::Win64); - else if (platform == "unix32") - _settings->platform(Settings::Unix32); - else if (platform == "unix64") - _settings->platform(Settings::Unix64); - else { - std::string message("cppcheck: error: unrecognized platform: \""); - message += argv[i]; - message += "\"."; - PrintMessage(message); - return false; - } - } + else if (std::strncmp(argv[i], "--debug-lookup=", 15) == 0) + continue; // already handled above - // Set maximum number of #ifdef configurations to check - else if (strncmp(argv[i], "--max-configs=", 14) == 0) { - _settings->_force = false; + // Flag used for various purposes during debugging + else if (std::strcmp(argv[i], "--debug-simplified") == 0) + mSettings.debugSimplified = true; - std::istringstream iss(14+argv[i]); - if (!(iss >> _settings->_maxConfigs)) { - PrintMessage("cppcheck: argument to '--max-configs=' is not a number."); - return false; - } + else if (std::strcmp(argv[i], "--debug-symdb") == 0) + mSettings.debugsymdb = true; - if (_settings->_maxConfigs < 1) { - PrintMessage("cppcheck: argument to '--max-configs=' must be greater than 0."); - return false; - } - } + // Show template information + else if (std::strcmp(argv[i], "--debug-template") == 0) + mSettings.debugtemplate = true; - // Print help - else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0) { - _pathnames.clear(); - _showHelp = true; - _exitAfterPrint = true; - break; + else if (std::strcmp(argv[i], "--debug-valueflow") == 0) + mSettings.debugvalueflow = true; + + // Show debug warnings + else if (std::strcmp(argv[i], "--debug-warnings") == 0) + mSettings.debugwarnings = true; + + else if (std::strncmp(argv[i], "--disable=", 10) == 0) { + const std::string errmsg = mSettings.removeEnabled(argv[i] + 10); + if (!errmsg.empty()) { + mLogger.printError(errmsg); + return Result::Fail; + } } - else if (strncmp(argv[i], "-", 1) == 0 || strncmp(argv[i], "--", 2) == 0) { - std::string message("cppcheck: error: unrecognized command line option: \""); - message += argv[i]; - message += "\"."; - PrintMessage(message); - return false; + // dump cppcheck data + else if (std::strcmp(argv[i], "--dump") == 0) + mSettings.dump = true; + + else if (std::strcmp(argv[i], "--emit-duplicates") == 0) + mSettings.emitDuplicates = true; + + else if (std::strncmp(argv[i], "--enable=", 9) == 0) { + const std::string enable_arg = argv[i] + 9; + const std::string errmsg = mSettings.addEnabled(enable_arg); + if (!errmsg.empty()) { + mLogger.printError(errmsg); + return Result::Fail; + } + // when "style" is enabled, also enable "warning", "performance" and "portability" + if (enable_arg.find("style") != std::string::npos) { + mSettings.addEnabled("warning"); + mSettings.addEnabled("performance"); + mSettings.addEnabled("portability"); + } + } + + // --error-exitcode=1 + else if (std::strncmp(argv[i], "--error-exitcode=", 17) == 0) { + if (!parseNumberArg(argv[i], 17, mSettings.exitCode)) + return Result::Fail; + } + + // Exception handling inside cppcheck client + else if (std::strcmp(argv[i], "--exception-handling") == 0) { +#if defined(USE_WINDOWS_SEH) || defined(USE_UNIX_SIGNAL_HANDLING) + mSettings.exceptionHandling = true; +#else + mLogger.printError("Option --exception-handling is not supported since Cppcheck has not been built with any exception handling enabled."); + return Result::Fail; +#endif + } + + // Exception handling inside cppcheck client + else if (std::strncmp(argv[i], "--exception-handling=", 21) == 0) { +#if defined(USE_WINDOWS_SEH) || defined(USE_UNIX_SIGNAL_HANDLING) + const std::string exceptionOutfilename = argv[i] + 21; + if (exceptionOutfilename != "stderr" && exceptionOutfilename != "stdout") { + mLogger.printError("invalid '--exception-handling' argument"); + return Result::Fail; + } + mSettings.exceptionHandling = true; + mSettings.exceptionOutput = (exceptionOutfilename == "stderr") ? stderr : stdout; +#else + mLogger.printError("Option --exception-handling is not supported since Cppcheck has not been built with any exception handling enabled."); + return Result::Fail; +#endif + } + + else if (std::strncmp(argv[i], "--executor=", 11) == 0) { + const std::string type = 11 + argv[i]; + if (type == "auto") { + executorAuto = true; + mSettings.executor = Settings::defaultExecutor(); + } + else if (type == "thread") { +#if defined(HAS_THREADING_MODEL_THREAD) + executorAuto = false; + mSettings.executor = Settings::ExecutorType::Thread; +#else + mLogger.printError("executor type 'thread' cannot be used as Cppcheck has not been built with a respective threading model."); + return Result::Fail; +#endif + } + else if (type == "process") { +#if defined(HAS_THREADING_MODEL_FORK) + executorAuto = false; + mSettings.executor = Settings::ExecutorType::Process; +#else + mLogger.printError("executor type 'process' cannot be used as Cppcheck has not been built with a respective threading model."); + return Result::Fail; +#endif + } + else { + mLogger.printError("unknown executor: '" + type + "'."); + return Result::Fail; + } + } + + else if (std::strncmp(argv[i], "--exitcode-suppress=", 20) == 0) { + const std::string suppression = argv[i]+20; + const std::string errmsg(mSuppressions.nofail.addSuppressionLine(suppression)); + if (!errmsg.empty()) { + mLogger.printError(errmsg); + return Result::Fail; + } + } + + // Filter errors + else if (std::strncmp(argv[i], "--exitcode-suppressions=", 24) == 0) { + // exitcode-suppressions=filename.txt + std::string filename = 24 + argv[i]; + + std::ifstream f(filename); + if (!f.is_open()) { + mLogger.printError("couldn't open the file: \"" + filename + "\"."); + return Result::Fail; + } + const std::string errmsg(mSuppressions.nofail.parseFile(f)); + if (!errmsg.empty()) { + mLogger.printError(errmsg); + return Result::Fail; + } + } + + // use a file filter + else if (std::strncmp(argv[i], "--file-filter=", 14) == 0) { + const char *filter = argv[i] + 14; + if (std::strcmp(filter, "-") == 0) { + if (!addFilesToList(filter, mSettings.fileFilters)) { + mLogger.printError("Failed: --file-filter=-"); + return Result::Fail; + } + } else if (std::strcmp(filter, "+") == 0) { + inputAsFilter = true; + } else { + mSettings.fileFilters.emplace_back(filter); + } + } + + // file list specified + else if (std::strncmp(argv[i], "--file-list=", 12) == 0) { + // open this file and read every input file (1 file name per line) + const std::string fileList = argv[i] + 12; + if (!addFilesToList(fileList, mPathNames)) { + mLogger.printError("couldn't open the file: \"" + fileList + "\"."); + return Result::Fail; + } + } + + // Force checking of files that have "too many" configurations + else if (std::strcmp(argv[i], "-f") == 0 || std::strcmp(argv[i], "--force") == 0) { + mSettings.force = true; + mSettings.maxConfigsOption = Settings::maxConfigsNotAssigned; + } + + else if (std::strcmp(argv[i], "--fsigned-char") == 0) + defaultSign = 's'; + + else if (std::strcmp(argv[i], "--funsigned-char") == 0) + defaultSign = 'u'; + + // Ignored paths + else if (std::strncmp(argv[i], "-i", 2) == 0) { + std::string path; + + // "-i path/" + if (std::strcmp(argv[i], "-i") == 0) { + ++i; + if (i >= argc || argv[i][0] == '-') { + mLogger.printError("argument to '-i' is missing."); + return Result::Fail; + } + path = argv[i]; + } + + // "-ipath/" + else { + path = 2 + argv[i]; + } + + if (!path.empty()) { + mIgnoredPaths.emplace_back(std::move(path)); + } + } + + else if (std::strncmp(argv[i], "--include=", 10) == 0) { + mSettings.userIncludes.emplace_back(Path::fromNativeSeparators(argv[i] + 10)); + } + + else if (std::strncmp(argv[i], "--includes-file=", 16) == 0) { + // open this file and read every input file (1 file name per line) + const std::string includesFile(16 + argv[i]); + if (!addIncludePathsToList(includesFile, mSettings.includePaths)) { + mLogger.printError("unable to open includes file at '" + includesFile + "'"); + return Result::Fail; + } + } + + // Inconclusive checking + else if (std::strcmp(argv[i], "--inconclusive") == 0) + mSettings.certainty.enable(Certainty::inconclusive); + + // Enables inline suppressions. + else if (std::strcmp(argv[i], "--inline-suppr") == 0) + mSettings.inlineSuppressions = true; + + // Checking threads + else if (std::strncmp(argv[i], "-j", 2) == 0) { + std::string numberString; + + // "-j 3" + if (std::strcmp(argv[i], "-j") == 0) { + ++i; + if (i >= argc || argv[i][0] == '-') { + mLogger.printError("argument to '-j' is missing."); + return Result::Fail; + } + + numberString = argv[i]; + } + + // "-j3" + else + numberString = argv[i]+2; + + unsigned int tmp; + std::string err; + if (!strToInt(numberString, tmp, &err)) { + mLogger.printError("argument to '-j' is not valid - " + err + "."); + return Result::Fail; + } + if (tmp == 0) { + // TODO: implement get CPU logical core count and use that. + // Usually, -j 0 would mean "use all available cores," but + // if we get a 0, we just stall and don't do any work. + mLogger.printError("argument for '-j' must be greater than 0."); + return Result::Fail; + } + if (tmp > 1024) { + // Almost nobody has 1024 logical cores, but somebody out + // there does. + mLogger.printError("argument for '-j' is allowed to be 1024 at max."); + return Result::Fail; + } + mSettings.jobs = tmp; + } + + else if (std::strncmp(argv[i], "-l", 2) == 0) { +#ifdef HAS_THREADING_MODEL_FORK + std::string numberString; + + // "-l 3" + if (std::strcmp(argv[i], "-l") == 0) { + ++i; + if (i >= argc || argv[i][0] == '-') { + mLogger.printError("argument to '-l' is missing."); + return Result::Fail; + } + + numberString = argv[i]; + } + + // "-l3" + else + numberString = argv[i]+2; + + int tmp; + std::string err; + if (!strToInt(numberString, tmp, &err)) { + mLogger.printError("argument to '-l' is not valid - " + err + "."); + return Result::Fail; + } + mSettings.loadAverage = tmp; +#else + mLogger.printError("Option -l cannot be used as Cppcheck has not been built with fork threading model."); + return Result::Fail; +#endif + } + + // Enforce language (--language=, -x) + else if (std::strncmp(argv[i], "--language=", 11) == 0 || std::strcmp(argv[i], "-x") == 0) { + std::string str; + if (argv[i][2]) { + str = argv[i]+11; + } else { + i++; + if (i >= argc || argv[i][0] == '-') { + mLogger.printError("no language given to '-x' option."); + return Result::Fail; + } + str = argv[i]; + } + + if (str == "c") + mEnforcedLang = Standards::Language::C; + else if (str == "c++") + mEnforcedLang = Standards::Language::CPP; + else { + mLogger.printError("unknown language '" + str + "' enforced."); + return Result::Fail; + } + } + + // --library + else if (std::strncmp(argv[i], "--library=", 10) == 0) { + std::vector libs = splitString(argv[i] + 10, ','); + for (auto& l : libs) { + if (l.empty()) { + mLogger.printError("empty library specified."); + return Result::Fail; + } + mSettings.libraries.emplace_back(std::move(l)); + } + } + + // Set maximum number of #ifdef configurations to check + else if (std::strncmp(argv[i], "--max-configs=", 14) == 0) { + int tmp; + if (!parseNumberArg(argv[i], 14, tmp)) + return Result::Fail; + if (tmp < 1) { + mLogger.printError("argument to '--max-configs=' must be greater than 0."); + return Result::Fail; + } + + mSettings.maxConfigsOption = tmp; + mSettings.force = false; + } + + // max ctu depth + else if (std::strncmp(argv[i], "--max-ctu-depth=", 16) == 0) { + int temp = 0; + if (!parseNumberArg(argv[i], 16, temp)) + return Result::Fail; + if (temp > 10) { + mLogger.printMessage("--max-ctu-depth is being capped at 10. This limitation will be removed in a future Cppcheck version."); + temp = 10; + } + mSettings.maxCtuDepth = temp; + } + + else if (std::strncmp(argv[i], "--max-template-recursion=", 25) == 0) { + if (!parseNumberArg(argv[i], 25, mSettings.maxTemplateRecursion)) + return Result::Fail; + } + + else if (std::strcmp(argv[i],"--no-analyze-all-vs-configs") == 0) { + mSettings.analyzeAllVsConfigs = false; + mAnalyzeAllVsConfigsSetOnCmdLine = true; + } + + else if (std::strcmp(argv[i], "--no-check-headers") == 0) + mSettings.checkHeaders = false; + + else if (std::strcmp(argv[i], "--no-check-unused-templates") == 0) + mSettings.checkUnusedTemplates = false; + + // undocumented option for usage in Python tests to indicate that no build dir should be injected + else if (std::strcmp(argv[i], "--no-cppcheck-build-dir") == 0) { + mSettings.buildDir.clear(); + } + + else if (std::strcmp(argv[i], "--no-cpp-header-probe") == 0) { + mSettings.cppHeaderProbe = false; + } + + else if (std::strcmp(argv[i], "--no-safety") == 0) + mSettings.safety = false; + + // Write results in file + else if (std::strncmp(argv[i], "--output-file=", 14) == 0) + mSettings.outputFile = Path::simplifyPath(argv[i] + 14); + + else if (std::strncmp(argv[i], "--output-format=", 16) == 0) { + if (xmlOptionProvided) { + outputFormatOptionMixingError(); + return Result::Fail; + } + const std::string format = argv[i] + 16; + // plist can not be handled here because it requires additional data + if (format == "text") + mSettings.outputFormat = Settings::OutputFormat::text; + else if (format == "sarif") + mSettings.outputFormat = Settings::OutputFormat::sarif; + else if (format == "xml") + mSettings.outputFormat = Settings::OutputFormat::xml; + else if (format == "xmlv2") { + mSettings.outputFormat = Settings::OutputFormat::xml; + mSettings.xml_version = 2; + } else if (format == "xmlv3") { + mSettings.outputFormat = Settings::OutputFormat::xml; + mSettings.xml_version = 3; + } else { + mLogger.printError("argument to '--output-format=' must be 'text', 'sarif', 'xml' (deprecated), 'xmlv2' or 'xmlv3'."); + return Result::Fail; + } + mSettings.plistOutput = ""; + outputFormatOptionProvided = true; + } + + + // Experimental: limit execution time for extended valueflow analysis. basic valueflow analysis + // is always executed. + else if (std::strncmp(argv[i], "--performance-valueflow-max-time=", 33) == 0) { + if (!parseNumberArg(argv[i], 33, mSettings.vfOptions.maxTime, true)) + return Result::Fail; + } + + else if (std::strncmp(argv[i], "--performance-valueflow-max-if-count=", 37) == 0) { + if (!parseNumberArg(argv[i], 37, mSettings.vfOptions.maxIfCount, true)) + return Result::Fail; + } + + else if (std::strncmp(argv[i], "--performance-valueflow-max-iterations=", 39) == 0) { + if (!parseNumberArg(argv[i], 39, mSettings.vfOptions.maxIterations, true)) + return Result::Fail; + } + + // Specify platform + else if (std::strncmp(argv[i], "--platform=", 11) == 0) { + std::string p = 11 + argv[i]; + if (p.empty()) { + mLogger.printError("empty platform specified."); + return Result::Fail; + } + platform = std::move(p); + } + + // Write results in results.plist + else if (std::strncmp(argv[i], "--plist-output=", 15) == 0) { + std::string path = Path::simplifyPath(argv[i] + 15); + if (path.empty()) + path = "."; + + const std::string plistOutput = Path::toNativeSeparators(path); + if (!Path::isDirectory(plistOutput)) { + std::string message("plist folder does not exist: '"); + message += plistOutput; + message += "'."; + mLogger.printError(message); + return Result::Fail; + } + + if (!endsWith(path,'/')) + path += '/'; + + mSettings.outputFormat = Settings::OutputFormat::plist; + mSettings.plistOutput = std::move(path); + } + + // Special Cppcheck Premium options + else if ((std::strncmp(argv[i], "--premium=", 10) == 0 || std::strncmp(argv[i], "--premium-", 10) == 0) && mSettings.premium) { + // valid options --premium=.. + const std::set valid{ + "autosar", + "cert-c-2016", + "cert-c++-2016", + "cert-cpp-2016", + "cert-c", + "cert-c++", + "metrics", + "misra-c-2012", + "misra-c-2023", + "misra-c-2025", + "misra-c++-2008", + "misra-cpp-2008", + "misra-c++-2023", + "misra-cpp-2023", + "bughunting", + "safety", // TODO: deprecate in favor of the regular --safety/--no-safety + "safety-profiles", + "debug-progress"}; + // valid options --premium-..= + const std::set valid2{ + "cert-c-int-precision", + "license-file" + }; + + if (std::strcmp(argv[i], "--premium=safety-off") == 0) { + mSettings.safety = false; + continue; + } + if (std::strcmp(argv[i], "--premium=safety") == 0) + mSettings.safety = true; + if (!mSettings.premiumArgs.empty()) + mSettings.premiumArgs += " "; + const std::string p(argv[i] + 10); + const std::string p2(p.find('=') != std::string::npos ? p.substr(0, p.find('=')) : ""); + const bool isCodingStandard = startsWith(p, "autosar") || startsWith(p,"cert-") || startsWith(p,"misra-") || p == "safety-profiles"; + const std::string p3(endsWith(p,":all") && isCodingStandard ? p.substr(0,p.rfind(':')) : p); + if (!valid.count(p3) && !valid2.count(p2)) { + mLogger.printError("invalid --premium option '" + (p2.empty() ? p : p2) + "'."); + return Result::Fail; + } + if (p2 == "cert-c-int-precision") { + int tmp; + if (!parseNumberArg(argv[i], 31, tmp, true)) + return Result::Fail; + } + mSettings.premiumArgs += "--" + p; + if (isCodingStandard) { + // All checkers related to the coding standard should be enabled. The coding standards + // do not all undefined behavior or portability issues. + mSettings.addEnabled("warning"); + mSettings.addEnabled("portability"); + } + } + + // --project + else if (std::strncmp(argv[i], "--project=", 10) == 0) { + if (projectType != ImportProject::Type::NONE) + { + mLogger.printError("multiple --project options are not supported."); + return Result::Fail; + } + + std::string projectFile = argv[i]+10; + projectType = project.import(projectFile, &mSettings, &mSuppressions); + if (projectType == ImportProject::Type::CPPCHECK_GUI) { + for (const std::string &lib : project.guiProject.libraries) + mSettings.libraries.emplace_back(lib); + + const auto& excludedPaths = project.guiProject.excludedPaths; + std::copy(excludedPaths.cbegin(), excludedPaths.cend(), std::back_inserter(mIgnoredPaths)); + + if (!project.guiProject.platform.empty()) + platform = project.guiProject.platform; + + // look for external files relative to project first + lookupPaths.insert(lookupPaths.cbegin(), Path::getPathFromFilename(projectFile)); + + const auto& projectFileGui = project.guiProject.projectFile; + if (!projectFileGui.empty()) { + // read underlying project + projectFile = projectFileGui; + projectType = project.import(projectFileGui, &mSettings, &mSuppressions); + if (projectType == ImportProject::Type::CPPCHECK_GUI) { + mLogger.printError("nested Cppcheck GUI projects are not supported."); + return Result::Fail; + } + } + } + if (projectType == ImportProject::Type::COMPILE_DB) + mSettings.maxConfigsProject = 1; + if (projectType == ImportProject::Type::VS_SLN || + projectType == ImportProject::Type::VS_SLNX || + projectType == ImportProject::Type::VS_VCXPROJ) { + mSettings.libraries.emplace_back("windows"); + } + for (const auto &error : project.errors) + mLogger.printError(error); + if (projectType == ImportProject::Type::MISSING) { + mLogger.printError("failed to open project '" + projectFile + "'. The file does not exist."); + return Result::Fail; + } + if (projectType == ImportProject::Type::UNKNOWN) { + mLogger.printError("failed to load project '" + projectFile + "'. The format is unknown."); + return Result::Fail; + } + if (projectType == ImportProject::Type::FAILURE) { + mLogger.printError("failed to load project '" + projectFile + "'. An error occurred."); + return Result::Fail; + } + } + + // --project-configuration + else if (std::strncmp(argv[i], "--project-configuration=", 24) == 0) { + vsConfig = argv[i] + 24; + if (vsConfig.empty()) { + mLogger.printError("--project-configuration parameter is empty."); + return Result::Fail; + } + if (projectType != ImportProject::Type::VS_SLN && + projectType != ImportProject::Type::VS_SLNX && + projectType != ImportProject::Type::VS_VCXPROJ) { + mLogger.printError("--project-configuration has no effect - no Visual Studio project provided."); + return Result::Fail; + } + } + + // Only print something when there are errors + else if (std::strcmp(argv[i], "-q") == 0 || std::strcmp(argv[i], "--quiet") == 0) + mSettings.quiet = true; + + // Output relative paths + else if (std::strcmp(argv[i], "-rp") == 0 || std::strcmp(argv[i], "--relative-paths") == 0) + mSettings.relativePaths = true; + else if (std::strncmp(argv[i], "-rp=", 4) == 0 || std::strncmp(argv[i], "--relative-paths=", 17) == 0) { + mSettings.relativePaths = true; + if (argv[i][argv[i][3]=='='?4:17] != 0) { + std::string paths = argv[i]+(argv[i][3]=='='?4:17); + for (;;) { + const std::string::size_type pos = paths.find(';'); + if (pos == std::string::npos) { + mSettings.basePaths.emplace_back(Path::fromNativeSeparators(std::move(paths))); + break; + } + mSettings.basePaths.emplace_back(Path::fromNativeSeparators(paths.substr(0, pos))); + paths.erase(0, pos + 1); + } + } else { + mLogger.printError("no paths specified for the '" + std::string(argv[i]) + "' option."); + return Result::Fail; + } + } + + // Report progress + else if (std::strcmp(argv[i], "--report-progress") == 0) { + mSettings.reportProgress = 10; + } + + else if (std::strncmp(argv[i], "--report-progress=", 18) == 0) { + if (!parseNumberArg(argv[i], 18, mSettings.reportProgress, true)) + return Result::Fail; + } + + else if (std::strncmp(argv[i], "--report-type=", 14) == 0) { + const std::string typeStr = argv[i] + 14; + if (typeStr == "normal") { + mSettings.reportType = ReportType::normal; + } else if (typeStr == "autosar") { + mSettings.reportType = ReportType::autosar; + } else if (typeStr == "cert-c-2016") { + mSettings.reportType = ReportType::certC; + } else if (typeStr == "cert-cpp-2016") { + mSettings.reportType = ReportType::certCpp; + } else if (typeStr == "misra-c-2012") { + mSettings.reportType = ReportType::misraC2012; + } else if (typeStr == "misra-c-2023") { + mSettings.reportType = ReportType::misraC2023; + } else if (typeStr == "misra-c-2025") { + mSettings.reportType = ReportType::misraC2025; + } else if (typeStr == "misra-cpp-2008") { + mSettings.reportType = ReportType::misraCpp2008; + } else if (typeStr == "misra-cpp-2023") { + mSettings.reportType = ReportType::misraCpp2023; + } else { + mLogger.printError("Unknown report type \'" + typeStr + "\'"); + return Result::Fail; + } + } + + // Rule given at command line + else if (std::strncmp(argv[i], "--rule=", 7) == 0) { +#ifdef HAVE_RULES + Settings::Rule rule; + rule.pattern = 7 + argv[i]; + + if (rule.pattern.empty()) { + mLogger.printError("no rule pattern provided."); + return Result::Fail; + } + + std::string regex_err; + auto regex = Regex::create(rule.pattern, Regex::Engine::Pcre, regex_err); + if (!regex) { + mLogger.printError("failed to compile rule pattern '" + rule.pattern + "' (" + regex_err + ")."); + return Result::Fail; + } + rule.regex = std::move(regex); + mSettings.rules.emplace_back(std::move(rule)); +#else + mLogger.printError("Option --rule cannot be used as Cppcheck has not been built with rules support."); + return Result::Fail; +#endif + } + + // Rule file + else if (std::strncmp(argv[i], "--rule-file=", 12) == 0) { +#ifdef HAVE_RULES + // TODO: improved error handling - wrong root node, etc. + // TODO: consume unused "version" attribute + const std::string ruleFile = argv[i] + 12; + tinyxml2::XMLDocument doc; + const tinyxml2::XMLError err = doc.LoadFile(ruleFile.c_str()); + if (err == tinyxml2::XML_SUCCESS) { + const tinyxml2::XMLElement *node = doc.FirstChildElement(); + // check if it is a single or multi rule configuration + if (node && strcmp(node->Value(), "rules") == 0) + node = node->FirstChildElement("rule"); + for (; node && strcmp(node->Value(), "rule") == 0; node = node->NextSiblingElement()) { + Settings::Rule rule; + + for (const tinyxml2::XMLElement *subnode = node->FirstChildElement(); subnode; subnode = subnode->NextSiblingElement()) { + const char * const subname = subnode->Name(); + const char * const subtext = subnode->GetText(); + if (std::strcmp(subname, "tokenlist") == 0) { + rule.tokenlist = empty_if_null(subtext); + } + else if (std::strcmp(subname, "pattern") == 0) { + rule.pattern = empty_if_null(subtext); + } + else if (std::strcmp(subname, "message") == 0) { + for (const tinyxml2::XMLElement *msgnode = subnode->FirstChildElement(); msgnode; msgnode = msgnode->NextSiblingElement()) { + const char * const msgname = msgnode->Name(); + const char * const msgtext = msgnode->GetText(); + if (std::strcmp(msgname, "severity") == 0) { + rule.severity = severityFromString(empty_if_null(msgtext)); + } + else if (std::strcmp(msgname, "id") == 0) { + rule.id = empty_if_null(msgtext); + } + else if (std::strcmp(msgname, "summary") == 0) { + rule.summary = empty_if_null(msgtext); + } + else { + mLogger.printError("unable to load rule-file '" + ruleFile + "' - unknown element '" + msgname + "' encountered in 'message'."); + return Result::Fail; + } + } + } + else if (std::strcmp(subname, "engine") == 0) { + const char * const engine = empty_if_null(subtext); + if (std::strcmp(engine, "pcre") == 0) { + rule.engine = Regex::Engine::Pcre; + } + else { + mLogger.printError(std::string("unknown regex engine '") + engine + "'."); + return Result::Fail; + } + } + else { + mLogger.printError("unable to load rule-file '" + ruleFile + "' - unknown element '" + subname + "' encountered in 'rule'."); + return Result::Fail; + } + } + + if (rule.pattern.empty()) { + mLogger.printError("unable to load rule-file '" + ruleFile + "' - a rule is lacking a pattern."); + return Result::Fail; + } + + if (rule.id.empty()) { + mLogger.printError("unable to load rule-file '" + ruleFile + "' - a rule is lacking an id."); + return Result::Fail; + } + + if (rule.tokenlist.empty()) { + mLogger.printError("unable to load rule-file '" + ruleFile + "' - a rule is lacking a tokenlist."); + return Result::Fail; + } + + if (rule.tokenlist != "normal" && rule.tokenlist != "define" && rule.tokenlist != "raw") { + mLogger.printError("unable to load rule-file '" + ruleFile + "' - a rule is using the unsupported tokenlist '" + rule.tokenlist + "'."); + return Result::Fail; + } + + std::string regex_err; + auto regex = Regex::create(rule.pattern, rule.engine, regex_err); + if (!regex) { + mLogger.printError("unable to load rule-file '" + ruleFile + "' - pattern '" + rule.pattern + "' failed to compile (" + regex_err + ")."); + return Result::Fail; + } + rule.regex = std::move(regex); + + if (rule.severity == Severity::none) { + mLogger.printError("unable to load rule-file '" + ruleFile + "' - a rule has an invalid severity."); + return Result::Fail; + } + + mSettings.rules.emplace_back(std::move(rule)); + } + } else { + mLogger.printError("unable to load rule-file '" + ruleFile + "' (" + tinyxml2::XMLDocument::ErrorIDToName(err) + ")."); + return Result::Fail; + } +#else + mLogger.printError("Option --rule-file cannot be used as Cppcheck has not been built with rules support."); + return Result::Fail; +#endif + } + + // Safety certified behavior + else if (std::strcmp(argv[i], "--safety") == 0) + mSettings.safety = true; + + // show timing information.. + else if (std::strncmp(argv[i], "--showtime=", 11) == 0) { + const std::string showtimeMode = argv[i] + 11; + if (showtimeMode == "file") + mSettings.showtime = Settings::ShowTime::FILE; + else if (showtimeMode == "file-total") + mSettings.showtime = Settings::ShowTime::FILE_TOTAL; + else if (showtimeMode == "summary") + mSettings.showtime = Settings::ShowTime::SUMMARY; + else if (showtimeMode == "top5_file") + mSettings.showtime = Settings::ShowTime::TOP5_FILE; + else if (showtimeMode == "top5_summary") + mSettings.showtime = Settings::ShowTime::TOP5_SUMMARY; + else if (showtimeMode == "none") + mSettings.showtime = Settings::ShowTime::NONE; + else if (showtimeMode.empty()) { + mLogger.printError("no mode provided for --showtime"); + return Result::Fail; + } + else { + mLogger.printError("unrecognized --showtime mode: '" + showtimeMode + "'. Supported modes: file, file-total, summary, top5_file, top5_summary."); + return Result::Fail; + } + } + + // --std + else if (std::strncmp(argv[i], "--std=", 6) == 0) { + const std::string std = argv[i] + 6; + if (!mSettings.standards.setStd(std)) { + mLogger.printError("unknown --std value '" + std + "'"); + return Result::Fail; + } + } + + else if (std::strncmp(argv[i], "--suppress=", 11) == 0) { + const std::string suppression = argv[i]+11; + const std::string errmsg(mSuppressions.nomsg.addSuppressionLine(suppression)); + if (!errmsg.empty()) { + mLogger.printError(errmsg); + return Result::Fail; + } + } + + // Filter errors + else if (std::strncmp(argv[i], "--suppressions-list=", 20) == 0) { + std::string filename = argv[i]+20; + std::ifstream f(filename); + if (!f.is_open()) { + std::string message("couldn't open the file: \""); + message += filename; + message += "\"."; + if (std::count(filename.cbegin(), filename.cend(), ',') > 0 || + std::count(filename.cbegin(), filename.cend(), '.') > 1) { + // If user tried to pass multiple files (we can only guess that) + // e.g. like this: --suppressions-list=a.txt,b.txt + // print more detailed error message to tell user how he can solve the problem + message += "\nIf you want to pass two files, you can do it e.g. like this:"; + message += "\n cppcheck --suppressions-list=a.txt --suppressions-list=b.txt file.cpp"; + } + + mLogger.printError(message); + return Result::Fail; + } + const std::string errmsg(mSuppressions.nomsg.parseFile(f)); + if (!errmsg.empty()) { + mLogger.printError(errmsg); + return Result::Fail; + } + } + + else if (std::strncmp(argv[i], "--suppress-xml=", 15) == 0) { + const char * filename = argv[i] + 15; + const std::string errmsg(mSuppressions.nomsg.parseXmlFile(filename)); + if (!errmsg.empty()) { + mLogger.printError(errmsg); + return Result::Fail; + } + } + + // Output formatter + else if (std::strncmp(argv[i], "--template=", 11) == 0) { + mSettings.templateFormat = argv[i] + 11; + // TODO: bail out when no template is provided? + + if (mSettings.templateFormat == "gcc") { + mSettings.templateFormat = "{bold}{file}:{line}:{column}: {magenta}warning:{default} {message} [{id}]{reset}\\n{code}"; + mSettings.templateLocation = "{bold}{file}:{line}:{column}: {dim}note:{reset} {info}\\n{code}"; + } else if (mSettings.templateFormat == "daca2") { + mSettings.daca = true; + mSettings.templateFormat = "{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]"; + mSettings.templateLocation = "{file}:{line}:{column}: note: {info}"; + } else if (mSettings.templateFormat == "vs") + mSettings.templateFormat = "{file}({line}): {severity}: {message}"; + else if (mSettings.templateFormat == "edit") + mSettings.templateFormat = "{file} +{line}: {severity}: {message}"; + else if (mSettings.templateFormat == "cppcheck1") + mSettings.templateFormat = "{callstack}: ({severity}{inconclusive:, inconclusive}) {message}"; + else if (mSettings.templateFormat == "selfcheck") { + mSettings.templateFormat = "{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]\\n{code}"; + mSettings.templateLocation = "{file}:{line}:{column}: note: {info}\\n{code}"; + mSettings.daca = true; + } else if (mSettings.templateFormat == "simple") { + mSettings.templateFormat = "{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]"; + mSettings.templateLocation = ""; + } + // TODO: bail out when no placeholders are found? + } + + else if (std::strncmp(argv[i], "--template-location=", 20) == 0) { + mSettings.templateLocation = argv[i] + 20; + // TODO: bail out when no template is provided? + // TODO: bail out when no placeholders are found? + } + + else if (std::strncmp(argv[i], "--template-max-time=", 20) == 0) { + if (!parseNumberArg(argv[i], 20, mSettings.templateMaxTime)) + return Result::Fail; + } + + else if (std::strncmp(argv[i], "--typedef-max-time=", 19) == 0) { + if (!parseNumberArg(argv[i], 19, mSettings.typedefMaxTime)) + return Result::Fail; + } + + else if (std::strncmp(argv[i], "--valueflow-max-iterations=", 27) == 0) { + if (!parseNumberArg(argv[i], 27, mSettings.vfOptions.maxIterations)) + return Result::Fail; + } + + else if (std::strcmp(argv[i], "-v") == 0 || std::strcmp(argv[i], "--verbose") == 0) + mSettings.verbose = true; + + // Write results in results.xml + else if (std::strcmp(argv[i], "--xml") == 0) { + if (outputFormatOptionProvided) { + outputFormatOptionMixingError(); + return Result::Fail; + } + mSettings.outputFormat = Settings::OutputFormat::xml; + xmlOptionProvided = true; + } + + // Define the XML file version (and enable XML output) + else if (std::strncmp(argv[i], "--xml-version=", 14) == 0) { + if (outputFormatOptionProvided) { + outputFormatOptionMixingError(); + return Result::Fail; + } + int tmp; + if (!parseNumberArg(argv[i], 14, tmp)) + return Result::Fail; + if (tmp != 2 && tmp != 3) { + // We only have xml version 2 and 3 + mLogger.printError("'--xml-version' can only be 2 or 3."); + return Result::Fail; + } + + mSettings.xml_version = tmp; + // Enable also XML if version is set + mSettings.outputFormat = Settings::OutputFormat::xml; + xmlOptionProvided = true; } else { - std::string path = Path::fromNativeSeparators(argv[i]); - path = Path::removeQuotationMarks(path); - _pathnames.push_back(path); + std::string message("unrecognized command line option: \""); + message += argv[i]; + message += "\"."; + mLogger.printError(message); + return Result::Fail; } } - if (_settings->isEnabled("unusedFunction") && _settings->_jobs > 1) { - PrintMessage("cppcheck: unusedFunction check can't be used with '-j' option, so it's disabled."); + // TODO: bail out? + if (!executorAuto && mSettings.useSingleJob()) + mLogger.printMessage("'--executor' has no effect as only a single job will be used."); + + // Default template format.. + if (mSettings.templateFormat.empty()) { + mSettings.templateFormat = "{bold}{file}:{line}:{column}: {red}{inconclusive:{magenta}}{severity}:{inconclusive: inconclusive:}{default} {message} [{id}]{reset}\\n{code}"; + if (mSettings.templateLocation.empty()) + mSettings.templateLocation = "{bold}{file}:{line}:{column}: {dim}note:{reset} {info}\\n{code}"; + } + // replace static parts of the templates + substituteTemplateFormatStatic(mSettings.templateFormat, !mSettings.outputFile.empty()); + substituteTemplateLocationStatic(mSettings.templateLocation, !mSettings.outputFile.empty()); + + if (debug) { + mSettings.debugnormal = true; + mSettings.debugvalueflow = true; + if (mSettings.verbose) { + mSettings.debugast = true; + mSettings.debugsymdb = true; + } } - // FIXME: Make the _settings.test_2_pass thread safe - if (_settings->test_2_pass && _settings->_jobs > 1) { - PrintMessage("cppcheck: --test-2-pass doesn't work with -j option yet."); + if (mSettings.jobs > 1 && mSettings.buildDir.empty()) { + // TODO: bail out instead? + if (mSettings.checks.isEnabled(Checks::unusedFunction)) + { + mLogger.printMessage("unusedFunction check requires --cppcheck-build-dir to be active with -j."); + mSettings.checks.disable(Checks::unusedFunction); + // TODO: is there some later logic to remove? + } + // TODO: enable + //mLogger.printMessage("whole program analysis requires --cppcheck-build-dir to be active with -j."); } - if (argc <= 1) - _showHelp = true; + if (!mSettings.checks.isEnabled(Checks::unusedFunction)) + mSettings.unmatchedSuppressionFilters.emplace_back("unusedFunction"); + if (!mSettings.addons.count("misra")) + mSettings.unmatchedSuppressionFilters.emplace_back("misra-*"); + if (!mSettings.premium) + mSettings.unmatchedSuppressionFilters.emplace_back("premium-*"); - if (_showHelp) { - PrintHelp(); - return true; + if (inputAsFilter) { + mSettings.fileFilters.insert(mSettings.fileFilters.end(), mPathNames.cbegin(), mPathNames.cend()); + mPathNames.clear(); + } + + if (!mPathNames.empty() && projectType != ImportProject::Type::NONE) { + mLogger.printError("--project cannot be used in conjunction with source files."); + return Result::Fail; + } + + // TODO: conflicts with analyzeAllVsConfigs + if (!vsConfig.empty()) { + // TODO: bail out when this does nothing + project.ignoreOtherConfigs(vsConfig); + } + + if (!platform.empty()) + { + std::string errstr; + if (!mSettings.platform.set(platform, errstr, lookupPaths, mSettings.debuglookup || mSettings.debuglookupPlatform)) { + mLogger.printError(errstr); + return Result::Fail; + } + } + + if (defaultSign != '\0') + mSettings.platform.defaultSign = defaultSign; + + if (!mSettings.analyzeAllVsConfigs) { + if (projectType != ImportProject::Type::VS_SLN && + projectType != ImportProject::Type::VS_SLNX && + projectType != ImportProject::Type::VS_VCXPROJ) { + if (mAnalyzeAllVsConfigsSetOnCmdLine) { + mLogger.printError("--no-analyze-all-vs-configs has no effect - no Visual Studio project provided."); + return Result::Fail; + } + } else { + // TODO: bail out when this does nothing + project.selectOneVsConfig(mSettings.platform.type); + } + } + + if (!mSettings.buildDir.empty() && !Path::isDirectory(mSettings.buildDir)) { + mLogger.printError("Directory '" + mSettings.buildDir + "' specified by --cppcheck-build-dir argument has to be existent."); + return Result::Fail; } // Print error only if we have "real" command and expect files - if (!_exitAfterPrint && _pathnames.empty()) { - PrintMessage("cppcheck: No C or C++ source files found."); - return false; + if (mPathNames.empty() && project.guiProject.pathNames.empty() && project.fileSettings.empty()) { + // TODO: this message differs from the one reported in fillSettingsFromArgs() + mLogger.printError("no C or C++ source files found."); + return Result::Fail; + } + + for (auto& path : mIgnoredPaths) + { + path = Path::removeQuotationMarks(std::move(path)); + path = Path::fromNativeSeparators(std::move(path)); + } + + if (!project.guiProject.pathNames.empty()) + mPathNames = project.guiProject.pathNames; + + if (!project.fileSettings.empty()) { + project.ignorePaths(mIgnoredPaths, mSettings.debugignore); + if (project.fileSettings.empty()) { + mLogger.printError("no C or C++ source files found."); + mLogger.printMessage("all paths were ignored"); // TODO: log this differently? + return Result::Fail; + } + mFileSettings = project.fileSettings; + } + + if (mSettings.debugnormal && mSettings.outputFormat == Settings::OutputFormat::xml && (mPathNames.size() > 1 || mFileSettings.size() > 1)) + { + mLogger.printError("printing debug output in XML format does not support multiple input files."); + return Result::Fail; } + // Use paths _pathnames if no base paths for relative path output are given + if (mSettings.basePaths.empty() && mSettings.relativePaths) + mSettings.basePaths = mPathNames; + + return Result::Success; +} + +void CmdLineParser::printHelp() const +{ + std::ostringstream oss; + // TODO: display product name + oss << "Cppcheck - A tool for static C/C++ code analysis\n" + "\n" + "Syntax:\n" + " cppcheck [OPTIONS] [files or paths]\n" + "\n" + "If a directory is given instead of a filename, *.cpp, *.cxx, *.cc, *.c++, *.c, *.ipp,\n" + "*.ixx, *.tpp, and *.txx files are checked recursively from the given directory.\n\n" + "Options:\n" + " --addon=\n" + " Execute addon. i.e. --addon=misra. If options must be\n" + " provided a json configuration is needed.\n" + " --addon-python=\n" + " You can specify the python interpreter either in the\n" + " addon json files or through this command line option.\n" + " If not present, Cppcheck will try \"python3\" first and\n" + " then \"python\".\n" + " --cppcheck-build-dir=\n" + " Cppcheck work folder. Advantages:\n" + " * whole program analysis\n" + " * faster analysis; Cppcheck will reuse the results if\n" + " the hash for a file is unchanged.\n" + " * some useful debug information, i.e. commands used to\n" + " execute clang/clang-tidy/addons.\n" + " --check-config Check cppcheck configuration. The normal code\n" + " analysis is disabled by this flag.\n" + " --check-level=\n" + " Configure how much valueflow analysis you want:\n" + " * reduced: Reduce valueflow to finish checking quickly.\n" + " * normal: Cppcheck uses some compromises in the analysis so\n" + " the checking will finish in reasonable time.\n" + " * exhaustive: deeper analysis that you choose when you can\n" + " wait.\n" + " The default choice is 'normal'.\n" + " --check-library Show information messages when library files have\n" + " incomplete info.\n" + " --checkers-report=\n" + " Write a report of all the active checkers to the given file.\n" + " --clang= Experimental: Use Clang parser instead of the builtin Cppcheck\n" + " parser. Takes the executable as optional parameter and\n" + " defaults to `clang`. Cppcheck will run the given Clang\n" + " executable, import the Clang AST and convert it into\n" + " Cppcheck data. After that the normal Cppcheck analysis is\n" + " used. You must have the executable in PATH if no path is\n" + " given.\n" + " --config-exclude=\n" + " Path (prefix) to be excluded from configuration\n" + " checking. Preprocessor configurations defined in\n" + " headers (but not sources) matching the prefix will not\n" + " be considered for evaluation.\n" + " --config-excludes-file=\n" + " A file that contains a list of config-excludes\n" + " --disable= Disable checks with the given severity.\n" + " Please refer to the documentation of --enable for\n" + " further details.\n" + " --dump Dump xml data for each translation unit. The dump\n" + " files have the extension .dump and contain ast,\n" + " tokenlist, symboldatabase, valueflow.\n" + " -D Define preprocessor symbol. Unless --max-configs or\n" + " --force is used, Cppcheck will only check the given\n" + " configuration when -D is used.\n" + " Example: '-DDEBUG=1 -D__cplusplus'.\n" + " -E Print preprocessor output on stdout and don't do any\n" + " further processing.\n" + " --enable= Enable additional checks grouped by severity. The available\n" + " severities are:\n" + " * warning\n" + " * performance\n" + " * portability\n" + " * information\n" + " * style\n" + " Enable checks with severities 'style', 'warning',\n" + " 'performance' and 'portability'.\n" + " * unusedFunction\n" + " Check for unused functions. It is recommended\n" + " to only enable this when the whole program is\n" + " scanned.\n" + " * missingInclude\n" + " Check for missing include files.\n" + " * all\n" + " Enable all checks.\n" + " Pass multiple severities as a comma-separated list.\n" + " --error-exitcode= If errors are found, integer [n] is returned instead of\n" + " the default '0'. '" << EXIT_FAILURE << "' is returned\n" + " if arguments are not valid or if no input files are\n" + " provided. Note that your operating system can modify\n" + " this value, e.g. '256' can become '0'.\n" + " --errorlist Print a list of all the error messages in XML format.\n" + " --exitcode-suppress=\n" + " Used to specify an error ID which should not result in\n" + " a non-zero exitcode." + " --exitcode-suppressions=\n" + " Used when certain messages should be displayed but\n" + " should not cause a non-zero exitcode.\n" + " --file-filter= Analyze only those files matching the given filter str.\n" + " Can be used multiple times. When str is '-', the file\n" + " filter will be read from standard input. When str is '+',\n" + " given files on CLI will be treated as file filters.\n" + " Example: --file-filter=*bar.cpp analyzes only files\n" + " that end with bar.cpp.\n" + " --file-list= Specify the files to check in a text file. Add one\n" + " filename per line. When file is '-,' the file list will\n" + " be read from standard input.\n" + " -f, --force Force checking of all configurations in files. If used\n" + " together with '--max-configs=', the last option is the\n" + " one that is effective.\n" + " --fsigned-char Treat char type as signed.\n" + " --funsigned-char Treat char type as unsigned.\n" + " -h, --help Print this help.\n" + " -I Give path to search for include files. Give several -I\n" + " parameters to give several paths. First given path is\n" + " searched for contained header files first. If paths are\n" + " relative to source files, this is not needed.\n" + " --includes-file=\n" + " Specify directory paths to search for included header\n" + " files in a text file. Add one include path per line.\n" + " First given path is searched for contained header\n" + " files first. If paths are relative to source files,\n" + " this is not needed.\n" + " --include=\n" + " Force inclusion of a file before the checked file.\n" + " -i Ignore files that match . can be a filename\n" + " or directory and can contain *,**,?. A file that is\n" + " ignored will not be checked directly (the whole\n" + " translation unit is skipped completely). Header files\n" + " are checked indirectly when they are #include'd.\n" + " Note: If you want to prevent warnings in some headers,\n" + " use suppressions instead.\n" + " --inconclusive Allow that Cppcheck reports even though the analysis is\n" + " inconclusive.\n" + " There are false positives with this option. Each result\n" + " must be carefully investigated before you know if it is\n" + " good or bad.\n" + " --inline-suppr Enable inline suppressions. Use them by placing one or\n" + " more comments, like: '// cppcheck-suppress warningId'\n" + " on the lines before the warning to suppress.\n" + " -j Start threads to do the checking simultaneously.\n" + " -l Specifies that no new threads should be started if\n" + " there are other threads running and the load average is\n" + " at least .\n" + " --language=, -x \n" + " Forces cppcheck to check all files as the given\n" + " language. Valid values are: c, c++\n" + " --library= Load file that contains information about types\n" + " and functions. With such information Cppcheck\n" + " understands your code better and therefore you\n" + " get better results. The std.cfg file that is\n" + " distributed with Cppcheck is loaded automatically.\n" + " For more information about library files, read the\n" + " manual.\n" + " --max-configs=\n" + " Maximum number of configurations to check in a file\n" + " before skipping it. Default is '12'. If used together\n" + " with '--force', the last option is the one that is\n" + " effective.\n" + " --max-ctu-depth=N Max depth in whole program analysis. The default value\n" + " is 2. A larger value will mean more errors can be found\n" + " but also means the analysis will be slower.\n" + " --output-file= Write results to file, rather than standard error.\n" + " --output-format=\n" + " Specify the output format. The available formats are:\n" + " * text\n" + " * sarif\n" + " * xml (deprecated)\n" + " * xmlv2\n" + " * xmlv3\n" + " --platform=, --platform=\n" + " Specifies platform specific types and sizes. The\n" + " available builtin platforms are:\n" + " * unix32\n" + " 32 bit unix variant\n" + " * unix64\n" + " 64 bit unix variant\n" + " * win32A\n" + " 32 bit Windows ASCII character encoding\n" + " * win32W\n" + " 32 bit Windows UNICODE character encoding\n" + " * win64\n" + " 64 bit Windows\n" + " * avr8\n" + " 8 bit AVR microcontrollers\n" + " * elbrus-e1cp\n" + " Elbrus e1c+ architecture\n" + " * pic8\n" + " 8 bit PIC microcontrollers\n" + " Baseline and mid-range architectures\n" + " * pic8-enhanced\n" + " 8 bit PIC microcontrollers\n" + " Enhanced mid-range and high end (PIC18) architectures\n" + " * pic16\n" + " 16 bit PIC microcontrollers\n" + " * mips32\n" + " 32 bit MIPS microcontrollers\n" + " * native\n" + " Type sizes of host system are assumed, but no\n" + " further assumptions.\n" + " * unspecified\n" + " Unknown type sizes\n" + " --plist-output=\n" + " Generate Clang-plist output files in folder.\n"; + + if (mSettings.premium) { + oss << + " --premium=