diff --git a/presto-native-execution/presto_cpp/main/PrestoServerOperations.cpp b/presto-native-execution/presto_cpp/main/PrestoServerOperations.cpp index 3fe9405758414..eb57bac5c8661 100644 --- a/presto-native-execution/presto_cpp/main/PrestoServerOperations.cpp +++ b/presto-native-execution/presto_cpp/main/PrestoServerOperations.cpp @@ -222,7 +222,7 @@ std::string PrestoServerOperations::taskOperation( limit = limitStr == proxygen::empty_string ? std::numeric_limits::max() : stoi(limitStr); - } catch (std::exception& ex) { + } catch (std::exception&) { VELOX_USER_FAIL("Invalid limit provided '{}'.", limitStr); } std::stringstream oss; diff --git a/presto-native-execution/presto_cpp/main/TaskResource.cpp b/presto-native-execution/presto_cpp/main/TaskResource.cpp index f0ff2526d79aa..34dc08e179a01 100644 --- a/presto-native-execution/presto_cpp/main/TaskResource.cpp +++ b/presto-native-execution/presto_cpp/main/TaskResource.cpp @@ -261,7 +261,7 @@ proxygen::RequestHandler* TaskResource::createOrUpdateTaskImpl( summarize, startProcessCpuTimeNs, receiveThrift); - } catch (const velox::VeloxException& e) { + } catch (const velox::VeloxException&) { // Creating an empty task, putting errors inside so that next // status fetch from coordinator will catch the error and well // categorize it. @@ -271,7 +271,7 @@ proxygen::RequestHandler* TaskResource::createOrUpdateTaskImpl( std::current_exception(), summarize, startProcessCpuTimeNs); - } catch (const velox::VeloxUserError& e) { + } catch (const velox::VeloxUserError&) { throw; } } diff --git a/presto-native-execution/presto_cpp/main/http/HttpServer.cpp b/presto-native-execution/presto_cpp/main/http/HttpServer.cpp index e6b7428df7e9e..907230a5a4a40 100644 --- a/presto-native-execution/presto_cpp/main/http/HttpServer.cpp +++ b/presto-native-execution/presto_cpp/main/http/HttpServer.cpp @@ -70,7 +70,7 @@ void sendResponse( std::string messageBody; try { messageBody = body.dump(); - } catch (const std::exception& e) { + } catch (const std::exception&) { messageBody = body.dump(-1, ' ', false, nlohmann::detail::error_handler_t::replace); LOG(WARNING) << "Failed to serialize json to string. " diff --git a/presto-native-execution/presto_cpp/main/operators/BroadcastExchangeSource.cpp b/presto-native-execution/presto_cpp/main/operators/BroadcastExchangeSource.cpp index b649540c9d678..e7bfe94b73c1a 100644 --- a/presto-native-execution/presto_cpp/main/operators/BroadcastExchangeSource.cpp +++ b/presto-native-execution/presto_cpp/main/operators/BroadcastExchangeSource.cpp @@ -126,7 +126,7 @@ BroadcastExchangeSource::createExchangeSource( try { broadcastFileInfo = BroadcastFileInfo::deserialize(broadcastInfoJson.value()); - } catch (const VeloxException& e) { + } catch (const VeloxException&) { throw; } catch (const std::exception& e) { VELOX_USER_FAIL("BroadcastInfo deserialization failed: {}", e.what()); diff --git a/presto-native-execution/presto_cpp/main/operators/ShuffleExchangeSource.cpp b/presto-native-execution/presto_cpp/main/operators/ShuffleExchangeSource.cpp index 45f3675f3e958..58e19a53991d4 100644 --- a/presto-native-execution/presto_cpp/main/operators/ShuffleExchangeSource.cpp +++ b/presto-native-execution/presto_cpp/main/operators/ShuffleExchangeSource.cpp @@ -23,7 +23,7 @@ namespace facebook::presto::operators { #define CALL_SHUFFLE(call, methodName) \ try { \ call; \ - } catch (const velox::VeloxException& e) { \ + } catch (const velox::VeloxException&) { \ throw; \ } catch (const std::exception& e) { \ VELOX_FAIL("ShuffleReader::{} failed: {}", methodName, e.what()); \ diff --git a/presto-native-execution/presto_cpp/main/operators/ShuffleWrite.cpp b/presto-native-execution/presto_cpp/main/operators/ShuffleWrite.cpp index 6a50ac3edc1a2..69ea6abfbae63 100644 --- a/presto-native-execution/presto_cpp/main/operators/ShuffleWrite.cpp +++ b/presto-native-execution/presto_cpp/main/operators/ShuffleWrite.cpp @@ -26,7 +26,7 @@ velox::core::PlanNodeId deserializePlanNodeId(const folly::dynamic& obj) { #define CALL_SHUFFLE(call, methodName) \ try { \ call; \ - } catch (const VeloxException& e) { \ + } catch (const VeloxException&) { \ throw; \ } catch (const std::exception& e) { \ VELOX_FAIL("ShuffleWriter::{} failed: {}", methodName, e.what()); \ diff --git a/presto-native-execution/presto_cpp/main/tests/PrestoToVeloxQueryConfigTest.cpp b/presto-native-execution/presto_cpp/main/tests/PrestoToVeloxQueryConfigTest.cpp index 082d133ba7768..0617e85c7ab18 100644 --- a/presto-native-execution/presto_cpp/main/tests/PrestoToVeloxQueryConfigTest.cpp +++ b/presto-native-execution/presto_cpp/main/tests/PrestoToVeloxQueryConfigTest.cpp @@ -209,7 +209,7 @@ TEST_F(PrestoToVeloxQueryConfigTest, sessionPropertiesOverrideSystemConfigs) { try { expectedBytes = toCapacity(expectedValue, config::CapacityUnit::BYTE); - } catch (const VeloxUserError& e) { + } catch (const VeloxUserError&) { expectedBytes = std::stoull(expectedValue); } EXPECT_EQ(expectedBytes, config.maxOutputBufferSize()); @@ -231,7 +231,7 @@ TEST_F(PrestoToVeloxQueryConfigTest, sessionPropertiesOverrideSystemConfigs) { try { expectedBytes = toCapacity(expectedValue, config::CapacityUnit::BYTE); - } catch (const VeloxUserError& e) { + } catch (const VeloxUserError&) { expectedBytes = std::stoull(expectedValue); } EXPECT_EQ(expectedBytes, config.maxPartitionedOutputBufferSize()); @@ -251,7 +251,7 @@ TEST_F(PrestoToVeloxQueryConfigTest, sessionPropertiesOverrideSystemConfigs) { try { expectedBytes = toCapacity(expectedValue, config::CapacityUnit::BYTE); - } catch (const VeloxUserError& e) { + } catch (const VeloxUserError&) { expectedBytes = std::stoull(expectedValue); } EXPECT_EQ( @@ -270,7 +270,7 @@ TEST_F(PrestoToVeloxQueryConfigTest, sessionPropertiesOverrideSystemConfigs) { try { expectedBytes = toCapacity(expectedValue, config::CapacityUnit::BYTE); - } catch (const VeloxUserError& e) { + } catch (const VeloxUserError&) { expectedBytes = std::stoull(expectedValue); } EXPECT_EQ(expectedBytes, config.maxExchangeBufferSize());