From ebeed9b0c17a641fbeacf0545687ef89d4492308 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Thu, 15 Dec 2022 09:42:03 +0100 Subject: [PATCH] quench warnings on MSVC --- src/python/switch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/switch.h b/src/python/switch.h index 3437858d3..a4977de00 100644 --- a/src/python/switch.h +++ b/src/python/switch.h @@ -72,7 +72,7 @@ py::object switch_record_impl(UInt32 indices, py::list funcs, py::args args) { try { result = funcs[i-1](*args); - } catch (const std::exception& e) { + } catch (const std::exception&) { // Special cleanup is necessary for interactive Python sessions py::object modules = py::module_::import("sys").attr("modules"); if (modules.contains("ipykernel")) { @@ -134,7 +134,7 @@ py::object switch_reduce_impl(UInt32 indices, py::list funcs, jit_var_schedule(index); })); - uint32_t n_inst = funcs.size(); + uint32_t n_inst = (uint32_t) funcs.size(); VCallBucket *buckets = jit_var_vcall_reduce(Backend, nullptr, indices.index(), &n_inst);