diff --git a/PDelays.cc b/PDelays.cc index 42e550165..0f72a3a51 100644 --- a/PDelays.cc +++ b/PDelays.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: PDelays.cc,v 1.10 2003/02/08 19:49:21 steve Exp $" +#ident "$Id: PDelays.cc,v 1.11 2003/06/21 01:21:42 steve Exp $" #endif # include "config.h" @@ -116,8 +116,6 @@ void PDelays::eval_delays(Design*des, NetScope*scope, { assert(scope); - int shift = scope->time_unit() - des->get_precision(); - if (delay_[0]) { rise_time = calculate_val(des, scope, delay_[0]); @@ -148,6 +146,9 @@ void PDelays::eval_delays(Design*des, NetScope*scope, /* * $Log: PDelays.cc,v $ + * Revision 1.11 2003/06/21 01:21:42 steve + * Harmless fixup of warnings. + * * Revision 1.10 2003/02/08 19:49:21 steve * Calculate delay statement delays using elaborated * expressions instead of pre-elaborated expression diff --git a/elab_anet.cc b/elab_anet.cc index 310ab7415..2f0fe796d 100644 --- a/elab_anet.cc +++ b/elab_anet.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: elab_anet.cc,v 1.7 2003/03/06 00:28:41 steve Exp $" +#ident "$Id: elab_anet.cc,v 1.8 2003/06/21 01:21:43 steve Exp $" #endif # include "config.h" @@ -107,7 +107,7 @@ NetNet* PEIdent::elaborate_anet(Design*des, NetScope*scope) const NetNet*sig = des->find_signal(scope, path_); if (sig == 0) { - if (NetMemory*mem = des->find_memory(scope, path_)) { + if (des->find_memory(scope, path_)) { cerr << get_line() << ": error: memories not allowed " << "on left side of procedural continuous " << "assignment." << endl; @@ -149,6 +149,9 @@ NetNet* PEIdent::elaborate_anet(Design*des, NetScope*scope) const /* * $Log: elab_anet.cc,v $ + * Revision 1.8 2003/06/21 01:21:43 steve + * Harmless fixup of warnings. + * * Revision 1.7 2003/03/06 00:28:41 steve * All NetObj objects have lex_string base names. * diff --git a/elab_net.cc b/elab_net.cc index c4cdfd6cd..9d53f544f 100644 --- a/elab_net.cc +++ b/elab_net.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: elab_net.cc,v 1.113 2003/05/01 01:13:57 steve Exp $" +#ident "$Id: elab_net.cc,v 1.114 2003/06/21 01:21:43 steve Exp $" #endif # include "config.h" @@ -104,8 +104,6 @@ NetNet* PEBinary::elaborate_net(Design*des, NetScope*scope, } NetNet*osig; - NetNode*gate; - NetNode*gate_t; switch (op_) { case '^': // XOR @@ -177,8 +175,6 @@ NetNet* PEBinary::elaborate_net_add_(Design*des, NetScope*scope, } NetNet*osig; - NetNode*gate; - NetNode*gate_t; unsigned width = lsig->pin_count(); if (rsig->pin_count() > lsig->pin_count()) @@ -233,7 +229,7 @@ NetNet* PEBinary::elaborate_net_add_(Design*des, NetScope*scope, if (owidth > width) connect(osig->pin(width), adder->pin_Cout()); - gate = adder; + NetNode*gate = adder; gate->rise_time(rise); gate->fall_time(fall); gate->decay_time(decay); @@ -976,7 +972,7 @@ NetNet* PEBinary::elaborate_net_shift_(Design*des, NetScope*scope, // Calculate the number of useful bits for the shift amount, // and elaborate the right_ expression as the shift amount. unsigned dwid = 0; - while ((1 << dwid) < lwidth) + while ((1U << dwid) < lwidth) dwid += 1; NetNet*rsig = right_->elaborate_net(des, scope, dwid, 0, 0, 0); @@ -2327,6 +2323,9 @@ NetNet* PEUnary::elaborate_net(Design*des, NetScope*scope, /* * $Log: elab_net.cc,v $ + * Revision 1.114 2003/06/21 01:21:43 steve + * Harmless fixup of warnings. + * * Revision 1.113 2003/05/01 01:13:57 steve * More complete bit range internal error message, * Better test of part select ranges on non-zero diff --git a/elab_sig.cc b/elab_sig.cc index 5af789ad2..2eee8a1d0 100644 --- a/elab_sig.cc +++ b/elab_sig.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: elab_sig.cc,v 1.28 2003/03/06 00:28:41 steve Exp $" +#ident "$Id: elab_sig.cc,v 1.29 2003/06/21 01:21:43 steve Exp $" #endif # include "config.h" @@ -505,6 +505,8 @@ void PWire::elaborate_sig(Design*des, NetScope*scope) const delete lval; delete rval; NetMemory*sig = new NetMemory(scope, name, wid, lnum, rnum); + // The constructor automatically adds the memory object + // to the scope. Do I need to set line number information? } else { @@ -522,6 +524,9 @@ void PWire::elaborate_sig(Design*des, NetScope*scope) const /* * $Log: elab_sig.cc,v $ + * Revision 1.29 2003/06/21 01:21:43 steve + * Harmless fixup of warnings. + * * Revision 1.28 2003/03/06 00:28:41 steve * All NetObj objects have lex_string base names. * diff --git a/elaborate.cc b/elaborate.cc index 0509814b9..59c244461 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: elaborate.cc,v 1.282 2003/06/13 19:10:20 steve Exp $" +#ident "$Id: elaborate.cc,v 1.283 2003/06/21 01:21:43 steve Exp $" #endif # include "config.h" @@ -1089,7 +1089,7 @@ NetProc* PAssign::elaborate(Design*des, NetScope*scope) const /* Based on the specific type of the l-value, do cleanup processing on the r-value. */ - if (NetVariable*tmp = lv->var()) { + if (lv->var()) { } else if (rv->expr_type() == NetExpr::ET_REAL) { @@ -1134,7 +1134,7 @@ NetProc* PAssignNB::elaborate(Design*des, NetScope*scope) const rv = new NetEConst(*val); delete val; - } else if (rv = rval()->elaborate_expr(des, scope)) { + } else if ((rv = rval()->elaborate_expr(des, scope))) { /* OK, go on. */ @@ -2423,7 +2423,7 @@ bool Module::elaborate(Design*des, NetScope*scope) const continue; } - NetProcTop*top; + NetProcTop*top=NULL; switch ((*st)->type()) { case PProcess::PR_INITIAL: top = new NetProcTop(scope, NetProcTop::KINITIAL, cur); @@ -2432,6 +2432,7 @@ bool Module::elaborate(Design*des, NetScope*scope) const top = new NetProcTop(scope, NetProcTop::KALWAYS, cur); break; } + assert(top); // Evaluate the attributes for this process, if there // are any. These attributes are to be attached to the @@ -2559,6 +2560,9 @@ Design* elaborate(listroots) /* * $Log: elaborate.cc,v $ + * Revision 1.283 2003/06/21 01:21:43 steve + * Harmless fixup of warnings. + * * Revision 1.282 2003/06/13 19:10:20 steve * Handle assign of real to vector. * diff --git a/eval.cc b/eval.cc index a8d5572f4..f4742f846 100644 --- a/eval.cc +++ b/eval.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: eval.cc,v 1.35 2003/04/14 03:40:21 steve Exp $" +#ident "$Id: eval.cc,v 1.36 2003/06/21 01:21:43 steve Exp $" #endif # include "config.h" @@ -150,7 +150,6 @@ verinum* PEBinary::eval_const(const Design*des, const NetScope*scope) const */ verinum* PEIdent::eval_const(const Design*des, const NetScope*scope) const { - NetScope*found_in; assert(scope); const NetExpr*expr = des->find_parameter(scope, path_); @@ -241,6 +240,9 @@ verinum* PEUnary::eval_const(const Design*des, const NetScope*scope) const /* * $Log: eval.cc,v $ + * Revision 1.36 2003/06/21 01:21:43 steve + * Harmless fixup of warnings. + * * Revision 1.35 2003/04/14 03:40:21 steve * Make some effort to preserve bits while * operating on constant values. diff --git a/link_const.cc b/link_const.cc index c084024e1..ec445ad10 100644 --- a/link_const.cc +++ b/link_const.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: link_const.cc,v 1.15 2002/08/12 01:34:59 steve Exp $" +#ident "$Id: link_const.cc,v 1.16 2003/06/21 01:21:43 steve Exp $" #endif # include "config.h" @@ -127,10 +127,10 @@ verinum::V Nexus::driven_value() const const NetConst*obj; const NetNet*sig; - if (obj = dynamic_cast(cur->get_obj())) { + if ((obj = dynamic_cast(cur->get_obj()))) { val = obj->value(cur->get_pin()); - } else if (sig = dynamic_cast(cur->get_obj())) { + } else if ((sig = dynamic_cast(cur->get_obj()))) { if (sig->type() == NetNet::SUPPLY0) { driven_ = V0; @@ -164,6 +164,9 @@ verinum::V Nexus::driven_value() const /* * $Log: link_const.cc,v $ + * Revision 1.16 2003/06/21 01:21:43 steve + * Harmless fixup of warnings. + * * Revision 1.15 2002/08/12 01:34:59 steve * conditional ident string using autoconfig. * diff --git a/netlist.h b/netlist.h index 5a1a523fb..fbfeca4a2 100644 --- a/netlist.h +++ b/netlist.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: netlist.h,v 1.291 2003/06/20 00:53:19 steve Exp $" +#ident "$Id: netlist.h,v 1.292 2003/06/21 01:21:43 steve Exp $" #endif /* @@ -1997,7 +1997,7 @@ class NetFuncDef { unsigned port_count() const; const NetNet*port(unsigned idx) const; - virtual void dump(ostream&, unsigned ind) const; + void dump(ostream&, unsigned ind) const; private: NetScope*scope_; @@ -3306,6 +3306,9 @@ extern ostream& operator << (ostream&, NetNet::Type); /* * $Log: netlist.h,v $ + * Revision 1.292 2003/06/21 01:21:43 steve + * Harmless fixup of warnings. + * * Revision 1.291 2003/06/20 00:53:19 steve * Module attributes from the parser * through to elaborated form. diff --git a/set_width.cc b/set_width.cc index d56b242ed..4f06a320f 100644 --- a/set_width.cc +++ b/set_width.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: set_width.cc,v 1.31 2003/06/18 03:55:19 steve Exp $" +#ident "$Id: set_width.cc,v 1.32 2003/06/21 01:21:43 steve Exp $" #endif # include "config.h" @@ -284,7 +284,7 @@ bool NetEConst::set_width(unsigned w) } else { unsigned use_w = w; - bool flag = true; + verinum::V pad_bit = value_.has_sign() ? value_[value_.len() - 1] : verinum::V0; @@ -411,6 +411,9 @@ bool NetEUReduce::set_width(unsigned w) /* * $Log: set_width.cc,v $ + * Revision 1.32 2003/06/21 01:21:43 steve + * Harmless fixup of warnings. + * * Revision 1.31 2003/06/18 03:55:19 steve * Add arithmetic shift operators. * diff --git a/syn-rules.y b/syn-rules.y index 3c19cbc55..3f5c9b510 100644 --- a/syn-rules.y +++ b/syn-rules.y @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: syn-rules.y,v 1.24 2002/08/24 05:02:37 steve Exp $" +#ident "$Id: syn-rules.y,v 1.25 2003/06/21 01:21:43 steve Exp $" #endif # include "config.h" @@ -142,7 +142,6 @@ static void hookup_RAMDQ(NetRamDq*ram, NetESignal*d, NetNet*adr, /* Connect the input Data bits of the RAM, from the r-value of the assignment. */ - int loff = a->get_loff(); for (unsigned idx = 0 ; idx < ram->width() ; idx += 1) { connect(ram->pin_Data(idx), d->bit(idx+rval_pinoffset)); } @@ -183,7 +182,7 @@ static void make_DFF_CE(Design*des, NetProcTop*top, NetEvWait*wclk, NetAssign_*a; unsigned rval_pinoffset=0; - for (unsigned i=0; a=asn->l_val(i); i++) { + for (unsigned i=0; (a=asn->l_val(i)); i++) { // asn->l_val(i) are the set of *NetAssign_'s that form the list // of lval expressions. Treat each one independently, keeping @@ -232,7 +231,7 @@ static void make_initializer(Design*des, NetProcTop*top, NetAssignBase*asn) for (Link*cur = nex->first_nlink() ; cur ; cur = cur->next_nlink()) { - if (NetNet*net = dynamic_cast (cur->get_obj())) + if (dynamic_cast (cur->get_obj())) cur->set_init(bit); } diff --git a/synth2.cc b/synth2.cc index a150e06ed..3996cd62f 100644 --- a/synth2.cc +++ b/synth2.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: synth2.cc,v 1.25 2003/04/03 04:30:00 steve Exp $" +#ident "$Id: synth2.cc,v 1.26 2003/06/21 01:21:43 steve Exp $" #endif # include "config.h" @@ -171,24 +171,24 @@ bool NetCase::synth_async(Design*des, NetScope*scope, elided. */ mapguard2sel; cur = 0; - for (unsigned idx = 0 ; idx < (1<pin_count()) ; idx += 1) { + for (unsigned idx = 0 ; idx < (1U<pin_count()) ; idx += 1) { if ((idx & ~sel_mask) == sel_ref) { guard2sel[idx] = cur; cur += 1; } } - assert(cur == (1 << sel_pins)); + assert(cur == (1U << sel_pins)); NetMux*mux = new NetMux(scope, scope->local_symbol(), nex_out->pin_count(), - 1 << sel_pins, sel_pins); + 1U << sel_pins, sel_pins); /* Connect the non-constant select bits to the select input of the mux device. */ cur = 0; for (unsigned idx = 0 ; idx < esig->pin_count() ; idx += 1) { /* skip bits that are known to be constant. */ - if ((sel_mask & (1 << idx)) == 0) + if ((sel_mask & (1U << idx)) == 0) continue; connect(mux->pin_Sel(cur), esig->pin(idx)); @@ -201,7 +201,7 @@ bool NetCase::synth_async(Design*des, NetScope*scope, connect(nex_out->pin(idx), mux->pin_Result(idx)); NetProc**statement_map = new NetProc*[1 << sel_pins]; - for (unsigned item = 0 ; item < (1<