diff --git a/elab_scope.cc b/elab_scope.cc index 140cb060d..de44e8830 100644 --- a/elab_scope.cc +++ b/elab_scope.cc @@ -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()); diff --git a/elaborate.cc b/elaborate.cc index d23cf421a..60dc888da 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -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;