From a0c63ebb92b54a13b2f96edca5b21ca4263dd87f Mon Sep 17 00:00:00 2001 From: kamkow1 Date: Tue, 17 Feb 2026 00:43:13 +0100 Subject: [PATCH] Suppress unused variable warnings --- kernel/device/ps2_kb.c | 6 ++++-- kernel/device/ramdrv.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/device/ps2_kb.c b/kernel/device/ps2_kb.c index 4d31332..3947022 100644 --- a/kernel/device/ps2_kb.c +++ b/kernel/device/ps2_kb.c @@ -166,6 +166,8 @@ static int32_t ps2kb_keycode (void) { } static bool ps2kb_irq (struct cpu** reschedule_cpu, void* arg, void* regs) { + (void)arg, (void)regs; + int32_t keycode = ps2kb_keycode (); if (keycode <= 0) @@ -196,7 +198,7 @@ static bool ps2kb_irq (struct cpu** reschedule_cpu, void* arg, void* regs) { int ps2kb_read_key (struct device* device, struct device_op_ctx* op_ctx, void* a1, void* a2, void* a3, void* a4) { - (void)device; + (void)device, (void)a2, (void)a3, (void)a4; if ((op_ctx->proc != NULL) && !(op_ctx->proc->procgroup->capabilities & PROC_CAP_KB)) return -ST_PERMISSION_ERROR; @@ -224,7 +226,7 @@ int ps2kb_read_key (struct device* device, struct device_op_ctx* op_ctx, void* a } bool ps2kb_init (struct device* device, void* arg) { - (void)device; + (void)device, (void)arg; amd64_ioapic_route_irq (PS2KB, 1, 0, thiscpu->lapic_id); irq_attach (&ps2kb_irq, NULL, PS2KB); diff --git a/kernel/device/ramdrv.c b/kernel/device/ramdrv.c index f30a0e8..6378de7 100644 --- a/kernel/device/ramdrv.c +++ b/kernel/device/ramdrv.c @@ -91,6 +91,8 @@ int ramdrv_get_sector_size (struct device* device, struct device_op_ctx* op_ctx, int ramdrv_read (struct device* device, struct device_op_ctx* op_ctx, void* a1, void* a2, void* a3, void* a4) { + (void)op_ctx, (void)a4; + if (a1 == NULL || a2 == NULL || a3 == NULL) return -ST_BAD_ADDRESS_SPACE;