[SeaBIOS] [PATCH] kbd: Fix compilation with Chrome OS toolchain

Paul Menzel posted 1 patch 4 years, 1 month ago
Failed in applying to current master (apply log)
src/kbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[SeaBIOS] [PATCH] kbd: Fix compilation with Chrome OS toolchain
Posted by Paul Menzel 4 years, 1 month ago
From: Stefan Reinauer <reinauer@chromium.org>
Date: Tue, 4 Nov 2014 16:16:46 -0800

gcc complains about using potentially unused variables.

BUG=none
BRANCH=none
TEST=emerge-panther chromeos-seabios builds an image again

Signed-off-by: Stefan Reinauer <reinauer@google.com>
Change-Id: I6c3d556a6519a5baa3a345e4dcb33b37b22db1b3
Reviewed-on: https://chromium-review.googlesource.com/227520
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
---
  src/kbd.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kbd.c b/src/kbd.c
index 15e5ae7..3f08d32 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -162,7 +162,7 @@ handle_1609(struct bregs *regs)
  static void noinline
  handle_160a(struct bregs *regs)
  {
-    u8 param[2];
+    u8 param[2] = { 0, 0 };
      int ret = kbd_command(ATKBD_CMD_GETID, param);
      if (ret) {
          regs->bx = 0;
-- 
2.25.1
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] kbd: Fix compilation with Chrome OS toolchain
Posted by Gerd Hoffmann 4 years, 1 month ago
  Hi,

> gcc complains about using potentially unused variables.

> -    u8 param[2];
> +    u8 param[2] = { 0, 0 };
>      int ret = kbd_command(ATKBD_CMD_GETID, param);

Looks good.  Patch doesn't apply.

cheers,
  Gerd
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org