mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-02 11:28:20 +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;
|
BufferedFile f;
|
||||||
#ifndef __COVERITY__
|
#ifndef __COVERITY__
|
||||||
// fileno on a null FILE pointer either crashes or returns an error.
|
// fileno on a null FILE pointer either crashes or returns an error.
|
||||||
|
// Disable Coverity because this is intentional.
|
||||||
EXPECT_DEATH_IF_SUPPORTED({
|
EXPECT_DEATH_IF_SUPPORTED({
|
||||||
try {
|
try {
|
||||||
f.fileno();
|
f.fileno();
|
||||||
@ -326,7 +327,8 @@ TEST(FileTest, Dup) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST(FileTest, DupError) {
|
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");
|
EBADF, "cannot duplicate file descriptor -1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user