mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
Replace assert(0) with abort() or cpu_abort()
When building with -DNDEBUG, assert(0) will not stop execution so it must not be used for abnormal termination. Use cpu_abort() when in CPU context, abort() otherwise. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
609c1daced
commit
43dc2a645e
13 changed files with 56 additions and 56 deletions
|
@ -105,7 +105,7 @@ int sh_intc_get_pending_vector(struct intc_desc *desc, int imask)
|
|||
}
|
||||
}
|
||||
|
||||
assert(0);
|
||||
abort();
|
||||
}
|
||||
|
||||
#define INTC_MODE_NONE 0
|
||||
|
@ -181,7 +181,7 @@ static void sh_intc_locate(struct intc_desc *desc,
|
|||
}
|
||||
}
|
||||
|
||||
assert(0);
|
||||
abort();
|
||||
}
|
||||
|
||||
static void sh_intc_toggle_mask(struct intc_desc *desc, intc_enum id,
|
||||
|
@ -260,7 +260,7 @@ static void sh_intc_write(void *opaque, target_phys_addr_t offset,
|
|||
case INTC_MODE_ENABLE_REG | INTC_MODE_IS_PRIO: break;
|
||||
case INTC_MODE_DUAL_SET: value |= *valuep; break;
|
||||
case INTC_MODE_DUAL_CLR: value = *valuep & ~value; break;
|
||||
default: assert(0);
|
||||
default: abort();
|
||||
}
|
||||
|
||||
for (k = 0; k <= first; k++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue