mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 00:21:13 +00:00
Try workaround for a bogus Coverity warning
This commit is contained in:
parent
a68ce59c74
commit
221dd0cb66
@ -168,6 +168,7 @@ TEST(BufferedFileTest, Fileno) {
|
||||
BufferedFile f;
|
||||
#ifndef __COVERITY__
|
||||
// fileno on a null FILE pointer either crashes or returns an error.
|
||||
// Disable Coverity because this is intentional.
|
||||
EXPECT_DEATH_IF_SUPPORTED({
|
||||
try {
|
||||
f.fileno();
|
||||
@ -326,7 +327,8 @@ TEST(FileTest, Dup) {
|
||||
}
|
||||
|
||||
TEST(FileTest, DupError) {
|
||||
EXPECT_SYSTEM_ERROR_NOASSERT(File::dup(-1),
|
||||
volatile int value = -1;
|
||||
EXPECT_SYSTEM_ERROR_NOASSERT(File::dup(value),
|
||||
EBADF, "cannot duplicate file descriptor -1");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user