Fix signed/unsigned comparison warning.

This commit is contained in:
Martin Whitaker 2018-10-06 20:40:54 +01:00
parent 0d20c50de4
commit e71a76a1e2
1 changed files with 1 additions and 1 deletions

View File

@ -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 // Find rounded up length that can fit the whole casted array of vectors
int len = base->expr_width() + vector->packed_width() - 1; 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(); len /= vector->packed_width();
} else { } else {
len /= base->expr_width(); len /= base->expr_width();