last coverity fixes

This commit is contained in:
Robin Müller 2021-04-11 18:36:24 +02:00
parent 7b8928ef47
commit 6e6fb62b3c
6 changed files with 7 additions and 7 deletions

View File

@ -16,9 +16,9 @@ ReturnValue_t HealthDevice::performOperation(uint8_t opCode) {
CommandMessage command; CommandMessage command;
ReturnValue_t result = commandQueue->receiveMessage(&command); ReturnValue_t result = commandQueue->receiveMessage(&command);
if (result == HasReturnvaluesIF::RETURN_OK) { if (result == HasReturnvaluesIF::RETURN_OK) {
healthHelper.handleHealthCommand(&command); result = healthHelper.handleHealthCommand(&command);
} }
return HasReturnvaluesIF::RETURN_OK; return result;
} }
ReturnValue_t HealthDevice::initialize() { ReturnValue_t HealthDevice::initialize() {

View File

@ -96,7 +96,7 @@ ReturnValue_t HealthTable::iterate(HealthEntry *value, bool reset) {
mapIterator = healthMap.begin(); mapIterator = healthMap.begin();
} }
if (mapIterator == healthMap.end()) { if (mapIterator == healthMap.end()) {
result = HasReturnvaluesIF::RETURN_FAILED; return HasReturnvaluesIF::RETURN_FAILED;
} }
*value = *mapIterator; *value = *mapIterator;
mapIterator++; mapIterator++;

View File

@ -25,6 +25,6 @@ uint32_t TimeMessage::getCounterValue() {
return temp; return temp;
} }
size_t TimeMessage::getMinimumMessageSize() { size_t TimeMessage::getMinimumMessageSize() const {
return this->MAX_SIZE; return this->MAX_SIZE;
} }

View File

@ -11,7 +11,7 @@ protected:
* @brief This call always returns the same fixed size of the message. * @brief This call always returns the same fixed size of the message.
* @return Returns HEADER_SIZE + \c sizeof(timeval) + sizeof(uint32_t). * @return Returns HEADER_SIZE + \c sizeof(timeval) + sizeof(uint32_t).
*/ */
size_t getMinimumMessageSize(); size_t getMinimumMessageSize() const override;
public: public:
/** /**

View File

@ -21,7 +21,7 @@ TmTcMessage::TmTcMessage(store_address_t storeId) {
this->setStorageId(storeId); this->setStorageId(storeId);
} }
size_t TmTcMessage::getMinimumMessageSize() { size_t TmTcMessage::getMinimumMessageSize() const {
return this->HEADER_SIZE + sizeof(store_address_t); return this->HEADER_SIZE + sizeof(store_address_t);
} }

View File

@ -18,7 +18,7 @@ protected:
* @brief This call always returns the same fixed size of the message. * @brief This call always returns the same fixed size of the message.
* @return Returns HEADER_SIZE + @c sizeof(store_address_t). * @return Returns HEADER_SIZE + @c sizeof(store_address_t).
*/ */
size_t getMinimumMessageSize(); size_t getMinimumMessageSize() const override;
public: public:
/** /**
* @brief In the default constructor, only the message_size is set. * @brief In the default constructor, only the message_size is set.