Add some casts in main directory to remove warnings.
The Cygwin compiler is a bit picky. This patch adds some casts to remove compilation warnings. In the past I have had warnings off because of problems with the STL, but for this directory we mas as well remove the warnings we can. It also does not recognize that an assert(0) or assert(false) ends a routine so it complains about no return at end of function or variables not being defined.
This commit is contained in:
parent
1f375ef16a
commit
81d4cbc4bd
|
|
@ -3111,6 +3111,7 @@ NetProc* PEventStatement::elaborate_st(Design*des, NetScope*scope,
|
|||
break;
|
||||
|
||||
default:
|
||||
pr = NULL;
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -381,6 +381,7 @@ NetEConst* NetEBComp::eval_leeq_real_(NetExpr*le, NetExpr*ri, bool eq_flag)
|
|||
break;
|
||||
|
||||
default:
|
||||
lv = 0.0;
|
||||
cerr << get_fileline() << ": internal error: "
|
||||
<< "Unexpected expression type? " << le->expr_type() << endl;
|
||||
assert(0);
|
||||
|
|
@ -401,6 +402,7 @@ NetEConst* NetEBComp::eval_leeq_real_(NetExpr*le, NetExpr*ri, bool eq_flag)
|
|||
break;
|
||||
|
||||
default:
|
||||
rv = 0.0;
|
||||
cerr << get_fileline() << ": internal error: "
|
||||
<< "Unexpected expression type? " << ri->expr_type() << endl;
|
||||
assert(0);
|
||||
|
|
@ -585,6 +587,7 @@ NetEConst* NetEBComp::eval_eqeq_real_(NetExpr*le, NetExpr*ri, bool ne_flag)
|
|||
break;
|
||||
|
||||
default:
|
||||
lv = 0.0;
|
||||
cerr << get_fileline() << ": internal error: "
|
||||
<< "Unexpected expression type? " << le->expr_type() << endl;
|
||||
assert(0);
|
||||
|
|
@ -605,6 +608,7 @@ NetEConst* NetEBComp::eval_eqeq_real_(NetExpr*le, NetExpr*ri, bool ne_flag)
|
|||
break;
|
||||
|
||||
default:
|
||||
rv = 0.0;
|
||||
cerr << get_fileline() << ": internal error: "
|
||||
<< "Unexpected expression type? " << ri->expr_type() << endl;
|
||||
assert(0);
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ NetNet* NetEBBits::synthesize(Design*des, NetScope*scope, NetExpr*root)
|
|||
gate = new NetLogic(scope, oname, 3, NetLogic::XNOR, width);
|
||||
break;
|
||||
default:
|
||||
gate = NULL;
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
@ -863,6 +864,7 @@ NetNet* NetEUBits::synthesize(Design*des, NetScope*scope, NetExpr*root)
|
|||
gate = new NetLogic(scope, oname, 2, NetLogic::NOT, width);
|
||||
break;
|
||||
default:
|
||||
gate = NULL;
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2608,6 +2608,7 @@ static DelayType get_loop_delay_type(const NetExpr*expr, const NetProc*proc)
|
|||
/* This should never happen since delay_type_from_expr() only
|
||||
* returns three different values. */
|
||||
default:
|
||||
result = NO_DELAY;
|
||||
assert(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -448,6 +448,7 @@ const char *human_readable_op(const char op, bool unary)
|
|||
|
||||
case 'p': type = "**"; break; // Power
|
||||
default:
|
||||
type = "???";
|
||||
assert(0);
|
||||
}
|
||||
return type;
|
||||
|
|
|
|||
|
|
@ -545,6 +545,8 @@ extern "C" unsigned long ivl_expr_uvalue(ivl_expr_t net)
|
|||
assert(0);
|
||||
}
|
||||
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" ivl_variable_type_t ivl_expr_value(ivl_expr_t net)
|
||||
|
|
|
|||
Loading…
Reference in New Issue