Fix unused variable warnings

This commit is contained in:
Peter Dimov
2021-09-16 19:30:28 +03:00
parent a6c988181e
commit 36843a4e2d
3 changed files with 8 additions and 3 deletions

View File

@ -27,4 +27,6 @@ static error_code e2( ENOENT, generic_category() );
int main()
{
(void)e1;
(void)e2;
}

View File

@ -108,6 +108,7 @@ int main( int, char ** )
std::cout << "Conversion use cases...\n";
error_condition x1( errc::file_exists );
(void)x1;
//error_code x2( errc::file_exists ); // should fail to compile
make_error_code(errc::file_exists);
make_error_condition(errc::file_exists);

View File

@ -16,8 +16,10 @@
#include <boost/detail/lightweight_test.hpp>
#include <boost/system/error_code.hpp>
int main( int, char*[] )
int main()
{
boost::system::error_code ec( 0, boost::system::system_category() );
return ::boost::report_errors();
boost::system::error_code ec( 0, boost::system::system_category() );
(void)ec;
return ::boost::report_errors();
}