V0.9: Remove some gcc/g++ (4.6.1) warnings.
This patch remove some unused variable warnings found with gcc/g++ 4.6.1 on Ubuntu 11.10.
This commit is contained in:
parent
f8bc2b6198
commit
4dae0471de
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000-2010 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2000-2011 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -1309,7 +1309,7 @@ void PGModule::elaborate_scope_mod_instances_(Design*des, Module*mod, NetScope*s
|
|||
// passed. It is built up by the ordered overrides or named
|
||||
// overrides.
|
||||
|
||||
typedef map<perm_string,PExpr*>::const_iterator mparm_it_t;
|
||||
typedef map<perm_string,PExpr*>::const_iterator mparm_itr_t;
|
||||
map<perm_string,PExpr*> replace;
|
||||
|
||||
|
||||
|
|
@ -1352,7 +1352,7 @@ void PGModule::elaborate_scope_mod_instances_(Design*des, Module*mod, NetScope*s
|
|||
// the expression in my context, then replace the sub-scope
|
||||
// parameter value with the new expression.
|
||||
|
||||
for (mparm_it_t cur = replace.begin()
|
||||
for (mparm_itr_t cur = replace.begin()
|
||||
; cur != replace.end() ; cur ++ ) {
|
||||
|
||||
PExpr*tmp = (*cur).second;
|
||||
|
|
|
|||
|
|
@ -1593,14 +1593,6 @@ void PGModule::elaborate_mod_(Design*des, Module*rmod, NetScope*scope) const
|
|||
if (instance.size() == 1 && sig->vector_width() < ccount)
|
||||
ccount = sig->vector_width();
|
||||
|
||||
// The spin_modulus is the width of the signal (not the
|
||||
// port) if this is an instance array. This causes
|
||||
// signals wide enough for a single instance to be
|
||||
// connected to all the instances.
|
||||
unsigned spin_modulus = prts_vector_width;
|
||||
if (instance.size() != 1)
|
||||
spin_modulus = sig->vector_width();
|
||||
|
||||
// Now scan the concatenation that makes up the port,
|
||||
// connecting pins until we run out of port pins or sig
|
||||
// pins. The sig object is the NetNet that is connected
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2002-2011 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -283,15 +283,12 @@ static int compare_exp(ivl_expr_t l, ivl_expr_t r)
|
|||
|
||||
static unsigned find_expression_lookaside(ivl_expr_t expr, unsigned wid)
|
||||
{
|
||||
unsigned top;
|
||||
unsigned idx, match;
|
||||
ivl_signal_t sig;
|
||||
|
||||
if (lookaside_top <= wid)
|
||||
return 0;
|
||||
|
||||
top = lookaside_top - wid + 1;
|
||||
|
||||
/* Look in the expression lookaside for this expression. */
|
||||
assert(expr);
|
||||
match = 0;
|
||||
|
|
|
|||
|
|
@ -523,7 +523,6 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
|||
struct t_cb_data cb;
|
||||
struct vcd_info* info;
|
||||
|
||||
const char* type;
|
||||
const char* name;
|
||||
const char* ident;
|
||||
int nexus_id;
|
||||
|
|
@ -546,7 +545,6 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
|||
|
||||
switch (vpi_get(vpiType, item)) {
|
||||
|
||||
case vpiNet: type = "wire"; if(0){
|
||||
case vpiMemoryWord:
|
||||
if (vpi_get(vpiConstantSelect, item) == 0) {
|
||||
/* Turn a non-constant array word select into a
|
||||
|
|
@ -557,7 +555,8 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
|||
}
|
||||
case vpiIntegerVar:
|
||||
case vpiTimeVar:
|
||||
case vpiReg: type = "reg"; }
|
||||
case vpiReg:
|
||||
case vpiNet:
|
||||
|
||||
/* An array word is implicitly escaped so look for an
|
||||
* escaped identifier that this could conflict with. */
|
||||
|
|
@ -650,11 +649,11 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
|||
|
||||
break;
|
||||
|
||||
case vpiModule: type = "module"; if(0){
|
||||
case vpiNamedBegin: type = "begin"; }if(0){
|
||||
case vpiTask: type = "task"; }if(0){
|
||||
case vpiFunction: type = "function"; }if(0){
|
||||
case vpiNamedFork: type = "fork"; }
|
||||
case vpiModule:
|
||||
case vpiNamedBegin:
|
||||
case vpiTask:
|
||||
case vpiFunction:
|
||||
case vpiNamedFork:
|
||||
|
||||
if (depth > 0) {
|
||||
int nskip;
|
||||
|
|
@ -677,7 +676,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
|||
|
||||
name = vpi_get_str(vpiName, item);
|
||||
|
||||
push_scope(name); /* keep in type info determination for possible future usage */
|
||||
push_scope(name);
|
||||
|
||||
for (i=0; types[i]>0; i++) {
|
||||
vpiHandle hand;
|
||||
|
|
|
|||
|
|
@ -534,7 +534,6 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
|||
struct t_cb_data cb;
|
||||
struct vcd_info* info;
|
||||
|
||||
const char* type;
|
||||
const char* name;
|
||||
const char* ident;
|
||||
int nexus_id;
|
||||
|
|
@ -557,7 +556,6 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
|||
|
||||
switch (vpi_get(vpiType, item)) {
|
||||
|
||||
case vpiNet: type = "wire"; if(0){
|
||||
case vpiMemoryWord:
|
||||
if (vpi_get(vpiConstantSelect, item) == 0) {
|
||||
/* Turn a non-constant array word select into a
|
||||
|
|
@ -568,7 +566,8 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
|||
}
|
||||
case vpiIntegerVar:
|
||||
case vpiTimeVar:
|
||||
case vpiReg: type = "reg"; }
|
||||
case vpiReg:
|
||||
case vpiNet:
|
||||
|
||||
/* An array word is implicitly escaped so look for an
|
||||
* escaped identifier that this could conflict with. */
|
||||
|
|
@ -661,11 +660,11 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
|||
|
||||
break;
|
||||
|
||||
case vpiModule: type = "module"; if(0){
|
||||
case vpiNamedBegin: type = "begin"; }if(0){
|
||||
case vpiTask: type = "task"; }if(0){
|
||||
case vpiFunction: type = "function"; }if(0){
|
||||
case vpiNamedFork: type = "fork"; }
|
||||
case vpiModule:
|
||||
case vpiNamedBegin:
|
||||
case vpiTask:
|
||||
case vpiFunction:
|
||||
case vpiNamedFork:
|
||||
|
||||
if (depth > 0) {
|
||||
int nskip;
|
||||
|
|
@ -688,7 +687,7 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
|
|||
|
||||
name = vpi_get_str(vpiName, item);
|
||||
|
||||
push_scope(name); /* keep in type info determination for possible future usage */
|
||||
push_scope(name);
|
||||
|
||||
for (i=0; types[i]>0; i++) {
|
||||
vpiHandle hand;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008-2010 Stephen Williams <steve@icarus.com>
|
||||
* Copyright (c) 2008-2011 Stephen Williams <steve@icarus.com>
|
||||
* Copyright (c) 2002 Larry Doolittle (larry@doolittle.boa.org)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
|
|
@ -120,7 +120,7 @@ unsigned vpip_vec4_to_dec_str(const vvp_vector4_t&vec4,
|
|||
char *buf, unsigned int nbuf,
|
||||
int signed_flag)
|
||||
{
|
||||
unsigned int idx, len, vlen;
|
||||
unsigned int idx, vlen;
|
||||
unsigned int mbits=vec4.size(); /* number of non-sign bits */
|
||||
unsigned count_x = 0, count_z = 0;
|
||||
|
||||
|
|
@ -187,19 +187,15 @@ unsigned vpip_vec4_to_dec_str(const vvp_vector4_t&vec4,
|
|||
}
|
||||
|
||||
if (count_x == vec4.size()) {
|
||||
len = 1;
|
||||
buf[0] = 'x';
|
||||
buf[1] = 0;
|
||||
} else if (count_x > 0) {
|
||||
len = 1;
|
||||
buf[0] = 'X';
|
||||
buf[1] = 0;
|
||||
} else if (count_z == vec4.size()) {
|
||||
len = 1;
|
||||
buf[0] = 'z';
|
||||
buf[1] = 0;
|
||||
} else if (count_z > 0) {
|
||||
len = 1;
|
||||
buf[0] = 'Z';
|
||||
buf[1] = 0;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue