From dadade0d423c1458052e84c00cd4fd3aa7d0b9bc Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Fri, 16 Feb 2024 05:47:38 -0800 Subject: [PATCH] Remove unused exception parameter from velox/functions/lib/SubscriptUtil.cpp (#8767) Summary: Pull Request resolved: https://github.com/facebookincubator/velox/pull/8767 `-Wunused-exception-parameter` has identified an unused exception parameter. This diff removes it. This: ``` try { ... } catch (exception& e) { // no use of e } ``` should instead be written as ``` } catch (exception&) { ``` If the code compiles, this is safe to land. Reviewed By: dmm-fb Differential Revision: D53780438 fbshipit-source-id: c414827341cea1227983ba80c373f15d8c0aaa7b --- velox/functions/lib/SubscriptUtil.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/velox/functions/lib/SubscriptUtil.cpp b/velox/functions/lib/SubscriptUtil.cpp index 58dc24269037..7c079a57cd0c 100644 --- a/velox/functions/lib/SubscriptUtil.cpp +++ b/velox/functions/lib/SubscriptUtil.cpp @@ -318,7 +318,7 @@ namespace { std::exception_ptr makeZeroSubscriptError() { try { VELOX_USER_FAIL("SQL array indices start at 1"); - } catch (const std::exception& e) { + } catch (const std::exception&) { return std::current_exception(); } } @@ -326,7 +326,7 @@ std::exception_ptr makeZeroSubscriptError() { std::exception_ptr makeBadSubscriptError() { try { VELOX_USER_FAIL("Array subscript out of bounds."); - } catch (const std::exception& e) { + } catch (const std::exception&) { return std::current_exception(); } } @@ -334,7 +334,7 @@ std::exception_ptr makeBadSubscriptError() { std::exception_ptr makeNegativeSubscriptError() { try { VELOX_USER_FAIL("Array subscript is negative."); - } catch (const std::exception& e) { + } catch (const std::exception&) { return std::current_exception(); } }