From 30c7e6c1d6280720662ec4718f18e81054b56dc5 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Wed, 14 Feb 2024 16:25:14 -0800 Subject: [PATCH] Remove unused exception parameter from deeplearning/projects/flashlight/flashlight/fl/tensor/backend/af/mem/DefaultMemoryManager.cpp Summary: `-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: D53780600 fbshipit-source-id: b5bc449f334424fe14b2922a5365978440a521c1 --- flashlight/fl/tensor/backend/af/mem/DefaultMemoryManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flashlight/fl/tensor/backend/af/mem/DefaultMemoryManager.cpp b/flashlight/fl/tensor/backend/af/mem/DefaultMemoryManager.cpp index debd2daa4..67c94cb09 100644 --- a/flashlight/fl/tensor/backend/af/mem/DefaultMemoryManager.cpp +++ b/flashlight/fl/tensor/backend/af/mem/DefaultMemoryManager.cpp @@ -188,7 +188,7 @@ void* DefaultMemoryManager::alloc( // Perform garbage collection if memory can not be allocated try { ptr = this->deviceInterface->nativeAlloc(allocBytes); - } catch (std::exception& ex) { + } catch (std::exception&) { // FIXME: assume that the exception is due to out of memory, and don't // continue propagating it // If out of memory, run garbage collect and try again