From 1fc989947a338492315b07d1abf70fce1664f1b1 Mon Sep 17 00:00:00 2001 From: tmk Date: Fri, 2 Mar 2018 14:09:09 +0900 Subject: [PATCH] xt_usb: Fix warning on switch-case --- tmk_core/protocol/xt_interrupt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/protocol/xt_interrupt.c b/tmk_core/protocol/xt_interrupt.c index 97e93a5a..525dbcf2 100644 --- a/tmk_core/protocol/xt_interrupt.c +++ b/tmk_core/protocol/xt_interrupt.c @@ -94,7 +94,7 @@ ISR(XT_INT_VECT) * https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol */ static enum { - START, BIT0, BIT1, BIT2, BIT3, BIT4, BIT5, BIT6, BIT7, END + START, BIT0, BIT1, BIT2, BIT3, BIT4, BIT5, BIT6, BIT7 } state = START; static uint8_t data = 0; @@ -114,7 +114,7 @@ ISR(XT_INT_VECT) data |= 0x80; break; } - if (++state == END) { + if (state++ == BIT7) { pbuf_enqueue(data); state = START; data = 0; -- 2.44.0