diff options
author | Richard Braun <rbraun@sceen.net> | 2017-12-03 15:11:23 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-12-03 15:11:23 +0100 |
commit | e52e3dedf9639b2451c48ba2a29f3eb735d6b855 (patch) | |
tree | 52609a956ec9e3bd1f1274aa9d799597866bfcd1 /arch | |
parent | 68aed78bfcf6907451903d8d7d80d207a6b0695f (diff) |
Revert "Make assert have no side effects"
This reverts commit 9c7906d8ad6ebec014b22b8757d916e9cad7d6d3.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/machine/cga.c | 4 | ||||
-rw-r--r-- | arch/x86/machine/cpu.c | 4 | ||||
-rw-r--r-- | arch/x86/machine/ioapic.c | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/machine/cga.c b/arch/x86/machine/cga.c index d086326..b519ba1 100644 --- a/arch/x86/machine/cga.c +++ b/arch/x86/machine/cga.c @@ -216,7 +216,7 @@ static void cga_bbuf_redraw(struct cga_bbuf *bbuf) { size_t size; - __unused int error; + int error; size = CGA_MEMORY_SIZE; error = cbuf_read(&bbuf->cbuf, bbuf->view, cga_memory, &size); @@ -298,7 +298,7 @@ cga_bbuf_newline(struct cga_bbuf *bbuf) { uint16_t cursor = 0, spaces[CGA_COLUMNS]; size_t i, nr_spaces, offset, size; - __unused int error; + int error; cga_bbuf_reset_view(bbuf); diff --git a/arch/x86/machine/cpu.c b/arch/x86/machine/cpu.c index e971d99..98d3680 100644 --- a/arch/x86/machine/cpu.c +++ b/arch/x86/machine/cpu.c @@ -466,9 +466,7 @@ cpu_init(struct cpu *cpu) cpu->phys_addr_width = 0; cpu->virt_addr_width = 0; - if (max_basic == 0) { - panic("cpu: unsupported maximum input value for basic information"); - } + assert(max_basic >= 1); eax = 1; cpu_cpuid(&eax, &ebx, &ecx, &edx); diff --git a/arch/x86/machine/ioapic.c b/arch/x86/machine/ioapic.c index d70ec92..82fbd6d 100644 --- a/arch/x86/machine/ioapic.c +++ b/arch/x86/machine/ioapic.c @@ -209,7 +209,7 @@ ioapic_create(unsigned int apic_id, uintptr_t addr, unsigned int gsi_base) return ioapic; } -__unused static bool +static bool ioapic_has_gsi(const struct ioapic *ioapic, unsigned int gsi) { return ((gsi >= ioapic->first_gsi) && (gsi <= ioapic->last_gsi)); |