From 70d3b1028a6ad6ac7774939a675c14b10dbe45f0 Mon Sep 17 00:00:00 2001 From: PulkoMandy Date: Mon, 24 Jul 2023 14:54:06 +0200 Subject: [PATCH] ps2: mark unused-but-set variable unused to avoid warning Change-Id: If0073d878cfe4c37ea61bc10459e698ebbb47897 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6712 Reviewed-by: Fredrik Holmqvist --- src/add-ons/kernel/bus_managers/ps2/ps2_common.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/add-ons/kernel/bus_managers/ps2/ps2_common.cpp b/src/add-ons/kernel/bus_managers/ps2/ps2_common.cpp index 82a93ff3d0..905c75c747 100644 --- a/src/add-ons/kernel/bus_managers/ps2/ps2_common.cpp +++ b/src/add-ons/kernel/bus_managers/ps2/ps2_common.cpp @@ -21,8 +21,10 @@ //#define TRACE_PS2_COMMON #ifdef TRACE_PS2_COMMON # define TRACE(x...) dprintf(x) +# define TRACE_ONLY #else # define TRACE(x...) +# define TRACE_ONLY __attribute__((unused)) #endif @@ -105,7 +107,7 @@ ps2_flush(void) for (i = 0; i < 64; i++) { uint8 ctrl; - uint8 data; + uint8 data TRACE_ONLY; ctrl = ps2_read_ctrl(); if (!(ctrl & PS2_STATUS_OUTPUT_BUFFER_FULL)) break;