Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/checks.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ namespace CheckInstances
{
/** List of registered check classes. This is used by Cppcheck to run checks and generate documentation */
CPPCHECKLIB const std::list<Check *>& get();
};
}
Comment thread
danmar marked this conversation as resolved.

#endif // checksH
4 changes: 2 additions & 2 deletions lib/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ Settings::~Settings() = default;
Settings::Settings(const Settings&) = default;
Settings & Settings::operator=(const Settings &) = default;

Settings::Settings(Settings&&) noexcept = default;
Settings & Settings::operator=(Settings &&) noexcept = default;
Settings::Settings(Settings&&) CPPCHECK_NOEXCEPT = default;
Settings & Settings::operator=(Settings &&) CPPCHECK_NOEXCEPT = default;

std::string Settings::loadCppcheckCfg(Settings& settings, Suppressions& suppressions, bool debug)
{
Expand Down
14 changes: 12 additions & 2 deletions lib/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@
};


#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 9
// Hack to workaround GCC bug.
// Details: https://trac.cppcheck.net/ticket/14850
// seen on g++ before 10.x
#define CPPCHECK_NOEXCEPT
#else
#define CPPCHECK_NOEXCEPT noexcept
#endif


/**
* @brief This is just a container for general settings so that we don't need
* to pass individual values to functions or constructors now or in the
Expand All @@ -113,10 +123,10 @@
Settings(const Settings&);
Settings& operator=(const Settings&);

Settings(Settings&&) noexcept;
Settings& operator=(Settings&&) noexcept;
Settings(Settings&&) CPPCHECK_NOEXCEPT;
Comment thread
danmar marked this conversation as resolved.
Dismissed
Settings& operator=(Settings&&) CPPCHECK_NOEXCEPT;

Check warning

Code scanning / Cppcheck Premium

User-provided copy and move member functions of a class should have appropriate signatures. Move constructor must be noexcept and have only one argument which must be non-volatile Warning

User-provided copy and move member functions of a class should have appropriate signatures. Move constructor must be noexcept and have only one argument which must be non-volatile
static std::string loadCppcheckCfg(Settings& settings, Suppressions& suppressions, bool debug = false);

Check warning

Code scanning / Cppcheck Premium

Exception-unfriendly functions shall be noexcept Warning

Exception-unfriendly functions shall be noexcept

Check warning

Code scanning / Cppcheck Premium

User-provided copy and move member functions of a class should have appropriate signatures. Assignment operator must have lvalue ref-qualifier must not be virtual and have only one argument which must be non-volatile Warning

User-provided copy and move member functions of a class should have appropriate signatures. Assignment operator must have lvalue ref-qualifier must not be virtual and have only one argument which must be non-volatile

Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
static std::pair<std::string, std::string> getNameAndVersion(const std::string& productName);

Expand Down
Loading