From c033ca0cb9347ced242652591e7874f3d94d0645 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Fri, 25 Aug 2023 13:07:58 +0200 Subject: [PATCH] libpayload: Add after an if conditional on the next line Clang warns about this. Signed-off-by: Arthur Heymans Change-Id: I8bdd45a7ef47274b0253397fa8fd9409a70d2192 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77434 Tested-by: build bot (Jenkins) Reviewed-by: Martin L Roth --- payloads/libpayload/drivers/usb/usbhid.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/payloads/libpayload/drivers/usb/usbhid.c b/payloads/libpayload/drivers/usb/usbhid.c index 4ada62a9d7..12177ef2fe 100644 --- a/payloads/libpayload/drivers/usb/usbhid.c +++ b/payloads/libpayload/drivers/usb/usbhid.c @@ -265,14 +265,22 @@ usb_hid_process_keyboard_event(usbhid_inst_t *const inst, modifiers = 0; - if (current->modifiers & 0x01) /* Left-Ctrl */ modifiers |= KB_MOD_CTRL; - if (current->modifiers & 0x02) /* Left-Shift */ modifiers |= KB_MOD_SHIFT; - if (current->modifiers & 0x04) /* Left-Alt */ modifiers |= KB_MOD_ALT; - if (current->modifiers & 0x08) /* Left-GUI */; - if (current->modifiers & 0x10) /* Right-Ctrl */ modifiers |= KB_MOD_CTRL; - if (current->modifiers & 0x20) /* Right-Shift */ modifiers |= KB_MOD_SHIFT; - if (current->modifiers & 0x40) /* Right-AltGr */ modifiers |= KB_MOD_ALT; - if (current->modifiers & 0x80) /* Right-GUI */; + if (current->modifiers & 0x01) /* Left-Ctrl */ + modifiers |= KB_MOD_CTRL; + if (current->modifiers & 0x02) /* Left-Shift */ + modifiers |= KB_MOD_SHIFT; + if (current->modifiers & 0x04) /* Left-Alt */ + modifiers |= KB_MOD_ALT; + if (current->modifiers & 0x08) /* Left-GUI */ + ; + if (current->modifiers & 0x10) /* Right-Ctrl */ + modifiers |= KB_MOD_CTRL; + if (current->modifiers & 0x20) /* Right-Shift */ + modifiers |= KB_MOD_SHIFT; + if (current->modifiers & 0x40) /* Right-AltGr */ + modifiers |= KB_MOD_ALT; + if (current->modifiers & 0x80) /* Right-GUI */ + ; if ((current->modifiers & 0x05) && ((current->keys[0] == 0x4c) || (current->keys[0] == 0x63))) {