Shadow reduction part 6

Finish cleaning up shadowed variables, flagged by turning on -Wshadow.
No intended change in functionality.  Patch looks right, and is tested
to compile and run on my machine.  No regressions in the test suite.

This is the end of the simple, coordination-free patches.
The remaining shadows are special cases that will need extra attention.
This commit is contained in:
Larry Doolittle 2008-12-22 08:18:01 -08:00 committed by Stephen Williams
parent adbaaa9352
commit b76c14e452
8 changed files with 19 additions and 19 deletions

View File

@ -48,11 +48,11 @@ NetProc* AContrib::elaborate(Design*des, NetScope*scope) const
bool AProcess::elaborate(Design*des, NetScope*scope) const
{
NetProc*statement = statement_->elaborate(des, scope);
if (statement == 0)
NetProc*estatement = statement_->elaborate(des, scope);
if (estatement == 0)
return false;
NetAnalogTop*top = new NetAnalogTop(scope, type_, statement);
NetAnalogTop*top = new NetAnalogTop(scope, type_, estatement);
// Evaluate the attributes for this process, if there
// are any. These attributes are to be attached to the

View File

@ -879,8 +879,8 @@ const NetScope* NetProcTop::scope() const
return scope_;
}
NetAnalogTop::NetAnalogTop(NetScope*scope, ivl_process_type_t t, NetProc*st)
: type_(t), statement_(st), scope_(scope)
NetAnalogTop::NetAnalogTop(NetScope*scope__, ivl_process_type_t t, NetProc*st)
: type_(t), statement_(st), scope_(scope__)
{
next_ = 0;
}

View File

@ -87,8 +87,8 @@ vhdl_scope *vhdl_scope::get_parent() const
}
vhdl_entity::vhdl_entity(const char *name, const char *derived_from,
vhdl_arch *arch, int depth)
: depth(depth), name_(name), arch_(arch), derived_from_(derived_from)
vhdl_arch *arch, int depth__)
: depth(depth__), name_(name), arch_(arch), derived_from_(derived_from)
{
arch->get_scope()->set_parent(&ports_);
}

View File

@ -74,8 +74,8 @@ void vpip_bin_str_to_vec4(vvp_vector4_t&vec4, const char*buf)
/* Return "x" if there are invalid digits in the string. */
fprintf(stderr, "Warning: Invalid binary digit %c(%d) in "
"\"%s\".\n", *ebuf, *ebuf, buf);
for (unsigned idx = 0 ; idx < vec4.size() ; idx += 1) {
vec4.set_bit(idx, BIT4_X);
for (unsigned jdx = 0 ; jdx < vec4.size() ; jdx += 1) {
vec4.set_bit(jdx, BIT4_X);
}
return;
break;
@ -109,8 +109,8 @@ void vpip_bin_str_to_vec4(vvp_vector4_t&vec4, const char*buf)
break;
}
for (unsigned idx = 0 ; idx < vec4.size() ; idx += 1) {
if (idx < tval.size()) vec4.set_bit(idx, tval.value(idx));
else vec4.set_bit(idx, pad);
for (unsigned jdx = 0 ; jdx < vec4.size() ; jdx += 1) {
if (jdx < tval.size()) vec4.set_bit(jdx, tval.value(jdx));
else vec4.set_bit(jdx, pad);
}
}

View File

@ -102,8 +102,8 @@ void vpip_hex_str_to_vec4(vvp_vector4_t&val, const char*str)
/* Return "x" if there are invalid digits in the string. */
fprintf(stderr, "Warning: Invalid hex digit %c(%d) in "
"\"%s\".\n", ch, ch, str);
for (unsigned idx = 0 ; idx < val.size() ; idx += 1) {
val.set_bit(idx, BIT4_X);
for (unsigned jdx = 0 ; jdx < val.size() ; jdx += 1) {
val.set_bit(jdx, BIT4_X);
}
return;
break;

View File

@ -82,8 +82,8 @@ void vpip_oct_str_to_vec4(vvp_vector4_t&val, const char*str)
/* Return "x" if there are invalid digits in the string. */
fprintf(stderr, "Warning: Invalid octal digit %c(%d) in "
"\"%s\".\n", ch, ch, str);
for (unsigned idx = 0 ; idx < val.size() ; idx += 1) {
val.set_bit(idx, BIT4_X);
for (unsigned jdx = 0 ; jdx < val.size() ; jdx += 1) {
val.set_bit(jdx, BIT4_X);
}
return;
break;

View File

@ -283,8 +283,8 @@ void vpip_dec_str_to_vec4(vvp_vector4_t&vec, const char*buf)
/* Return "x" if there are invalid digits in the string. */
fprintf(stderr, "Warning: Invalid decimal digit %c(%d) in "
"\"%s.\"\n", buf[slen-idx-1], buf[slen-idx-1], buf);
for (unsigned idx = 0 ; idx < vec.size() ; idx += 1) {
vec.set_bit(idx, BIT4_X);
for (unsigned jdx = 0 ; jdx < vec.size() ; jdx += 1) {
vec.set_bit(jdx, BIT4_X);
}
return;
}

View File

@ -727,7 +727,7 @@ inline vvp_bit4_t vvp_scalar_t::value() const
inline vvp_scalar_t resolve(vvp_scalar_t a, vvp_scalar_t b)
{
extern vvp_scalar_t fully_featured_resolv_(vvp_scalar_t a, vvp_scalar_t b);
extern vvp_scalar_t fully_featured_resolv_(vvp_scalar_t, vvp_scalar_t);
// If the value is HiZ, resolution is simply a matter of
// returning the *other* value.