From 400428a2b60f85b10c0fd164de8579d8e8a89ea0 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. (cherry picked from commit e71a76a1e288b07a3933e80a9e3b42620dc40bec) --- elab_expr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elab_expr.cc b/elab_expr.cc index 55f11058c..699c4f5d5 100644 --- a/elab_expr.cc +++ b/elab_expr.cc @@ -2589,7 +2589,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();