Unverified Commit 4faeccb7 authored by Thomas PEYRUCAIN's avatar Thomas PEYRUCAIN Committed by GitHub
Browse files

Update value.cpp

Add operations to the unused variables to silence the unused variable warnings in order to have a stable release of dynamic-graph into the ros buildfarm
parent 3b623f26
...@@ -64,6 +64,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) { ...@@ -64,6 +64,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
bool res = false; bool res = false;
try { try {
int aInt(anet); int aInt(anet);
aInt++; // silence unused variable warnings to have a stable release in the ros buildfarm
} catch (const dg::ExceptionAbstract &aea) { } catch (const dg::ExceptionAbstract &aea) {
output << aea.getExceptionName(); output << aea.getExceptionName();
output2 << aea.what(); output2 << aea.what();
...@@ -78,6 +79,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) { ...@@ -78,6 +79,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
res = false; res = false;
try { try {
bool abool(anet); bool abool(anet);
abool=!abool; // silence unused variable warnings to have a stable release in the ros buildfarm
} catch (const dg::ExceptionAbstract &aea) { } catch (const dg::ExceptionAbstract &aea) {
res = (aea.getCode() == dg::ExceptionAbstract::TOOLS); res = (aea.getCode() == dg::ExceptionAbstract::TOOLS);
} }
...@@ -88,6 +90,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) { ...@@ -88,6 +90,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
res = false; res = false;
try { try {
unsigned int aint(anet); unsigned int aint(anet);
aint++;
} catch (const dg::ExceptionAbstract &aea) { } catch (const dg::ExceptionAbstract &aea) {
res = (aea.getCode() == dg::ExceptionAbstract::TOOLS); res = (aea.getCode() == dg::ExceptionAbstract::TOOLS);
} }
...@@ -98,6 +101,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) { ...@@ -98,6 +101,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
res = false; res = false;
try { try {
double adouble(anet); double adouble(anet);
adouble++; // silence unused variable warnings to have a stable release in the ros buildfarm
} catch (const dg::ExceptionAbstract &aea) { } catch (const dg::ExceptionAbstract &aea) {
res = (aea.getCode() == dg::ExceptionAbstract::TOOLS); res = (aea.getCode() == dg::ExceptionAbstract::TOOLS);
} }
...@@ -108,6 +112,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) { ...@@ -108,6 +112,7 @@ BOOST_AUTO_TEST_CASE(value_exceptions) {
res = false; res = false;
try { try {
float afloat(anet); float afloat(anet);
afloat++; // silence unused variable warnings to have a stable release in the ros buildfarm
} catch (const dg::ExceptionAbstract &aea) { } catch (const dg::ExceptionAbstract &aea) {
res = (aea.getCode() == dg::ExceptionAbstract::TOOLS); res = (aea.getCode() == dg::ExceptionAbstract::TOOLS);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment