One more signed vs unsigned comparison fix

Fix
  elab_expr.cc:1561: warning: comparison between signed and unsigned integer expressions
caused by revised prototype of NetNet::sb_to_idx() in
 commit dfb7bf5211
This commit is contained in:
Larry Doolittle 2008-05-12 09:12:07 -07:00 committed by Stephen Williams
parent 84a7efdb4f
commit 3c5bf034ca
1 changed files with 2 additions and 1 deletions

View File

@ -1558,7 +1558,8 @@ NetExpr* PEIdent::elaborate_expr_net_idx_do_(Design*des, NetScope*scope,
// If the part select covers exactly the entire
// vector, then do not bother with it. Return the
// signal itself.
if (net->sig()->sb_to_idx(lsv) == (wid-1) && wid == net->vector_width())
long l = net->sig()->sb_to_idx(lsv);
if (l >= 0 && (unsigned) l == (wid-1) && wid == net->vector_width())
return net;
// Otherwise, make a part select that covers the right range.