Suppress a bogus coverity warning

This commit is contained in:
vitaut
2015-10-21 08:30:10 -07:00
parent 13e0e38d99
commit ab25cd2c8b
3 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -326,11 +326,13 @@ TEST(FileTest, Dup) {
EXPECT_EQ(FILE_CONTENT, read(copy, std::strlen(FILE_CONTENT)));
}
#ifndef __COVERITY__
TEST(FileTest, DupError) {
volatile int value = -1;
int value = -1;
EXPECT_SYSTEM_ERROR_NOASSERT(File::dup(value),
EBADF, "cannot duplicate file descriptor -1");
}
#endif
TEST(FileTest, Dup2) {
File f = open_file();