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:
Cary R 2011-10-19 14:19:57 -07:00 committed by Stephen Williams
parent 8f6062799e
commit 7a8ac008bb
4 changed files with 18 additions and 28 deletions

View File

@ -364,7 +364,6 @@ NetEConst* NetEBComp::eval_leeq_()
left_->expr_type() == IVL_VT_REAL)
return eval_leeq_real_(left_, right_, true);
// assert(expr_type() == IVL_VT_LOGIC);
// HERE
NetEConst*r = dynamic_cast<NetEConst*>(right_);
if (r == 0) return 0;
@ -1090,7 +1089,6 @@ NetEConst* NetEBShift::eval_tree()
NetEConst* NetEConcat::eval_tree()
{
// HERE
unsigned repeat_val = repeat();
unsigned local_errors = 0;
@ -1182,7 +1180,6 @@ NetEConst* NetEConcat::eval_tree()
NetEConst* NetESelect::eval_tree()
{
// HERE
if (debug_eval_tree) {
cerr << get_fileline() << ": debug: Evaluating expression:"
<< *this << endl;
@ -1846,7 +1843,6 @@ static NetExpr* evaluate_min_max(NetExpr*&arg0_, NetExpr*&arg1_,
NetExpr* NetESFunc::eval_tree()
{
// HERE
/* If we are not targeting at least Verilog-2005, Verilog-AMS
* or using the Icarus misc flag then we do not support these
* functions as constant. */

View File

@ -524,7 +524,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;
@ -547,7 +546,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
@ -563,7 +561,8 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
case vpiIntVar:
case vpiLongIntVar:
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. */
@ -656,11 +655,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;
@ -683,7 +682,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;

View File

@ -587,7 +587,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;
@ -610,7 +609,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
@ -626,7 +624,8 @@ static void scan_item(unsigned depth, vpiHandle item, int skip)
case vpiIntVar:
case vpiLongIntVar:
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. */
@ -711,11 +710,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;
@ -738,7 +737,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;

View File

@ -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
@ -121,7 +121,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;
@ -186,19 +186,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 {