mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 18:55:38 +08:00
Upgrade and cleanup cppcheck suppressions to version 1.76.1
Also renamed the suppressions file to the standard name. refs #831
This commit is contained in:
committed by
Mathew Sutcliffe
parent
cad1eb4952
commit
e82d06849c
32
cppcheck.supp
Normal file
32
cppcheck.supp
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
// cppcheck suppression file for swift.
|
||||||
|
//
|
||||||
|
// In order to suppress a false positive add a line using one of the following templates:
|
||||||
|
// [Explaining reason - comments]
|
||||||
|
// [error id]:[filename2]
|
||||||
|
// [error id]
|
||||||
|
|
||||||
|
// False positive caused by missing support for C++11 feature
|
||||||
|
unusedPrivateFunction:src/blackmisc/lockfree.h
|
||||||
|
|
||||||
|
// Ignore noExplicitConstructor for now.
|
||||||
|
noExplicitConstructor
|
||||||
|
|
||||||
|
// Ignore style issues in g2clib
|
||||||
|
variableScope:src/plugins/weatherdata/gfs/g2clib/*.c
|
||||||
|
|
||||||
|
// std::initializer_list should always be passed by value
|
||||||
|
passedByValue:src/blackmisc/input/actionhotkeylist.h
|
||||||
|
passedByValue:src/blackmisc/logcategorylist.h
|
||||||
|
|
||||||
|
// Shared pointers should be passed by value
|
||||||
|
passedByValue:src/blackmisc/lockfree.h
|
||||||
|
|
||||||
|
// False positive caused by cppcheck getting confused with preprocessor defines
|
||||||
|
ConfigurationNotChecked:src/xbus/libxplanemp/src/XObjReadWrite.cpp
|
||||||
|
|
||||||
|
// Passing std::function by value is acceptable
|
||||||
|
passedByValue:src/xbus/libxplanemp/src/ResourceManager.h
|
||||||
|
passedByValue:src/xbus/command.h
|
||||||
|
|
||||||
|
// Unique pointers should be passed by value
|
||||||
|
passedByValue:src/xbus/menus.h
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
// cppcheck suppression file for swift.
|
|
||||||
//
|
|
||||||
// In order to suppress a false positive add a line using one of the following templates:
|
|
||||||
// [Explaining reason - comments]
|
|
||||||
// [error id]:[filename2]
|
|
||||||
// [error id]
|
|
||||||
|
|
||||||
// Not sensible qualification errors
|
|
||||||
// unnecessaryQualification
|
|
||||||
// no longer needed as discussed in slack
|
|
||||||
|
|
||||||
// Optional is a special case, this member should not be initialized
|
|
||||||
uninitMemberVar:src/blackmisc/optional.h
|
|
||||||
|
|
||||||
// False positive caused by missing support for C++11 feature
|
|
||||||
unusedPrivateFunction:src/blackmisc/tuple_private.h
|
|
||||||
unusedPrivateFunction:src/blackmisc/blackmiscfreefunctions.h
|
|
||||||
unusedPrivateFunction:src/blackmisc/compare.h
|
|
||||||
unusedPrivateFunction:src/blackmisc/lockfree.h
|
|
||||||
|
|
||||||
unusedPrivateFunction:src/blackmisc/dictionary.h
|
|
||||||
|
|
||||||
// cppcheck shouldn’t assume operator* is commutative
|
|
||||||
duplicateExpression:tests/blackmisc/testvectormatrix.cpp
|
|
||||||
duplicateExpression:tests/blackmisc/testphysicalquantities.cpp
|
|
||||||
|
|
||||||
// Ignore intentional hiding
|
|
||||||
variableHidingEnum:src/blackmisc/statusmessage.h
|
|
||||||
|
|
||||||
// Ignore any preprocessor directives.
|
|
||||||
preprocessorErrorDirective
|
|
||||||
|
|
||||||
// Ignore noExplicitConstructor for now.
|
|
||||||
noExplicitConstructor
|
|
||||||
|
|
||||||
// Ignore style issues in g2clib
|
|
||||||
variableScope:src/plugins/weatherdata/gfs/g2clib/*.c
|
|
||||||
@@ -332,6 +332,7 @@ namespace BlackMisc
|
|||||||
class BLACKMISC_EXPORT CDataCacheRevision::Session
|
class BLACKMISC_EXPORT CDataCacheRevision::Session
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
Session(const QString &filename) : m_filename(filename) {}
|
Session(const QString &filename) : m_filename(filename) {}
|
||||||
void updateSession();
|
void updateSession();
|
||||||
const QUuid &uuid() const { return m_uuid; }
|
const QUuid &uuid() const { return m_uuid; }
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ namespace BlackMisc
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
QStringList getStackTrace()
|
QStringList getStackTrace()
|
||||||
{
|
{
|
||||||
return { "No stack trace on this platform" };
|
return { "No stack trace on this platform" };
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
namespace Private
|
namespace Private
|
||||||
{
|
{
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void failedVerify(const char *condition, const char *filename, int line, const char *context, const char *message)
|
void failedVerify(const char *condition, const char *filename, int line, const char *context, const char *message)
|
||||||
{
|
{
|
||||||
Q_UNUSED(condition);
|
Q_UNUSED(condition);
|
||||||
|
|||||||
Reference in New Issue
Block a user