Skip to content

Commit 330e75f

Browse files
committed
CXX-277 Eliminate unused variable
1 parent 214effd commit 330e75f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/mongo/client/examples/authTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ int main( int argc, const char **argv ) {
9393
// Shouldn't get here.
9494
cout << "Authentication with invalid password should have failed but didn't" << endl;
9595
return EXIT_FAILURE;
96-
} catch (const DBException& e) {
96+
} catch (const DBException&) {
9797
// expected
9898
}
9999
return EXIT_SUCCESS;

src/mongo/client/examples/clientTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ int main( int argc, const char **argv ) {
180180
// upsert
181181
try {
182182
conn.update( ns , BSONObjBuilder().append( "name" , "eliot2" ).obj() , after , UpdateOption_Upsert );
183-
} catch (OperationException& oe) {
183+
} catch (OperationException&) {
184184
// This upsert throws an OperationException because of a duplicate key error:
185185
// The upserted document has the same _id as one already in the collection
186186
}

src/mongo/client/examples/simple_client_demo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ int main(int argc, char* argv[]) {
6262

6363
try {
6464
c.insert("test.foo", o); // will cause a dup key error on "hello" field
65-
} catch (const OperationException &oe) {
65+
} catch (const OperationException &) {
6666
// duplicate key error
6767
}
6868
cout << "we expect a dup key error here:" << endl;

0 commit comments

Comments
 (0)