fixes warning for good

This commit is contained in:
Robin Müller 2022-02-03 11:13:26 +01:00
parent 527dba9a9d
commit 8f95b03e6a
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -67,7 +67,11 @@ ReturnValue_t UioMapper::getMapSize(size_t* size) {
#endif #endif
return HasReturnvaluesIF::RETURN_FAILED; return HasReturnvaluesIF::RETURN_FAILED;
} }
items = sscanf(hexstring, "%lx", size); uint32_t sizeTmp = 0;
items = sscanf(hexstring, "%x", &sizeTmp);
if(size != nullptr) {
*size = sizeTmp;
}
if (items != 1) { if (items != 1) {
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "UioMapper::getMapSize: Failed with error code " << errno << "to convert " sif::warning << "UioMapper::getMapSize: Failed with error code " << errno << "to convert "