Resolve MSVC warning C4104 for unreferenced variable
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D126683
: 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.
}
} 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");
}