From e0f82981e7ba1f2b2f20213e5e588c0d05b0ef5b Mon Sep 17 00:00:00 2001 From: Cary R Date: Mon, 24 Sep 2012 10:26:58 -0700 Subject: [PATCH] Remove some compiler warnings --- elab_scope.cc | 2 +- elaborate.cc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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;