[Mlir-commits] [mlir] 8fb1bef - [windows] Remove unused pybind exception params
Stella Stamenova
llvmlistbot at llvm.org
Tue May 31 12:37:18 PDT 2022
Author: Nathaniel McVicar
Date: 2022-05-31T12:36:57-07:00
New Revision: 8fb1bef60f0bf2f7d8bcb7069f3f543c02248ac9
URL: https://github.com/llvm/llvm-project/commit/8fb1bef60f0bf2f7d8bcb7069f3f543c02248ac9
DIFF: https://github.com/llvm/llvm-project/commit/8fb1bef60f0bf2f7d8bcb7069f3f543c02248ac9.diff
LOG: [windows] Remove unused pybind exception params
Resolve MSVC warning C4104 for unreferenced variable
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D126683
Added:
Modified:
mlir/lib/Bindings/Python/IRInterfaces.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Bindings/Python/IRInterfaces.cpp b/mlir/lib/Bindings/Python/IRInterfaces.cpp
index 1fc66fef468c6..3f50d3bc0af45 100644
--- a/mlir/lib/Bindings/Python/IRInterfaces.cpp
+++ b/mlir/lib/Bindings/Python/IRInterfaces.cpp
@@ -63,13 +63,13 @@ class PyConcreteOpInterface {
: obj(std::move(object)) {
try {
operation = &py::cast<PyOperation &>(obj);
- } catch (py::cast_error &err) {
+ } catch (py::cast_error &) {
// Do nothing.
}
try {
operation = &py::cast<PyOpView &>(obj).getOperation();
- } catch (py::cast_error &err) {
+ } catch (py::cast_error &) {
// Do nothing.
}
@@ -86,7 +86,7 @@ class PyConcreteOpInterface {
} else {
try {
opName = obj.attr("OPERATION_NAME").template cast<std::string>();
- } catch (py::cast_error &err) {
+ } catch (py::cast_error &) {
throw py::type_error(
"Op interface does not refer to an operation or OpView class");
}
More information about the Mlir-commits
mailing list