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
+3 -3
View File
@@ -30,9 +30,9 @@
// private method to read stream with timeout
int Stream::timedRead()
{
int c;
_startMillis = millis();
do {
int c;
c = read();
if(c >= 0) {
return c;
@@ -45,9 +45,9 @@ int Stream::timedRead()
// private method to peek stream with timeout
int Stream::timedPeek()
{
int c;
_startMillis = millis();
do {
int c;
c = peek();
if(c >= 0) {
return c;
@@ -61,8 +61,8 @@ int Stream::timedPeek()
// discards non-numeric characters
int Stream::peekNextDigit()
{
int c;
while(1) {
int c;
c = timedPeek();
if(c < 0) {
return c; // timeout