Fix Clang compiler warnings (-Wunused-exception-parameter)

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
This commit is contained in:
Ferry Huberts 2023-09-02 22:04:36 +02:00
parent 44c37df002
commit e54fad7fa4
3 changed files with 3 additions and 4 deletions

View File

@ -310,7 +310,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compiler_flags(10 "-Wno-unneeded-member-function")
add_compiler_flags(10 "-Wno-unreachable-code-return")
add_compiler_flags(10 "-Wno-unsafe-buffer-usage")
add_compiler_flags(10 "-Wno-unused-exception-parameter")
add_compiler_flags(10 "-Wno-unused-lambda-capture")
add_compiler_flags(10 "-Wno-unused-member-function")
add_compiler_flags(10 "-Wno-unused-parameter")

View File

@ -86,7 +86,7 @@ void ObjectWrapperTest::onRun() {
bool throws = false;
try {
pw2 = pw1;
} catch (std::runtime_error& e) {
} catch (std::runtime_error&) {
throws = true;
}
OATPP_ASSERT(pw2.getValueType() == oatpp::data::mapping::type::__class::Void::getType())
@ -101,7 +101,7 @@ void ObjectWrapperTest::onRun() {
bool throws = false;
try {
pw2 = std::move(pw1);
} catch (std::runtime_error& e) {
} catch (std::runtime_error&) {
throws = true;
}
OATPP_ASSERT(pw2.getValueType() == oatpp::data::mapping::type::__class::Void::getType())

View File

@ -270,7 +270,7 @@ void StringTest::onRun() {
try {
std::string s2 = s1;
} catch (const std::runtime_error& e) {
} catch (const std::runtime_error&) {
exceptionThrown = true;
}