Fix signed/unsigned comparison warning.

(cherry picked from commit e71a76a1e2)
This commit is contained in:
Martin Whitaker 2018-10-06 20:40:54 +01:00
parent de63c0cedb
commit 400428a2b6
1 changed files with 1 additions and 1 deletions

View File

@ -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();