From df38903fe958e4c58c2bcd91888b4df4ad8b8f2f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Apr 2022 17:16:25 +0200 Subject: [PATCH 1/3] some warning fixes for release build --- fsfw | 2 +- linux/boardtest/SpiTestClass.cpp | 2 +- linux/csp/CspComIF.cpp | 3 +- misc/eclipse/.cproject | 71 ++++++++++++-------------------- mission/devices/IMTQHandler.cpp | 19 +++++---- 5 files changed, 41 insertions(+), 56 deletions(-) diff --git a/fsfw b/fsfw index 28e93696..28166ee1 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 28e93696dfe95fdeb8465a2f59a3e578fdf0f1cb +Subproject commit 28166ee19ee0154dc1849ec0bbf1fef2cf71115d diff --git a/linux/boardtest/SpiTestClass.cpp b/linux/boardtest/SpiTestClass.cpp index ff721967..d9eb6b5a 100644 --- a/linux/boardtest/SpiTestClass.cpp +++ b/linux/boardtest/SpiTestClass.cpp @@ -408,7 +408,7 @@ void SpiTestClass::max1227RadSensorTest(int fd) { transfer(fd, gpioIds::CS_RAD_SENSOR); usleep(65); spiTransferStruct[0].len = 24; - std::memcpy(sendBuffer.data(), sendBuffer.data() + 1, 24); + std::memmove(sendBuffer.data(), sendBuffer.data() + 1, 24); transfer(fd, gpioIds::CS_RAD_SENSOR); int16_t tempRaw = ((recvBuffer[22] & 0x0f) << 8) | recvBuffer[23]; float temp = max1227::getTemperature(tempRaw); diff --git a/linux/csp/CspComIF.cpp b/linux/csp/CspComIF.cpp index fa372d4d..9f346405 100644 --- a/linux/csp/CspComIF.cpp +++ b/linux/csp/CspComIF.cpp @@ -141,11 +141,12 @@ ReturnValue_t CspComIF::cspTransfer(uint8_t cspAddress, uint8_t cspPort, const u int cmdLen, uint16_t querySize) { uint32_t timeout_ms = 1000; uint16_t bytesRead = 0; - int32_t expectedSize = (int32_t)querySize; + int32_t expectedSize = static_cast(querySize); vectorBufferIter iter = cspDeviceMap.find(cspAddress); if (iter == cspDeviceMap.end()) { sif::error << "CSP device with address " << cspAddress << " no found in" << " device map" << std::endl; + return RETURN_FAILED; } uint8_t* replyBuffer = iter->second.data(); diff --git a/misc/eclipse/.cproject b/misc/eclipse/.cproject index aa59f2da..6e4535c1 100644 --- a/misc/eclipse/.cproject +++ b/misc/eclipse/.cproject @@ -756,6 +756,7 @@ + @@ -818,8 +819,8 @@