Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package cppcheck for openSUSE:Factory checked in at 2022-12-15 19:25:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cppcheck (Old) and /work/SRC/openSUSE:Factory/.cppcheck.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cppcheck" Thu Dec 15 19:25:29 2022 rev:28 rq:1043016 version:2.9.3 Changes: -------- --- /work/SRC/openSUSE:Factory/cppcheck/cppcheck.changes 2022-09-17 20:11:03.385280868 +0200 +++ /work/SRC/openSUSE:Factory/.cppcheck.new.1835/cppcheck.changes 2022-12-15 19:25:58.360318300 +0100 @@ -1,0 +2,6 @@ +Wed Dec 7 22:39:58 UTC 2022 - Dirk Müller <dmuel...@suse.com> + +- update to 2.9.3: + * various GUI and premium feature handling bugfixes + +------------------------------------------------------------------- Old: ---- cppcheck-2.9.tar.gz New: ---- cppcheck-2.9.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cppcheck.spec ++++++ --- /var/tmp/diff_new_pack.a25Jqo/_old 2022-12-15 19:25:58.896321350 +0100 +++ /var/tmp/diff_new_pack.a25Jqo/_new 2022-12-15 19:25:58.900321373 +0100 @@ -17,7 +17,7 @@ Name: cppcheck -Version: 2.9 +Version: 2.9.3 Release: 0 Summary: A tool for static C/C++ code analysis License: GPL-3.0-or-later @@ -34,6 +34,7 @@ BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Help) +BuildRequires: pkgconfig(Qt5Network) BuildRequires: pkgconfig(Qt5PrintSupport) BuildRequires: pkgconfig(Qt5Test) BuildRequires: pkgconfig(Qt5Widgets) ++++++ cppcheck-2.9.tar.gz -> cppcheck-2.9.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/.github/workflows/release-windows.yml new/cppcheck-2.9.3/.github/workflows/release-windows.yml --- old/cppcheck-2.9/.github/workflows/release-windows.yml 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/.github/workflows/release-windows.yml 2022-11-20 21:13:35.000000000 +0100 @@ -65,13 +65,16 @@ uses: actions/cache@v1 # not v2! with: path: ../Qt - key: Windows-QtCache-${{ env.QT_VERSION }}-qtcharts-qthelp + key: Windows-QtCache-${{ env.QT_VERSION }}-qtcharts-qthelp-openssl + # 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 ${{ env.QT_VERSION }} uses: jurplel/install-qt-action@v2 with: version: ${{ env.QT_VERSION }} modules: 'qtcharts qthelp' + tools: 'tools_openssl_x64,1.1.1-10,qt.tools.openssl.win_x64' cached: ${{ steps.cache-qt.outputs.cache-hit }} - name: Create .qm @@ -116,6 +119,8 @@ xcopy /s gui\help win_installer\files\help || exit /b !errorlevel! del win_installer\files\translations\*.qm || exit /b !errorlevel! move gui\*.qm win_installer\files\translations || exit /b !errorlevel! + :: copy libcrypto-1_1-x64.dll and libssl-1_1-x64.dll + copy %RUNNER_WORKSPACE%\Qt\Tools\OpenSSL\Win_x64\bin\lib*.dll win_installer\files || exit /b !errorlevel! - name: Build Installer run: | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/Makefile new/cppcheck-2.9.3/Makefile --- old/cppcheck-2.9/Makefile 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/Makefile 2022-11-20 21:13:35.000000000 +0100 @@ -98,7 +98,7 @@ CPPCHK_GLIBCXX_DEBUG= endif ifndef CXXFLAGS - CXXFLAGS=-std=c++0x -O2 -DNDEBUG -Wall -Wno-sign-compare + CXXFLAGS=-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 $(CPPCHK_GLIBCXX_DEBUG) -g endif ifeq (g++, $(findstring g++,$(CXX))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/cli/cmdlineparser.cpp new/cppcheck-2.9.3/cli/cmdlineparser.cpp --- old/cppcheck-2.9/cli/cmdlineparser.cpp 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/cli/cmdlineparser.cpp 2022-11-20 21:13:35.000000000 +0100 @@ -226,7 +226,7 @@ } else if (std::strncmp(argv[i], "--addon=", 8) == 0) - mSettings->addons.emplace_back(argv[i]+8); + mSettings->addons.emplace(argv[i]+8); else if (std::strncmp(argv[i],"--addon-python=", 15) == 0) mSettings->addonPython.assign(argv[i]+15); @@ -610,9 +610,12 @@ // Special Cppcheck Premium options else if (std::strncmp(argv[i], "--premium=", 10) == 0 && isCppcheckPremium()) { - if (!mSettings->premiumArgs.size()) + if (!mSettings->premiumArgs.empty()) mSettings->premiumArgs += " "; - mSettings->premiumArgs += "--" + std::string(argv[i] + 10); + const std::string p(argv[i] + 10); + mSettings->premiumArgs += "--" + p; + if (p == "misra-c-2012") + mSettings->addons.emplace("misra"); } // --project diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/cli/main.cpp new/cppcheck-2.9.3/cli/main.cpp --- old/cppcheck-2.9/cli/main.cpp 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/cli/main.cpp 2022-11-20 21:13:35.000000000 +0100 @@ -20,7 +20,7 @@ /** * * @mainpage Cppcheck - * @version 2.9 + * @version 2.9.1 * * @section overview_sec Overview * Cppcheck is a simple tool for static analysis of C/C++ code. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/cmake/findDependencies.cmake new/cppcheck-2.9.3/cmake/findDependencies.cmake --- old/cppcheck-2.9/cmake/findDependencies.cmake 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/cmake/findDependencies.cmake 2022-11-20 21:13:35.000000000 +0100 @@ -1,5 +1,5 @@ if (BUILD_GUI) - list(APPEND qt_components Core Gui Widgets PrintSupport LinguistTools Help) + list(APPEND qt_components Core Gui Widgets PrintSupport LinguistTools Help Network) if (WITH_QCHART) list(APPEND qt_components Charts) endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/cmake/qtCompat.cmake new/cppcheck-2.9.3/cmake/qtCompat.cmake --- old/cppcheck-2.9/cmake/qtCompat.cmake 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/cmake/qtCompat.cmake 2022-11-20 21:13:35.000000000 +0100 @@ -28,6 +28,7 @@ set(QT_HELP_LIB Qt5::Help) set(QT_PRINTSUPPORT_LIB Qt5::PrintSupport) set(QT_CHARTS_LIB Qt5::Charts) + set(QT_NETWORK_LIB Qt5::Network) else() # use "versionless" targets - no need for wrapper functions @@ -38,4 +39,5 @@ set(QT_HELP_LIB Qt::Help) set(QT_PRINTSUPPORT_LIB Qt::PrintSupport) set(QT_CHARTS_LIB Qt::Charts) -endif() \ No newline at end of file + set(QT_NETWORK_LIB Qt::Network) +endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/cmake/versions.cmake new/cppcheck-2.9.3/cmake/versions.cmake --- old/cppcheck-2.9/cmake/versions.cmake 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/cmake/versions.cmake 2022-11-20 21:13:35.000000000 +0100 @@ -1,5 +1,5 @@ # Version for libraries CPP -SET(VERSION "2.9") +SET(VERSION "2.9.1") STRING(REGEX MATCHALL "[0-9]+" VERSION_PARTS "${VERSION}") LIST(GET VERSION_PARTS 0 VERSION_MAJOR) LIST(GET VERSION_PARTS 1 VERSION_MINOR) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/gui/CMakeLists.txt new/cppcheck-2.9.3/gui/CMakeLists.txt --- old/cppcheck-2.9/gui/CMakeLists.txt 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/gui/CMakeLists.txt 2022-11-20 21:13:35.000000000 +0100 @@ -36,7 +36,7 @@ if(tinyxml2_FOUND AND NOT USE_BUNDLED_TINYXML2) target_link_libraries(cppcheck-gui ${tinyxml2_LIBRARIES}) endif() - target_link_libraries(cppcheck-gui ${QT_CORE_LIB} ${QT_GUI_LIB} ${QT_WIDGETS_LIB} ${QT_PRINTSUPPORT_LIB} ${QT_HELP_LIB}) + target_link_libraries(cppcheck-gui ${QT_CORE_LIB} ${QT_GUI_LIB} ${QT_WIDGETS_LIB} ${QT_PRINTSUPPORT_LIB} ${QT_HELP_LIB} ${QT_NETWORK_LIB}) if(WITH_QCHART) target_compile_definitions (cppcheck-gui PRIVATE HAVE_QCHART) target_link_libraries(cppcheck-gui ${QT_CHARTS_LIB}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/gui/common.h new/cppcheck-2.9.3/gui/common.h --- old/cppcheck-2.9/gui/common.h 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/gui/common.h 2022-11-20 21:13:35.000000000 +0100 @@ -80,7 +80,6 @@ #define SETTINGS_LANGUAGE "Application language" #define SETTINGS_GLOBAL_INCLUDE_PATHS "Global include paths" #define SETTINGS_PYTHON_PATH "Python path" -#define SETTINGS_MISRA_FILE "MISRA C 2012 file" #define SETTINGS_CLANG_PATH "Clang path" #define SETTINGS_VS_INCLUDE_PATHS "VS include paths" #define SETTINGS_INLINE_SUPPRESSIONS "Inline suppressions" @@ -89,6 +88,8 @@ #define SETTINGS_SHOW_ERROR_ID "Show error Id" #define SETTINGS_SHOW_STATISTICS "Show statistics" #define SETTINGS_OPEN_PROJECT "Open Project" +#define SETTINGS_CHECK_VERSION "Check Version" +#define SETTINGS_CHECK_FOR_UPDATES "Check for updates" // The maximum value for the progress bar #define PROGRESS_MAX 1024.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/gui/gui.pro new/cppcheck-2.9.3/gui/gui.pro --- old/cppcheck-2.9/gui/gui.pro 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/gui/gui.pro 2022-11-20 21:13:35.000000000 +0100 @@ -10,6 +10,7 @@ QT += widgets QT += printsupport QT += help +QT += network # Build online help onlinehelp.target = online-help.qhc @@ -201,11 +202,11 @@ } contains(QMAKE_CC, gcc) { - QMAKE_CXXFLAGS += -std=c++0x -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 + QMAKE_CXXFLAGS += -std=c++17 -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 } contains(QMAKE_CXX, clang++) { - QMAKE_CXXFLAGS += -std=c++0x -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 + QMAKE_CXXFLAGS += -std=c++17 -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 } contains(HAVE_QCHART, [yY][eE][sS]) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/gui/mainwindow.cpp new/cppcheck-2.9.3/gui/mainwindow.cpp --- old/cppcheck-2.9/gui/mainwindow.cpp 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/gui/mainwindow.cpp 2022-11-20 21:13:35.000000000 +0100 @@ -66,10 +66,22 @@ #include <QRegularExpression> #include <QSettings> #include <QTimer> +#include <QtNetwork/QNetworkAccessManager> +#include <QtNetwork/QNetworkReply> static const QString OnlineHelpURL("https://cppcheck.sourceforge.io/manual.html"); static const QString compile_commands_json("compile_commands.json"); +static QString fromNativePath(const QString& p) { +#ifdef Q_OS_WIN + QString ret(p); + ret.replace('\\', '/'); + return ret; +#else + return p; +#endif +} + MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) : mSettings(settings), mApplications(new ApplicationList(this)), @@ -86,6 +98,7 @@ { { Settings tempSettings; + tempSettings.exename = QCoreApplication::applicationFilePath().toStdString(); tempSettings.loadCppcheckCfg(); mCppcheckCfgProductName = QString::fromStdString(tempSettings.cppcheckCfgProductName); mCppcheckCfgAbout = QString::fromStdString(tempSettings.cppcheckCfgAbout); @@ -245,6 +258,28 @@ #endif Platform &platform = mPlatforms.get((Settings::PlatformType)mSettings->value(SETTINGS_CHECKED_PLATFORM, defaultPlatform).toInt()); platform.mActMainWindow->setChecked(true); + + mNetworkAccessManager = new QNetworkAccessManager(this); + connect(mNetworkAccessManager, &QNetworkAccessManager::finished, + this, &MainWindow::replyFinished); + + mUI->mLabelInformation->setVisible(false); + mUI->mButtonHideInformation->setVisible(false); + connect(mUI->mButtonHideInformation, &QPushButton::clicked, + this, &MainWindow::hideInformation); + + if (mSettings->value(SETTINGS_CHECK_FOR_UPDATES, false).toBool()) { + // Is there a new version? + if (isCppcheckPremium()) { + const QUrl url("https://files.cppchecksolutions.com/version.txt"); + mNetworkAccessManager->get(QNetworkRequest(url)); + } else { + const QUrl url("https://cppcheck.sourceforge.io/version.txt"); + mNetworkAccessManager->get(QNetworkRequest(url)); + } + } else { + delete mUI->mLayoutInformation; + } } MainWindow::~MainWindow() @@ -886,7 +921,7 @@ if (!mProjectFile->getImportProject().isEmpty()) result.checkAllConfigurations = false; - const QString &buildDir = mProjectFile->getBuildDir(); + const QString &buildDir = fromNativePath(mProjectFile->getBuildDir()); if (!buildDir.isEmpty()) { if (QDir(buildDir).isAbsolute()) { result.buildDir = buildDir.toStdString(); @@ -922,7 +957,7 @@ result.checkUnknownFunctionReturn.insert(s.toStdString()); QString filesDir(getDataDir()); - const QString pythonCmd = mSettings->value(SETTINGS_PYTHON_PATH).toString(); + const QString pythonCmd = fromNativePath(mSettings->value(SETTINGS_PYTHON_PATH).toString()); for (const QString& addon : mProjectFile->getAddons()) { QString addonFilePath = ProjectFile::getAddonFilePath(filesDir, addon); if (addonFilePath.isEmpty()) @@ -934,17 +969,8 @@ json += "{ \"script\":\"" + addonFilePath + "\""; if (!pythonCmd.isEmpty()) json += ", \"python\":\"" + pythonCmd + "\""; - QString misraFile = mSettings->value(SETTINGS_MISRA_FILE).toString(); - if (addon == "misra" && !misraFile.isEmpty()) { - QString arg; - if (misraFile.endsWith(".pdf", Qt::CaseInsensitive)) - arg = "--misra-pdf=" + misraFile; - else - arg = "--rule-texts=" + misraFile; - json += ", \"args\":[\"" + arg + "\"]"; - } json += " }"; - result.addons.push_back(json.toStdString()); + result.addons.emplace(json.toStdString()); } if (isCppcheckPremium()) { @@ -1075,7 +1101,7 @@ void MainWindow::programSettings() { - SettingsDialog dialog(mApplications, mTranslation, this); + SettingsDialog dialog(mApplications, mTranslation, isCppcheckPremium(), this); if (dialog.exec() == QDialog::Accepted) { dialog.saveSettingValues(); mSettings->sync(); @@ -1879,6 +1905,79 @@ mProjectFile->write(); } +static int getVersion(const QString& nameWithVersion) { + int ret = 0; + int v = 0; + int dot = 0; + for (const auto c: nameWithVersion) { + if (c == '\n' || c == '\r') + break; + else if (c == ' ') { + if (ret > 0 && dot == 1 && nameWithVersion.endsWith(" dev")) + return ret * 1000000 + v * 1000 + 500; + dot = ret = v = 0; + } + else if (c == '.') { + ++dot; + ret = ret * 1000 + v; + v = 0; + } else if (c >= '0' && c <= '9') + v = v * 10 + (c.toLatin1() - '0'); + } + ret = ret * 1000 + v; + while (dot < 2) { + ++dot; + ret *= 1000; + } + return ret; +} + +void MainWindow::replyFinished(QNetworkReply *reply) { + reply->deleteLater(); + if (reply->error()) { + mUI->mLayoutInformation->deleteLater(); + qDebug() << "Response: ERROR"; + return; + } + const QString str = reply->readAll(); + qDebug() << "Response: " << str; + if (reply->url().fileName() == "version.txt") { + QString nameWithVersion = QString("Cppcheck %1").arg(CppCheck::version()); + if (!mCppcheckCfgProductName.isEmpty()) + nameWithVersion = mCppcheckCfgProductName; + const int appVersion = getVersion(nameWithVersion); + const int latestVersion = getVersion(str.trimmed()); + if (appVersion < latestVersion) { + if (mSettings->value(SETTINGS_CHECK_VERSION, 0).toInt() != latestVersion) { + QString install; + if (isCppcheckPremium()) { +#ifdef Q_OS_WIN + const QString url("https://cppchecksolutions.com/cppcheck-premium-installation"); +#else + const QString url("https://cppchecksolutions.com/cppcheck-premium-linux-installation"); +#endif + install = "<a href=\"" + url + "\">" + tr("Install") + "</a>"; + } + mUI->mButtonHideInformation->setVisible(true); + mUI->mLabelInformation->setVisible(true); + mUI->mLabelInformation->setText(tr("New version available: %1. %2").arg(str.trimmed()).arg(install)); + } + } + } + if (!mUI->mLabelInformation->isVisible()) { + mUI->mLayoutInformation->deleteLater(); + } +} + +void MainWindow::hideInformation() { + int version = getVersion(mUI->mLabelInformation->text()); + mSettings->setValue(SETTINGS_CHECK_VERSION, version); + mUI->mLabelInformation->setVisible(false); + mUI->mButtonHideInformation->setVisible(false); + mUI->mLayoutInformation->deleteLater(); +} + bool MainWindow::isCppcheckPremium() const { return mCppcheckCfgProductName.startsWith("Cppcheck Premium "); } + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/gui/mainwindow.h new/cppcheck-2.9.3/gui/mainwindow.h --- old/cppcheck-2.9/gui/mainwindow.h 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/gui/mainwindow.h 2022-11-20 21:13:35.000000000 +0100 @@ -40,6 +40,8 @@ class ImportProject; class QCloseEvent; class QObject; +class QNetworkAccessManager; +class QNetworkReply; namespace Ui { class MainWindow; } @@ -228,6 +230,10 @@ /** Suppress error ids */ void suppressIds(QStringList ids); +private slots: + void replyFinished(QNetworkReply *reply); + + void hideInformation(); private: bool isCppcheckPremium() const; @@ -465,6 +471,8 @@ QString mCppcheckCfgAbout; QString mCppcheckCfgProductName; + + QNetworkAccessManager *mNetworkAccessManager = nullptr; }; /// @} #endif // MAINWINDOW_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/gui/mainwindow.ui new/cppcheck-2.9.3/gui/mainwindow.ui --- old/cppcheck-2.9/gui/mainwindow.ui 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/gui/mainwindow.ui 2022-11-20 21:13:35.000000000 +0100 @@ -50,9 +50,71 @@ <height>16777215</height> </size> </property> - <layout class="QHBoxLayout" name="horizontalLayout"> + <layout class="QVBoxLayout" name="verticalLayout"> <item> - <widget class="ResultsView" name="mResults" native="true"/> + <widget class="ResultsView" name="mResults" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="mLayoutInformation"> + <property name="sizeConstraint"> + <enum>QLayout::SetDefaultConstraint</enum> + </property> + <item> + <widget class="QLabel" name="mLabelInformation"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>25</height> + </size> + </property> + <property name="text"> + <string>Checking for updates</string> + </property> + <property name="textFormat"> + <enum>Qt::RichText</enum> + </property> + <property name="openExternalLinks"> + <bool>true</bool> + </property> + <property name="textInteractionFlags"> + <set>Qt::TextBrowserInteraction</set> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="mButtonHideInformation"> + <property name="text"> + <string>Hide</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> </item> </layout> </widget> @@ -62,7 +124,7 @@ <x>0</x> <y>0</y> <width>640</width> - <height>28</height> + <height>30</height> </rect> </property> <widget class="QMenu" name="mMenuFile"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/gui/projectfile.ui new/cppcheck-2.9.3/gui/projectfile.ui --- old/cppcheck-2.9/gui/projectfile.ui 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/gui/projectfile.ui 2022-11-20 21:13:35.000000000 +0100 @@ -779,7 +779,7 @@ <item> <widget class="QGroupBox" name="groupBox_12"> <property name="title"> - <string>Coding standards</string> + <string>Coding standards (Premium)</string> </property> <layout class="QVBoxLayout" name="verticalLayout_20"> <item> @@ -790,32 +790,14 @@ </widget> </item> <item> - <layout class="QHBoxLayout" name="mLayoutMisraRuleTexts"> - <item> - <widget class="QLabel" name="mLabelMisraFile"> - <property name="text"> - <string>MISRA rule texts</string> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="mEditMisraFile"> - <property name="toolTip"> - <string><html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html></string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="mBtnBrowseMisraFile"> - <property name="text"> - <string>...</string> - </property> - </widget> - </item> - </layout> + <widget class="QCheckBox" name="mMisraCpp2008"> + <property name="text"> + <string>Misra C++ 2008</string> + </property> + </widget> </item> <item> - <widget class="QCheckBox" name="mPremiumCertC"> + <widget class="QCheckBox" name="mCertC2016"> <property name="text"> <string>Cert C</string> </property> @@ -836,9 +818,9 @@ </layout> </item> <item> - <widget class="QCheckBox" name="mMisraCpp2008"> + <widget class="QCheckBox" name="mCertCpp2016"> <property name="text"> - <string>Misra C++ 2008</string> + <string>Cert C++</string> </property> </widget> </item> @@ -855,7 +837,7 @@ <item> <widget class="QGroupBox" name="mGroupboxBughunting"> <property name="title"> - <string>Bug hunting</string> + <string>Bug hunting (Premium)</string> </property> <layout class="QVBoxLayout" name="verticalLayout_21"> <item> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/gui/projectfiledialog.cpp new/cppcheck-2.9.3/gui/projectfiledialog.cpp --- old/cppcheck-2.9/gui/projectfiledialog.cpp 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/gui/projectfiledialog.cpp 2022-11-20 21:13:35.000000000 +0100 @@ -43,6 +43,7 @@ static const char ADDON_MISRA[] = "misra"; static const char CODING_STANDARD_MISRA_CPP_2008[] = "misra-cpp-2008"; static const char CODING_STANDARD_CERT_C[] = "cert-c-2016"; +static const char CODING_STANDARD_CERT_CPP[] = "cert-cpp-2016"; static const char CODING_STANDARD_AUTOSAR[] = "autosar"; class QModelIndex; @@ -224,7 +225,6 @@ connect(mUI->mBtnAddSuppression, &QPushButton::clicked, this, &ProjectFileDialog::addSuppression); connect(mUI->mBtnRemoveSuppression, &QPushButton::clicked, this, &ProjectFileDialog::removeSuppression); connect(mUI->mListSuppressions, &QListWidget::doubleClicked, this, &ProjectFileDialog::editSuppression); - connect(mUI->mBtnBrowseMisraFile, &QPushButton::clicked, this, &ProjectFileDialog::browseMisraFile); connect(mUI->mChkAllVsConfigs, &QCheckBox::clicked, this, &ProjectFileDialog::checkAllVSConfigs); loadFromProjectFile(projectFile); } @@ -349,35 +349,30 @@ const QString dataDir = getDataDir(); updateAddonCheckBox(mUI->mAddonThreadSafety, projectFile, dataDir, "threadsafety"); updateAddonCheckBox(mUI->mAddonY2038, projectFile, dataDir, "y2038"); - updateAddonCheckBox(mUI->mMisraC2012, projectFile, dataDir, ADDON_MISRA); - const QString &misraFile = settings.value(SETTINGS_MISRA_FILE, QString()).toString(); - mUI->mEditMisraFile->setText(misraFile); - if (mPremium) { - mUI->mLabelMisraFile->setVisible(false); - mUI->mEditMisraFile->setVisible(false); - mUI->mBtnBrowseMisraFile->setVisible(false); - } else if (!mUI->mMisraC2012->isEnabled()) { - mUI->mEditMisraFile->setEnabled(false); - mUI->mBtnBrowseMisraFile->setEnabled(false); - } - - mUI->mPremiumCertC->setChecked(projectFile->getCodingStandards().contains(CODING_STANDARD_CERT_C)); - mUI->mMisraCpp2008->setChecked(projectFile->getCodingStandards().contains(CODING_STANDARD_MISRA_CPP_2008)); - mUI->mAutosar->setChecked(projectFile->getCodingStandards().contains(CODING_STANDARD_AUTOSAR)); + if (mPremium) + updateAddonCheckBox(mUI->mMisraC2012, projectFile, dataDir, ADDON_MISRA); + else + mUI->mMisraC2012->setChecked(false); + mUI->mCertC2016->setChecked(mPremium && projectFile->getCodingStandards().contains(CODING_STANDARD_CERT_C)); + mUI->mCertCpp2016->setChecked(mPremium && projectFile->getCodingStandards().contains(CODING_STANDARD_CERT_CPP)); + mUI->mMisraCpp2008->setChecked(mPremium && projectFile->getCodingStandards().contains(CODING_STANDARD_MISRA_CPP_2008)); + mUI->mAutosar->setChecked(mPremium && projectFile->getCodingStandards().contains(CODING_STANDARD_AUTOSAR)); if (projectFile->getCertIntPrecision() <= 0) mUI->mEditCertIntPrecision->setText(QString()); else mUI->mEditCertIntPrecision->setText(QString::number(projectFile->getCertIntPrecision())); - mUI->mPremiumCertC->setVisible(mPremium); - mUI->mMisraCpp2008->setVisible(mPremium); - mUI->mAutosar->setVisible(mPremium); + mUI->mMisraC2012->setEnabled(mPremium); + mUI->mMisraCpp2008->setEnabled(mPremium); + mUI->mCertC2016->setEnabled(mPremium); + mUI->mCertCpp2016->setEnabled(mPremium); + mUI->mAutosar->setEnabled(mPremium); mUI->mLabelCertIntPrecision->setVisible(mPremium); mUI->mEditCertIntPrecision->setVisible(mPremium); - mUI->mBughunting->setChecked(projectFile->getBughunting()); - mUI->mGroupboxBughunting->setVisible(mPremium); + mUI->mBughunting->setChecked(mPremium && projectFile->getBughunting()); + mUI->mBughunting->setEnabled(mPremium); mUI->mToolClangAnalyzer->setChecked(projectFile->getClangAnalyzer()); mUI->mToolClangTidy->setChecked(projectFile->getClangTidy()); @@ -444,8 +439,10 @@ addons << ADDON_MISRA; projectFile->setAddons(addons); QStringList codingStandards; - if (mUI->mPremiumCertC->isChecked()) + if (mUI->mCertC2016->isChecked()) codingStandards << CODING_STANDARD_CERT_C; + if (mUI->mCertCpp2016->isChecked()) + codingStandards << CODING_STANDARD_CERT_CPP; if (mUI->mMisraCpp2008->isChecked()) codingStandards << CODING_STANDARD_MISRA_CPP_2008; if (mUI->mAutosar->isChecked()) @@ -902,20 +899,3 @@ } return -1; } - -void ProjectFileDialog::browseMisraFile() -{ - const QString fileName = QFileDialog::getOpenFileName(this, - tr("Select MISRA rule texts file"), - QDir::homePath(), - tr("MISRA rule texts file (%1)").arg("*.txt")); - if (!fileName.isEmpty()) { - QSettings settings; - mUI->mEditMisraFile->setText(fileName); - settings.setValue(SETTINGS_MISRA_FILE, fileName); - - mUI->mMisraC2012->setText("MISRA C 2012"); - mUI->mMisraC2012->setEnabled(true); - updateAddonCheckBox(mUI->mMisraC2012, nullptr, getDataDir(), ADDON_MISRA); - } -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/gui/projectfiledialog.h new/cppcheck-2.9.3/gui/projectfiledialog.h --- old/cppcheck-2.9/gui/projectfiledialog.h 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/gui/projectfiledialog.h 2022-11-20 21:13:35.000000000 +0100 @@ -268,11 +268,6 @@ void editSuppression(const QModelIndex &index); /** - * @brief Browse for misra file - */ - void browseMisraFile(); - - /** * @brief Check for all VS configurations */ void checkAllVSConfigs(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/gui/settings.ui new/cppcheck-2.9.3/gui/settings.ui --- old/cppcheck-2.9/gui/settings.ui 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/gui/settings.ui 2022-11-20 21:13:35.000000000 +0100 @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>589</width> - <height>346</height> + <width>627</width> + <height>411</height> </rect> </property> <property name="windowTitle"> @@ -158,6 +158,13 @@ </widget> </item> <item> + <widget class="QCheckBox" name="mCheckForUpdates"> + <property name="text"> + <string>Check for updates</string> + </property> + </widget> + </item> + <item> <spacer name="verticalSpacer_2"> <property name="orientation"> <enum>Qt::Vertical</enum> @@ -293,54 +300,13 @@ <string>Python binary (leave this empty to use python in the PATH)</string> </property> <layout class="QVBoxLayout" name="verticalLayout_13"> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QLineEdit" name="mEditPythonPath"/> - </item> - <item> - <widget class="QPushButton" name="mBtnBrowsePythonPath"> - <property name="text"> - <string>...</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="mPythonPathWarning"> - <property name="text"> - <string></string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox_4"> - <property name="title"> - <string>MISRA addon</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout_7"> <item> - <layout class="QHBoxLayout" name="horizontalLayout_4"> + <layout class="QHBoxLayout" name="horizontalLayout"> <item> - <widget class="QLabel" name="label_4"> - <property name="text"> - <string>MISRA rule texts file</string> - </property> - </widget> + <widget class="QLineEdit" name="mEditPythonPath"/> </item> <item> - <widget class="QLineEdit" name="mEditMisraFile"> - <property name="toolTip"> - <string><html><head/><body><p>Copy/paste the text from Appendix A &quot;Summary of guidelines&quot; from the MISRA C 2012 pdf to a text file.</p></body></html></string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="mBtnBrowseMisraFile"> + <widget class="QPushButton" name="mBtnBrowsePythonPath"> <property name="text"> <string>...</string> </property> @@ -348,6 +314,13 @@ </item> </layout> </item> + <item> + <widget class="QLabel" name="mPythonPathWarning"> + <property name="text"> + <string/> + </property> + </widget> + </item> </layout> </widget> </item> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/gui/settingsdialog.cpp new/cppcheck-2.9.3/gui/settingsdialog.cpp --- old/cppcheck-2.9/gui/settingsdialog.cpp 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/gui/settingsdialog.cpp 2022-11-20 21:13:35.000000000 +0100 @@ -37,12 +37,14 @@ SettingsDialog::SettingsDialog(ApplicationList *list, TranslationHandler *translator, + bool premium, QWidget *parent) : QDialog(parent), mApplications(list), mTempApplications(new ApplicationList(this)), mTranslator(translator), - mUI(new Ui::Settings) + mUI(new Ui::Settings), + mPremium(premium) { mUI->setupUi(this); mUI->mPythonPathWarning->setStyleSheet("color: red"); @@ -60,9 +62,9 @@ mUI->mEnableInconclusive->setCheckState(boolToCheckState(settings.value(SETTINGS_INCONCLUSIVE_ERRORS, false).toBool())); mUI->mShowStatistics->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_STATISTICS, false).toBool())); mUI->mShowErrorId->setCheckState(boolToCheckState(settings.value(SETTINGS_SHOW_ERROR_ID, false).toBool())); + mUI->mCheckForUpdates->setCheckState(boolToCheckState(settings.value(SETTINGS_CHECK_FOR_UPDATES, false).toBool())); mUI->mEditPythonPath->setText(settings.value(SETTINGS_PYTHON_PATH, QString()).toString()); validateEditPythonPath(); - mUI->mEditMisraFile->setText(settings.value(SETTINGS_MISRA_FILE, QString()).toString()); #ifdef Q_OS_WIN //mUI->mTabClang->setVisible(true); @@ -92,7 +94,6 @@ this, SLOT(editApplication())); connect(mUI->mBtnBrowsePythonPath, &QPushButton::clicked, this, &SettingsDialog::browsePythonPath); - connect(mUI->mBtnBrowseMisraFile, &QPushButton::clicked, this, &SettingsDialog::browseMisraFile); connect(mUI->mBtnEditTheme, SIGNAL(clicked()), this, SLOT(editCodeEditorStyle())); connect(mUI->mThemeSystem, SIGNAL(released()), this, SLOT(setCodeEditorStyleDefault())); connect(mUI->mThemeDark, SIGNAL(released()), this, SLOT(setCodeEditorStyleDefault())); @@ -182,8 +183,8 @@ saveCheckboxValue(&settings, mUI->mEnableInconclusive, SETTINGS_INCONCLUSIVE_ERRORS); saveCheckboxValue(&settings, mUI->mShowStatistics, SETTINGS_SHOW_STATISTICS); saveCheckboxValue(&settings, mUI->mShowErrorId, SETTINGS_SHOW_ERROR_ID); + saveCheckboxValue(&settings, mUI->mCheckForUpdates, SETTINGS_CHECK_FOR_UPDATES); settings.setValue(SETTINGS_PYTHON_PATH, mUI->mEditPythonPath->text()); - settings.setValue(SETTINGS_MISRA_FILE, mUI->mEditMisraFile->text()); #ifdef Q_OS_WIN settings.setValue(SETTINGS_CLANG_PATH, mUI->mEditClangPath->text()); @@ -349,13 +350,6 @@ mUI->mEditPythonPath->setText(fileName); } -void SettingsDialog::browseMisraFile() -{ - const QString fileName = QFileDialog::getOpenFileName(this, tr("Select MISRA File"), QDir::homePath(), "Misra File (*.pdf *.txt)"); - if (!fileName.isEmpty()) - mUI->mEditMisraFile->setText(fileName); -} - // Slot to set default light style void SettingsDialog::setCodeEditorStyleDefault() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/gui/settingsdialog.h new/cppcheck-2.9.3/gui/settingsdialog.h --- old/cppcheck-2.9/gui/settingsdialog.h 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/gui/settingsdialog.h 2022-11-20 21:13:35.000000000 +0100 @@ -45,6 +45,7 @@ public: SettingsDialog(ApplicationList *list, TranslationHandler *translator, + bool premium, QWidget *parent = nullptr); SettingsDialog(const SettingsDialog &) = delete; ~SettingsDialog() override; @@ -141,11 +142,6 @@ void browseClangPath(); /** - * @brief Browse for MISRA file - */ - void browseMisraFile(); - - /** * @brief Set Code Editor Style to Default */ void setCodeEditorStyleDefault(); @@ -238,6 +234,8 @@ void manageStyleControls(); static const int mLangCodeRole = Qt::UserRole; + + bool mPremium; }; /// @} #endif // SETTINGSDIALOG_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/lib/analyzerinfo.cpp new/cppcheck-2.9.3/lib/analyzerinfo.cpp --- old/cppcheck-2.9/lib/analyzerinfo.cpp 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/lib/analyzerinfo.cpp 2022-11-20 21:13:35.000000000 +0100 @@ -120,7 +120,7 @@ const std::string::size_type pos = sourcefile.rfind('/'); std::string filename; - if (pos != std::string::npos) + if (pos == std::string::npos) filename = sourcefile; else filename = sourcefile.substr(pos + 1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/lib/importproject.cpp new/cppcheck-2.9.3/lib/importproject.cpp --- old/cppcheck-2.9/lib/importproject.cpp 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/lib/importproject.cpp 2022-11-20 21:13:35.000000000 +0100 @@ -1190,8 +1190,10 @@ guiProject.analyzeAllVsConfigs = node->GetText(); else if (strcmp(node->Name(), CppcheckXml::Parser) == 0) temp.clang = true; - else if (strcmp(node->Name(), CppcheckXml::AddonsElementName) == 0) - temp.addons = readXmlStringList(node, emptyString, CppcheckXml::AddonElementName, nullptr); + else if (strcmp(node->Name(), CppcheckXml::AddonsElementName) == 0) { + const auto& addons = readXmlStringList(node, emptyString, CppcheckXml::AddonElementName, nullptr); + temp.addons.insert(addons.cbegin(), addons.cend()); + } else if (strcmp(node->Name(), CppcheckXml::TagsElementName) == 0) node->Attribute(CppcheckXml::TagElementName); // FIXME: Write some warning else if (strcmp(node->Name(), CppcheckXml::ToolsElementName) == 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/lib/settings.cpp new/cppcheck-2.9.3/lib/settings.cpp --- old/cppcheck-2.9/lib/settings.cpp 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/lib/settings.cpp 2022-11-20 21:13:35.000000000 +0100 @@ -97,9 +97,9 @@ for (const picojson::value &v : obj["addons"].get<picojson::array>()) { const std::string &s = v.get<std::string>(); if (!Path::isAbsolute(s)) - addons.push_back(Path::getPathFromFilename(fileName) + s); + addons.emplace(Path::getPathFromFilename(fileName) + s); else - addons.push_back(s); + addons.emplace(s); } } if (obj.count("suppressions") && obj["suppressions"].is<picojson::array>()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/lib/settings.h new/cppcheck-2.9.3/lib/settings.h --- old/cppcheck-2.9/lib/settings.h 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/lib/settings.h 2022-11-20 21:13:35.000000000 +0100 @@ -37,6 +37,7 @@ #include <set> #include <string> #include <vector> +#include <unordered_set> namespace ValueFlow { class Value; @@ -99,7 +100,7 @@ void loadCppcheckCfg(); /** @brief addons, either filename of python/json file or json data */ - std::list<std::string> addons; + std::unordered_set<std::string> addons; /** @brief Path to the python interpreter to be used to run addons. */ std::string addonPython; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/lib/symboldatabase.cpp new/cppcheck-2.9.3/lib/symboldatabase.cpp --- old/cppcheck-2.9/lib/symboldatabase.cpp 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/lib/symboldatabase.cpp 2022-11-20 21:13:35.000000000 +0100 @@ -6181,7 +6181,17 @@ if (parent->str() == "&" && !parent->astOperand2()) { ValueType vt(valuetype); vt.reference = Reference::None; //Given int& x; the type of &x is int* not int&* - vt.pointer += 1U; + bool isArrayToPointerDecay = false; + for (const Token* child = parent->astOperand1(); child;) { + if (Token::Match(child, ".|::")) + child = child->astOperand2(); + else { + isArrayToPointerDecay = child->variable() && child->variable()->isArray(); + break; + } + } + if (!isArrayToPointerDecay) + vt.pointer += 1U; setValueType(parent, vt); return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/lib/tokenize.cpp new/cppcheck-2.9.3/lib/tokenize.cpp --- old/cppcheck-2.9/lib/tokenize.cpp 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/lib/tokenize.cpp 2022-11-20 21:13:35.000000000 +0100 @@ -5255,6 +5255,10 @@ else if (tok->tokType() == Token::eLogicalOp) out << " isLogicalOp=\"true\""; } + if (tok->isCast()) + out << " isCast=\"true\""; + if (tok->isExternC()) + out << " externLang=\"C\""; if (tok->isExpandedMacro()) out << " isExpandedMacro=\"true\""; if (tok->isRemovedVoidParameter()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/test/testanalyzerinformation.cpp new/cppcheck-2.9.3/test/testanalyzerinformation.cpp --- old/cppcheck-2.9/test/testanalyzerinformation.cpp 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/test/testanalyzerinformation.cpp 2022-11-20 21:13:35.000000000 +0100 @@ -38,6 +38,8 @@ ASSERT_EQUALS("file1.a4", getAnalyzerInfoFileFromFilesTxt(f1, "file1.c", "")); std::istringstream f2(filesTxt); ASSERT_EQUALS("file1.a4", getAnalyzerInfoFileFromFilesTxt(f2, "./file1.c", "")); + ASSERT_EQUALS("builddir/file1.c.analyzerinfo", AnalyzerInformation::getAnalyzerInfoFile("builddir", "file1.c", "")); + ASSERT_EQUALS("builddir/file1.c.analyzerinfo", AnalyzerInformation::getAnalyzerInfoFile("builddir", "some/path/file1.c", "")); } }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/test/testsymboldatabase.cpp new/cppcheck-2.9.3/test/testsymboldatabase.cpp --- old/cppcheck-2.9/test/testsymboldatabase.cpp 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/test/testsymboldatabase.cpp 2022-11-20 21:13:35.000000000 +0100 @@ -7553,6 +7553,8 @@ ASSERT_EQUALS("signed int", typeOf("int x[10]; a = x[0] + 1;", "+")); ASSERT_EQUALS("", typeOf("a = x[\"hello\"];", "[", "test.cpp")); ASSERT_EQUALS("const char", typeOf("a = x[\"hello\"];", "[", "test.c")); + ASSERT_EQUALS("signed int *", typeOf("int x[10]; a = &x;", "&")); + ASSERT_EQUALS("signed int *", typeOf("int x[10]; a = &x[1];", "&")); // cast.. ASSERT_EQUALS("void *", typeOf("a = (void *)0;", "(")); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/win_installer/cppcheck.wxs new/cppcheck-2.9.3/win_installer/cppcheck.wxs --- old/cppcheck-2.9/win_installer/cppcheck.wxs 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/win_installer/cppcheck.wxs 2022-11-20 21:13:35.000000000 +0100 @@ -45,6 +45,9 @@ <?if $(var.Platform) = x64 ?> <File Id='Qt5Chartsdll' Name='Qt5Charts.dll' Source='$(var.QtDllDir)\Qt5Charts.dll' /> <?endif?> + <File Id='Qt5Network.dll' Name='Qt5Network.dll' DiskId='1' Source='$(var.QtDllDir)\Qt5Network.dll' /> + <File Id='libcrypto.dll' Name='libcrypto-1_1-x64.dll' DiskId='1' Source='$(var.QtDllDir)\libcrypto-1_1-x64.dll' /> + <File Id='libssl.dll' Name='libssl-1_1-x64.dll' DiskId='1' Source='$(var.QtDllDir)\libssl-1_1-x64.dll' /> </Component> <Directory Id='QtPlatformsFolder' Name='platforms'> <Component Id='QtPlatforms' DiskId='1' Guid='$(var.qtplatformsGUID)'> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.9/win_installer/productInfo.wxi new/cppcheck-2.9.3/win_installer/productInfo.wxi --- old/cppcheck-2.9/win_installer/productInfo.wxi 2022-08-28 14:43:18.000000000 +0200 +++ new/cppcheck-2.9.3/win_installer/productInfo.wxi 2022-11-20 21:13:35.000000000 +0100 @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Include> - <?define ProductName = "Cppcheck $(var.Platform) 2.9 dev" ?> + <?define ProductName = "Cppcheck $(var.Platform) 2.9.1" ?> <?define ProductNameShort = "Cppcheck" ?> - <?define ProductVersion = "2.9" ?> + <?define ProductVersion = "2.9.1" ?> <?define ProductManufacturer = "The Cppcheck team" ?> <?define ProductDescription = "Cppcheck is a tool for static analysis of C/C++ code" ?>