diff --git a/src/fsfw/osal/host/TaskFactory.cpp b/src/fsfw/osal/host/TaskFactory.cpp index 0a27241b1..a10a2a922 100644 --- a/src/fsfw/osal/host/TaskFactory.cpp +++ b/src/fsfw/osal/host/TaskFactory.cpp @@ -50,6 +50,6 @@ void TaskFactory::printMissedDeadline() { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::warning << "TaskFactory::printMissedDeadline: " << name << std::endl; #else - sif::printWarning("TaskFactory::printMissedDeadline: %s\n", name); + sif::printWarning("TaskFactory::printMissedDeadline: %s\n", name.c_str()); #endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */ } diff --git a/src/fsfw_hal/linux/CommandExecutor.cpp b/src/fsfw_hal/linux/CommandExecutor.cpp index 27cf8aca8..1aab6df84 100644 --- a/src/fsfw_hal/linux/CommandExecutor.cpp +++ b/src/fsfw_hal/linux/CommandExecutor.cpp @@ -67,7 +67,7 @@ void CommandExecutor::printLastError(std::string funcName) const { sif::warning << funcName << " pclose failed with code " << lastError << ": " << strerror(lastError) << std::endl; #else - sif::printError("%s pclose failed with code %d: %s\n", funcName, lastError, + sif::printError("%s pclose failed with code %d: %s\n", funcName.c_str(), lastError, strerror(lastError)); #endif } @@ -119,7 +119,7 @@ ReturnValue_t CommandExecutor::check(bool& replyReceived) { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::info << currentCmd << " | " << readVec.data(); #else - sif::printInfo("%s | %s", currentCmd, readVec.data()); + sif::printInfo("%s | %s", currentCmd.c_str(), readVec.data()); #endif } if (ringBuffer != nullptr) { @@ -188,7 +188,7 @@ ReturnValue_t CommandExecutor::executeBlocking() { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::info << currentCmd << " | " << output; #else - sif::printInfo("%s | %s", currentCmd, output); + sif::printInfo("%s | %s", currentCmd.c_str(), output.c_str()); #endif } if (ringBuffer != nullptr) { diff --git a/unittests/datapoollocal/testDataSet.cpp b/unittests/datapoollocal/testDataSet.cpp index 4aa54c592..df6e0dc2b 100644 --- a/unittests/datapoollocal/testDataSet.cpp +++ b/unittests/datapoollocal/testDataSet.cpp @@ -108,7 +108,7 @@ TEST_CASE("DataSetTest", "[DataSetTest]") { CHECK(maxSize == sizeof(uint8_t) + sizeof(float) + sizeof(uint16_t) * 3); serSize = 0; /* Already reserve additional space for validity buffer, will be needed later */ - std::vector buffer(maxSize); + std::vector buffer(maxSize+1); uint8_t* buffPtr = buffer.data(); CHECK(localSet.serialize(&buffPtr, &serSize, maxSize, SerializeIF::Endianness::MACHINE) == returnvalue::OK); @@ -157,7 +157,7 @@ TEST_CASE("DataSetTest", "[DataSetTest]") { CHECK(maxSize == sizeof(uint8_t) + sizeof(uint16_t) * 3 + sizeof(float) + 1); serSize = 0; buffPtr = buffer.data(); - CHECK(localSet.serialize(&buffPtr, &serSize, maxSize, SerializeIF::Endianness::MACHINE) == + CHECK(localSet.serialize(&buffPtr, &serSize, buffer.size(), SerializeIF::Endianness::MACHINE) == returnvalue::OK); CHECK(rawUint8 == 232); std::memcpy(&rawFloat, buffer.data() + sizeof(uint8_t), sizeof(float)); diff --git a/unittests/datapoollocal/testLocalPoolManager.cpp b/unittests/datapoollocal/testLocalPoolManager.cpp index 91cd011df..0de1f201d 100644 --- a/unittests/datapoollocal/testLocalPoolManager.cpp +++ b/unittests/datapoollocal/testLocalPoolManager.cpp @@ -419,7 +419,7 @@ TEST_CASE("Local Pool Manager Tests", "[LocManTest]") { CHECK(poolOwner.changedVariableCallbackWasCalled(gpidToCheck, storeId) == true); CHECK(gpidToCheck == lpool::uint8VarGpid); - poolOwner.poolManager.printPoolEntry(lpool::uint8VarId); + //poolOwner.poolManager.printPoolEntry(lpool::uint8VarId); } /* we need to reset the subscription list because the pool owner diff --git a/unittests/hal/testFsMock.cpp b/unittests/hal/testFsMock.cpp index 8ed991088..2ebcd231b 100644 --- a/unittests/hal/testFsMock.cpp +++ b/unittests/hal/testFsMock.cpp @@ -9,9 +9,9 @@ TEST_CASE("Filesystem Mock", "[mocks]") { auto fsMock = FilesystemMock(); SECTION("Create File") { - FilesystemParams params(L"hello.txt"); + FilesystemParams params("hello.txt"); CHECK(fsMock.createFile(params) == returnvalue::OK); - auto iter = fsMock.fileMap.find(L"hello.txt"); + auto iter = fsMock.fileMap.find("hello.txt"); REQUIRE(iter != fsMock.fileMap.end()); FilesystemMock::FileInfo &stats = iter->second; CHECK(stats.fileSegQueue.empty()); @@ -20,10 +20,10 @@ TEST_CASE("Filesystem Mock", "[mocks]") { SECTION("Write to File") { std::string testData = "test data"; - FileOpParams params(L"hello.txt", testData.size()); + FileOpParams params("hello.txt", testData.size()); CHECK(fsMock.writeToFile(params, reinterpret_cast(testData.data())) == returnvalue::OK); - auto iter = fsMock.fileMap.find(L"hello.txt"); + auto iter = fsMock.fileMap.find("hello.txt"); REQUIRE(iter != fsMock.fileMap.end()); FilesystemMock::FileInfo &stats = iter->second; CHECK(not stats.fileSegQueue.empty()); @@ -37,10 +37,10 @@ TEST_CASE("Filesystem Mock", "[mocks]") { } SECTION("Create Directory") { - FilesystemParams params(L"hello"); + FilesystemParams params("hello"); CHECK(fsMock.createDirectory(params) == returnvalue::OK); REQUIRE(not fsMock.dirMap.empty()); - auto iter = fsMock.dirMap.find(L"hello"); + auto iter = fsMock.dirMap.find("hello"); REQUIRE(iter != fsMock.dirMap.end()); auto &dirInfo = iter->second; CHECK(dirInfo.createCallCount == 1);