From: Nathaniel McVicar Date: Tue, 31 May 2022 17:03:48 +0000 (-0700) Subject: [windows] Remove unused pybind exception params X-Git-Tag: upstream/15.0.7~6286 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8fb1bef60f0bf2f7d8bcb7069f3f543c02248ac9;p=platform%2Fupstream%2Fllvm.git [windows] Remove unused pybind exception params Resolve MSVC warning C4104 for unreferenced variable Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D126683 --- diff --git a/mlir/lib/Bindings/Python/IRInterfaces.cpp b/mlir/lib/Bindings/Python/IRInterfaces.cpp index 1fc66fe..3f50d3b 100644 --- a/mlir/lib/Bindings/Python/IRInterfaces.cpp +++ b/mlir/lib/Bindings/Python/IRInterfaces.cpp @@ -63,13 +63,13 @@ public: : obj(std::move(object)) { try { operation = &py::cast(obj); - } catch (py::cast_error &err) { + } catch (py::cast_error &) { // Do nothing. } try { operation = &py::cast(obj).getOperation(); - } catch (py::cast_error &err) { + } catch (py::cast_error &) { // Do nothing. } @@ -86,7 +86,7 @@ public: } else { try { opName = obj.attr("OPERATION_NAME").template cast(); - } catch (py::cast_error &err) { + } catch (py::cast_error &) { throw py::type_error( "Op interface does not refer to an operation or OpView class"); }