Skip to content

Commit 27587d2

Browse files
authored
Merge pull request #76 from Rascof/patch-2
[Tests] fix compilation warnings
2 parents 3b623f2 + 9d62c34 commit 27587d2

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

tests/signal-cast-registerer.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,6 @@ BOOST_AUTO_TEST_CASE(standard_double_registerer) {
139139
BOOST_AUTO_TEST_CASE(custom_vector_registerer) {
140140
dynamicgraph::Signal<dynamicgraph::Vector, int> myVectorSignal("vector");
141141

142-
/// Create a second local vector registerer to generate an exception.
143-
bool res = false;
144-
try {
145-
EigenCastRegisterer_V myVectorCast2;
146-
} catch (const ExceptionSignal &aes) {
147-
res = (aes.getCode() == ExceptionSignal::GENERIC);
148-
}
149-
// BOOST_CHECK(res);
150-
151142
// Print the signal name.
152143
{
153144
output_test_stream output;

tests/value.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
6464
bool res = false;
6565
try {
6666
int aInt(anet);
67+
aInt++; // silence unused variable warnings to have a stable release in the ros buildfarm
6768
} catch (const dg::ExceptionAbstract &aea) {
6869
output << aea.getExceptionName();
6970
output2 << aea.what();
@@ -78,6 +79,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
7879
res = false;
7980
try {
8081
bool abool(anet);
82+
abool=!abool; // silence unused variable warnings to have a stable release in the ros buildfarm
8183
} catch (const dg::ExceptionAbstract &aea) {
8284
res = (aea.getCode() == dg::ExceptionAbstract::TOOLS);
8385
}
@@ -88,6 +90,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
8890
res = false;
8991
try {
9092
unsigned int aint(anet);
93+
aint++; // silence unused variable warnings to have a stable release in the ros buildfarm
9194
} catch (const dg::ExceptionAbstract &aea) {
9295
res = (aea.getCode() == dg::ExceptionAbstract::TOOLS);
9396
}
@@ -98,6 +101,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
98101
res = false;
99102
try {
100103
double adouble(anet);
104+
adouble++; // silence unused variable warnings to have a stable release in the ros buildfarm
101105
} catch (const dg::ExceptionAbstract &aea) {
102106
res = (aea.getCode() == dg::ExceptionAbstract::TOOLS);
103107
}
@@ -108,6 +112,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
108112
res = false;
109113
try {
110114
float afloat(anet);
115+
afloat++; // silence unused variable warnings to have a stable release in the ros buildfarm
111116
} catch (const dg::ExceptionAbstract &aea) {
112117
res = (aea.getCode() == dg::ExceptionAbstract::TOOLS);
113118
}

0 commit comments

Comments
 (0)