From 23413a4d12ad070c8a356c5a3186f81def705c54 Mon Sep 17 00:00:00 2001 From: gatecat Date: Thu, 25 Feb 2021 11:21:39 +0000 Subject: Fix compiler warnings introduced by -Wextra Signed-off-by: gatecat --- fpga_interchange/fpga_interchange.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fpga_interchange/fpga_interchange.cpp') diff --git a/fpga_interchange/fpga_interchange.cpp b/fpga_interchange/fpga_interchange.cpp index a1642789..9410b117 100644 --- a/fpga_interchange/fpga_interchange.cpp +++ b/fpga_interchange/fpga_interchange.cpp @@ -1018,7 +1018,7 @@ size_t ModuleReader::translate_port_index(LogicalNetlist::Netlist::PortInstance: NPNR_ASSERT(port.isBus()); uint32_t idx = port_inst.getBusIdx().getIdx(); size_t width = get_port_width(port); - NPNR_ASSERT(idx >= 0 && idx < width); + NPNR_ASSERT(idx < width); return width - 1 - idx; } } -- cgit v1.2.3