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 | c7d2507fc455421429a531d722947ab415259c77 (patch) | |
tree | 52609a956ec9e3bd1f1274aa9d799597866bfcd1 /arch/x86/machine | |
parent | 303ed5305f8dae17ab46aa1e0dc6086d4277808c (diff) |
Revert "Make assert have no side effects"
This reverts commit d18d0e85596f90e0bd597b33d58209d0b3973c95.
Diffstat (limited to 'arch/x86/machine')
-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)); |