[U-Boot] [PATCH v3 01/21] efi: Init the 'rows' and 'cols' variables

Simon Glass sjg at chromium.org
Mon Feb 19 15:48:07 UTC 2018


The current code causes a compiler error on gcc 4.8.4 as used by sandbox
on Ubuntu 14.04, which is fairly recent. Init these variables to fix the
problem.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v3:
- Add new patch to init the 'rows' and 'cols' variables

Changes in v2: None

 lib/efi_loader/efi_console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index 28d63635ec..971e36da48 100644
--- a/lib/efi_loader/efi_console.c
+++ b/lib/efi_loader/efi_console.c
@@ -242,7 +242,7 @@ static efi_status_t EFIAPI efi_cout_query_mode(
 
 	if (!console_size_queried) {
 		const char *stdout_name = env_get("stdout");
-		int rows, cols;
+		int rows = 0, cols = 0;
 
 		console_size_queried = true;
 
-- 
2.16.1.291.g4437f3f132-goog



More information about the U-Boot mailing list