Remove some compiler warnings

This commit is contained in:
Cary R 2012-09-24 10:26:58 -07:00
parent 016d64e443
commit e0f82981e7
2 changed files with 7 additions and 1 deletions

View File

@ -249,7 +249,7 @@ static void elaborate_scope_enumeration(Design*des, NetScope*scope,
// The values are explicitly sized to the width of the
// base type of the enumeration.
verinum tmp_val (0);
if (cur_value.len() < use_enum->packed_width()) {
if (cur_value.len() < (unsigned long)use_enum->packed_width()) {
// Pad the current value if it is narrower than the final
// width of the enum.
tmp_val = pad_to_width (cur_value, use_enum->packed_width());

View File

@ -2653,6 +2653,12 @@ NetProc* PBlock::elaborate(Design*des, NetScope*scope) const
case PBlock::BL_JOIN_ANY:
type = NetBlock::PARA_JOIN_ANY;
break;
// Added to remove a "type" uninitialized compiler warning.
// This should never be reached since all the PBlock enumeration
// cases are handled above.
default:
type = NetBlock::SEQU;
assert(0);
}
NetScope*nscope = 0;