CppCheck cleanup (#975)

* Add support for inline cppcheck suppressions
* Clean out all known cppcheck issues
* Terminate toll-gate on found cppcheck issues
This commit is contained in:
Patrick Fallberg
2017-11-07 20:37:36 +01:00
committed by Thomas Mørch
parent e2ac85afbb
commit 2d5404de97
23 changed files with 86 additions and 50 deletions
+5 -1
View File
@@ -41,6 +41,10 @@ class PinIO
{
public:
/** Create a PinIO object with no assigned pin. */
// Suppress warning about uninitialized variables because initializing them in an init function
// allows the compiler to optimize away the variables in case the class is only instantiated but
// never used.
// cppcheck-suppress uninitMemberVar
PinIO() : bit_(0), mask_(0XFF) {}
/** Constructor
* @param[in] pin Pin assigned to this object.
@@ -186,4 +190,4 @@ private:
volatile uint8_t* portReg_;
};
#endif // PinIO_h
/** @} */
/** @} */
@@ -179,7 +179,6 @@ void dumpAll(void)
//------------------------------------------------------------------------------
void fillNvRam(void)
{
uint8_t buf[8];
PgmPrint("Enter HEX value for all NV RAM locations (00-FF): ");
uint16_t v;
if (!hexRead(&v)) {
@@ -363,4 +362,4 @@ void loop(void)
} else {
PgmPrintln("Invalid option");
}
}
}