From 36843a4e2de80760279319845c2cbf8275865c96 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 16 Sep 2021 19:30:28 +0300 Subject: [PATCH] Fix unused variable warnings --- test/after_main_test.cpp | 2 ++ test/error_code_test.cpp | 1 + test/header_only_test.cpp | 8 +++++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/after_main_test.cpp b/test/after_main_test.cpp index 520f807..78bd219 100644 --- a/test/after_main_test.cpp +++ b/test/after_main_test.cpp @@ -27,4 +27,6 @@ static error_code e2( ENOENT, generic_category() ); int main() { + (void)e1; + (void)e2; } diff --git a/test/error_code_test.cpp b/test/error_code_test.cpp index 1db2e61..dd1256e 100644 --- a/test/error_code_test.cpp +++ b/test/error_code_test.cpp @@ -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); diff --git a/test/header_only_test.cpp b/test/header_only_test.cpp index 69dccae..5bbbeb8 100644 --- a/test/header_only_test.cpp +++ b/test/header_only_test.cpp @@ -16,8 +16,10 @@ #include #include -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(); }