use C++ casts

This commit is contained in:
Robin Müller 2022-02-02 12:13:42 +01:00
parent 41614303d7
commit 3a65c0db91
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ ReturnValue_t I2cComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData, s
return result; return result;
} }
if (write(fd, sendData, sendLen) != (int)sendLen) { if (write(fd, sendData, sendLen) != static_cast<int>(sendLen)) {
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "I2cComIF::sendMessage: Failed to send data to I2C " sif::error << "I2cComIF::sendMessage: Failed to send data to I2C "
"device with error code " "device with error code "

View File

@ -312,7 +312,7 @@ ReturnValue_t UartComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData,
fd = uartDeviceMapIter->second.fileDescriptor; fd = uartDeviceMapIter->second.fileDescriptor;
if (write(fd, sendData, sendLen) != (int)sendLen) { if (write(fd, sendData, sendLen) != static_cast<int>(sendLen)) {
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "UartComIF::sendMessage: Failed to send data with error code " << errno sif::error << "UartComIF::sendMessage: Failed to send data with error code " << errno
<< ": Error description: " << strerror(errno) << std::endl; << ": Error description: " << strerror(errno) << std::endl;