Skip to content

Commit e5b1014

Browse files
committed
enh(MongoDB): fix unused variables in tests.
1 parent 558ae6e commit e5b1014

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

MongoDB/testsuite/src/BSONTest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ void BSONTest::testGetNonExistent()
10951095
// Test get throws NotFoundException
10961096
try
10971097
{
1098-
std::string value = doc->get<std::string>("nonexistent");
1098+
(void)doc->get<std::string>("nonexistent");
10991099
fail("Should have thrown NotFoundException");
11001100
}
11011101
catch (Poco::NotFoundException&)
@@ -1110,7 +1110,7 @@ void BSONTest::testGetNonExistent()
11101110
// Test getInteger throws NotFoundException
11111111
try
11121112
{
1113-
Poco::Int64 num = doc->getInteger("nonexistent");
1113+
(void)doc->getInteger("nonexistent");
11141114
fail("Should have thrown NotFoundException");
11151115
}
11161116
catch (Poco::NotFoundException&)
@@ -1129,7 +1129,7 @@ void BSONTest::testBadCast()
11291129
// Try to get string as number
11301130
try
11311131
{
1132-
Poco::Int32 num = doc->get<Poco::Int32>("string");
1132+
(void)doc->get<Poco::Int32>("string");
11331133
fail("Should have thrown BadCastException");
11341134
}
11351135
catch (Poco::BadCastException&)
@@ -1140,7 +1140,7 @@ void BSONTest::testBadCast()
11401140
// Try to get number as string
11411141
try
11421142
{
1143-
std::string str = doc->get<std::string>("number");
1143+
(void)doc->get<std::string>("number");
11441144
fail("Should have thrown BadCastException");
11451145
}
11461146
catch (Poco::BadCastException&)

0 commit comments

Comments
 (0)