diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-11-09 00:40:30 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-11-09 00:40:30 +0300 |
commit | 27840753979b35ceaf86570cc8a1e4eb614d1bc6 (patch) | |
tree | 6697ac3660e9b209fa554e02286eb8de2de61783 | |
parent | ef70ae2a82e78a0662c22bf29e2d1f9a03f35703 (diff) |
Fixes for static analysis
-rw-r--r-- | src/Accelerometers/Accelerometers.cpp | 2 | ||||
-rw-r--r-- | src/GCodes/GCodeException.h | 12 | ||||
-rw-r--r-- | src/bossa/Device.h | 4 | ||||
-rw-r--r-- | src/bossa/Flasher.h | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/Accelerometers/Accelerometers.cpp b/src/Accelerometers/Accelerometers.cpp index 7548ae5a..949937b4 100644 --- a/src/Accelerometers/Accelerometers.cpp +++ b/src/Accelerometers/Accelerometers.cpp @@ -605,7 +605,7 @@ void Accelerometers::ProcessReceivedData(CanAddress src, const CanMessageAcceler if (msg.lastPacket) { String<StringLength50> temp; - temp.printf("Rate %u, overflows %u\n", msg.actualSampleRate, numRemoteOverflows); + temp.printf("Rate %u, overflows %u\n", (unsigned int)msg.actualSampleRate, numRemoteOverflows); f->Write(temp.c_str()); f->Truncate(); // truncate the file in case we didn't write all the preallocated space f->Close(); diff --git a/src/GCodes/GCodeException.h b/src/GCodes/GCodeException.h index a1dd0f4d..c82f4074 100644 --- a/src/GCodes/GCodeException.h +++ b/src/GCodes/GCodeException.h @@ -19,21 +19,21 @@ namespace StackUsage class GCodeException { public: - explicit GCodeException(const char *msg) noexcept: line(-1), column(-1), message(msg), haveStringParam(false) { } + explicit GCodeException(const char *_ecv_array msg) noexcept: line(-1), column(-1), message(msg), haveStringParam(false) { } - GCodeException(int lin, int col, const char *msg) noexcept : line(lin), column(col), message(msg), haveStringParam(false) { } + GCodeException(int lin, int col, const char *_ecv_array msg) noexcept : line(lin), column(col), message(msg), haveStringParam(false) { } - GCodeException(int lin, int col, const char *msg, const char *sparam) noexcept : line(lin), column(col), message(msg), haveStringParam(true) + GCodeException(int lin, int col, const char *_ecv_array msg, const char *_ecv_array sparam) noexcept : line(lin), column(col), message(msg), haveStringParam(true) { stringParam.copy(sparam); } - GCodeException(int lin, int col, const char *msg, uint32_t uparam) noexcept : line(lin), column(col), message(msg), haveStringParam(false) + GCodeException(int lin, int col, const char *_ecv_array msg, uint32_t uparam) noexcept : line(lin), column(col), message(msg), haveStringParam(false) { param.u = uparam; } - GCodeException(int lin, int col, const char *msg, int32_t iparam) noexcept : line(lin), column(col), message(msg), haveStringParam(false) + GCodeException(int lin, int col, const char *_ecv_array msg, int32_t iparam) noexcept : line(lin), column(col), message(msg), haveStringParam(false) { param.i = iparam; } @@ -43,7 +43,7 @@ public: private: int line; int column; - const char *message; + const char *_ecv_array message; union { int32_t i; diff --git a/src/bossa/Device.h b/src/bossa/Device.h index 0dfc352a..06054576 100644 --- a/src/bossa/Device.h +++ b/src/bossa/Device.h @@ -81,9 +81,9 @@ public: void create() THROWS(GCodeException); - Family getFamily() noexcept { return _family; } + Family getFamily() const noexcept { return _family; } - BossaFlash *_ecv_from null getFlash() noexcept { return _flash; } + BossaFlash *_ecv_from null getFlash() const noexcept { return _flash; } void reset() THROWS(GCodeException); diff --git a/src/bossa/Flasher.h b/src/bossa/Flasher.h index 8a7955aa..2e5befae 100644 --- a/src/bossa/Flasher.h +++ b/src/bossa/Flasher.h @@ -52,7 +52,7 @@ public: class Flasher { public: - Flasher(Samba& samba, Device& device, FlasherObserver& observer) noexcept + Flasher(Samba& samba, Device& device, FlasherObserver &_ecv_from observer) noexcept : _samba(samba), _flash(device.getFlash()), _observer(observer), pageNum(0) {} virtual ~Flasher() {} @@ -65,7 +65,7 @@ public: private: Samba& _samba; BossaFlash *_ecv_from _flash; - FlasherObserver& _observer; + FlasherObserver &_ecv_from _observer; uint32_t pageNum; }; |