Various small fixes (from gcc compiler warnings)
authorClifford Wolf <clifford@clifford.at>
Wed, 23 Jul 2014 18:45:27 +0000 (20:45 +0200)
committerClifford Wolf <clifford@clifford.at>
Wed, 23 Jul 2014 18:45:27 +0000 (20:45 +0200)
frontends/ast/simplify.cc
passes/fsm/fsmdata.h

index f819b2506ee1b78180c5551be09169400f26ad3d..d86bfb3f01e77029eb59013f8a1e25d1c0c6fa56 100644 (file)
@@ -2259,7 +2259,7 @@ AstNode *AstNode::eval_const_function(AstNode *fcall)
                                        log_error("Non-constant range in %s:%d (called from %s:%d).\n",
                                                        range->filename.c_str(), range->linenum, fcall->filename.c_str(), fcall->linenum);
                                int offset = std::min(range->range_left, range->range_right);
-                               int width = std::min(std::abs(range->range_left - range->range_right) + 1, width);
+                               int width = std::abs(range->range_left - range->range_right) + 1;
                                varinfo_t &v = variables[stmt->children.at(0)->str];
                                RTLIL::Const r = stmt->children.at(1)->bitsAsConst(v.val.bits.size());
                                for (int i = 0; i < width; i++)
index d0be71c5ba65cc155b63bf156daf302269604794..ae9569ed762ecc6fd578cd1cee942ca993436f0f 100644 (file)
@@ -143,25 +143,25 @@ struct FsmData
                log("  Input signals:\n");
                RTLIL::SigSpec sig_in = cell->connections["\\CTRL_IN"];
                for (int i = 0; i < SIZE(sig_in); i++)
-                       log("  %3zd: %s\n", i, log_signal(sig_in[i]));
+                       log("  %3d: %s\n", i, log_signal(sig_in[i]));
 
                log("\n");
                log("  Output signals:\n");
                RTLIL::SigSpec sig_out = cell->connections["\\CTRL_OUT"];
                for (int i = 0; i < SIZE(sig_out); i++)
-                       log("  %3zd: %s\n", i, log_signal(sig_out[i]));
+                       log("  %3d: %s\n", i, log_signal(sig_out[i]));
 
                log("\n");
                log("  State encoding:\n");
                for (int i = 0; i < SIZE(state_table); i++)
-                       log("  %3zd: %10s%s\n", i, log_signal(state_table[i], false),
+                       log("  %3d: %10s%s\n", i, log_signal(state_table[i], false),
                                        int(i) == reset_state ? "  <RESET STATE>" : "");
 
                log("\n");
                log("  Transition Table (state_in, ctrl_in, state_out, ctrl_out):\n");
                for (int i = 0; i < SIZE(transition_table); i++) {
                        transition_t &tr = transition_table[i];
-                       log("  %5zd: %5d %s   -> %5d %s\n", i, tr.state_in, log_signal(tr.ctrl_in), tr.state_out, log_signal(tr.ctrl_out));
+                       log("  %5d: %5d %s   -> %5d %s\n", i, tr.state_in, log_signal(tr.ctrl_in), tr.state_out, log_signal(tr.ctrl_out));
                }
 
                log("\n");