Eliminate a few new compiler warnings.

This commit is contained in:
Martin Whitaker 2015-05-04 22:32:29 +01:00
parent a27274aa04
commit 1b3e321d35
4 changed files with 5 additions and 3 deletions

View File

@ -374,6 +374,8 @@ NetScope::param_ref_t NetScope::find_parameter(perm_string key)
// To get here the parameter must already exist, so we should
// never get here.
assert(0);
// But return something to avoid a compiler warning.
return idx;
}
NetScope::TYPE NetScope::type() const

View File

@ -772,7 +772,7 @@ bool NetCase::synth_async_casez_(Design*des, NetScope*scope,
netvector_t*condit_type = new netvector_t(IVL_VT_LOGIC, 0, 0);
NetCaseCmp::kind_t case_kind;
NetCaseCmp::kind_t case_kind = NetCaseCmp::EEQ;
switch (type()) {
case NetCase::EQ:
case_kind = NetCaseCmp::EEQ;

View File

@ -380,7 +380,7 @@ static void show_lpm_divide(ivl_lpm_t net)
*/
static void show_lpm_cmp_eeq(ivl_lpm_t net)
{
const char*str;
const char*str = 0;
switch (ivl_lpm_type(net)) {
case IVL_LPM_CMP_EEQ:
str = "EEQ";

View File

@ -942,7 +942,7 @@ static void emit_stmt_block_named(ivl_scope_t scope, ivl_statement_t stmt)
static void emit_stmt_case(ivl_scope_t scope, ivl_statement_t stmt)
{
const char *case_type;
const char *case_type = 0;
unsigned idx, default_case, count = ivl_stmt_case_count(stmt);
switch (ivl_statement_type(stmt)) {
case IVL_ST_CASE: