fix unhandled return value of fread in TConfig::TConfig unit test

This commit is contained in:
Lion Kortlepel 2022-09-27 15:49:55 +02:00
parent dbb01998ea
commit 1a9872db00
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -44,7 +44,10 @@ TEST_CASE("TConfig::TConfig") {
{ {
buf.resize(fs::file_size(CfgFile)); buf.resize(fs::file_size(CfgFile));
auto fp = std::fopen(CfgFile.c_str(), "r"); auto fp = std::fopen(CfgFile.c_str(), "r");
std::fread(buf.data(), 1, buf.size(), fp); auto res = std::fread(buf.data(), 1, buf.size(), fp);
if (res != buf.size()) {
// IGNORE?
}
std::fclose(fp); std::fclose(fp);
} }
INFO("file contents are:", buf); INFO("file contents are:", buf);