summaryrefslogtreecommitdiff
path: root/arch/x86/machine
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/machine')
-rw-r--r--arch/x86/machine/cga.c4
-rw-r--r--arch/x86/machine/cpu.c4
-rw-r--r--arch/x86/machine/ioapic.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/machine/cga.c b/arch/x86/machine/cga.c
index b519ba1f..d086326d 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;
- int error;
+ __unused 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;
- int error;
+ __unused int error;
cga_bbuf_reset_view(bbuf);
diff --git a/arch/x86/machine/cpu.c b/arch/x86/machine/cpu.c
index 98d3680e..e971d99c 100644
--- a/arch/x86/machine/cpu.c
+++ b/arch/x86/machine/cpu.c
@@ -466,7 +466,9 @@ cpu_init(struct cpu *cpu)
cpu->phys_addr_width = 0;
cpu->virt_addr_width = 0;
- assert(max_basic >= 1);
+ if (max_basic == 0) {
+ panic("cpu: unsupported maximum input value for basic information");
+ }
eax = 1;
cpu_cpuid(&eax, &ebx, &ecx, &edx);
diff --git a/arch/x86/machine/ioapic.c b/arch/x86/machine/ioapic.c
index 82fbd6d5..d70ec92b 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;
}
-static bool
+__unused static bool
ioapic_has_gsi(const struct ioapic *ioapic, unsigned int gsi)
{
return ((gsi >= ioapic->first_gsi) && (gsi <= ioapic->last_gsi));