From e71a76a1e288b07a3933e80a9e3b42620dc40bec Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 6 Oct 2018 20:40:54 +0100 Subject: [PATCH] Fix signed/unsigned comparison warning. --- elab_expr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elab_expr.cc b/elab_expr.cc index f2634efdc..68b49f645 100644 --- a/elab_expr.cc +++ b/elab_expr.cc @@ -2611,7 +2611,7 @@ NetExpr* PECastType::elaborate_expr(Design*des, NetScope*scope, // Find rounded up length that can fit the whole casted array of vectors int len = base->expr_width() + vector->packed_width() - 1; - if(base->expr_width() > vector->packed_width()) { + if(base->expr_width() > (unsigned)vector->packed_width()) { len /= vector->packed_width(); } else { len /= base->expr_width();