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:
committed by
Thomas Mørch
parent
e2ac85afbb
commit
2d5404de97
@@ -127,13 +127,13 @@ void _serialReset()
|
||||
// function.
|
||||
bool _serialProcess()
|
||||
{
|
||||
char inch;
|
||||
unsigned char i;
|
||||
if (!_dev.available()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
while(_dev.available()) {
|
||||
char inch;
|
||||
inch = _dev.read();
|
||||
|
||||
switch(_recPhase) {
|
||||
@@ -239,7 +239,6 @@ bool transportSend(const uint8_t to, const void* data, const uint8_t len, const
|
||||
const char *datap = static_cast<char const *>(data);
|
||||
unsigned char i;
|
||||
unsigned char cs = 0;
|
||||
unsigned char del;
|
||||
|
||||
// This is how many times to try and transmit before failing.
|
||||
unsigned char timeout = 10;
|
||||
@@ -248,6 +247,7 @@ bool transportSend(const uint8_t to, const void* data, const uint8_t len, const
|
||||
// the last millisecond, then wait for a random time and check again.
|
||||
|
||||
while (_serialProcess()) {
|
||||
unsigned char del;
|
||||
del = rand() % 20;
|
||||
for (i = 0; i < del; i++) {
|
||||
delay(1);
|
||||
|
||||
Reference in New Issue
Block a user