diff --git a/c10/mobile/CPUCachingAllocator.cpp b/c10/mobile/CPUCachingAllocator.cpp index b3076dd023b..cafef1030f3 100644 --- a/c10/mobile/CPUCachingAllocator.cpp +++ b/c10/mobile/CPUCachingAllocator.cpp @@ -16,7 +16,7 @@ inline void* CPUCachingAllocator::allocate_and_cache(const size_t bytes) { void* ptr; try { ptr = c10::alloc_cpu(bytes); - } catch (c10::Error& ) { + } catch (c10::Error&) { // If allocation fails, try freeing cached available blocks. // For now free all available cached blocks. free_cached(); diff --git a/torch/csrc/jit/frontend/lexer.cpp b/torch/csrc/jit/frontend/lexer.cpp index 94611e9f4c6..41a88ad9962 100644 --- a/torch/csrc/jit/frontend/lexer.cpp +++ b/torch/csrc/jit/frontend/lexer.cpp @@ -78,7 +78,7 @@ C10_EXPORT int stringToKind(const std::string& str) { }(); try { return str_to_kind.at(str); - } catch (std::out_of_range& ) { + } catch (std::out_of_range&) { throw std::out_of_range("unknown token in stringToKind"); } }