Fixed manual/CHAPTER_Prog/stubnets.cc
authorClifford Wolf <clifford@clifford.at>
Wed, 23 Jul 2014 17:36:43 +0000 (19:36 +0200)
committerClifford Wolf <clifford@clifford.at>
Wed, 23 Jul 2014 17:36:43 +0000 (19:36 +0200)
manual/CHAPTER_Prog/stubnets.cc

index efb3ca958b50ae1fec42ddbe5a6cb61b9c0416c2..3f8d553ad32a28c9ed90f6c1213c4c32ba51783a 100644 (file)
@@ -62,7 +62,7 @@ static void find_stub_nets(RTLIL::Design *design, RTLIL::Module *module, bool re
 
                // for each bit (unless it is a constant):
                // check if it is used at least two times and add to stub_bits otherwise
-               for (size_t i = 0; i < SIZE(sig); i++)
+               for (int i = 0; i < SIZE(sig); i++)
                        if (sig[i].wire != NULL && (bit_usage_count[sig[i]] + usage_offset) < 2)
                                stub_bits.insert(i);
 
@@ -72,7 +72,7 @@ static void find_stub_nets(RTLIL::Design *design, RTLIL::Module *module, bool re
 
                // report stub bits and/or stub wires, don't report single bits
                // if called with report_bits set to false.
-               if (int(stub_bits.size()) == sig.width) {
+               if (SIZE(stub_bits) == SIZE(sig)) {
                        log("  found stub wire: %s\n", RTLIL::id2cstr(wire->name));
                } else {
                        if (!report_bits)