mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
Check result of fread.
This commit is contained in:
parent
e62354a190
commit
ab35af53c5
@ -308,7 +308,8 @@ TEST(BufferedFileTest, OpenRetry) {
|
||||
fopen, "cannot open file test");
|
||||
#ifndef _WIN32
|
||||
char c = 0;
|
||||
fread(&c, 1, 1, f->get());
|
||||
if (fread(&c, 1, 1, f->get()) < 1)
|
||||
throw fmt::SystemError(errno, "fread failed");
|
||||
#endif
|
||||
delete f;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user