[U-Boot] [PATCH v4 01/16] efi: Init the 'rows' and 'cols' variables
Heinrich Schuchardt
xypron.glpk at gmx.de
Wed May 16 16:21:42 UTC 2018
On 05/16/2018 05:42 PM, Simon Glass wrote:
> 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>
This patch may silence the compiler but does not solve the bug leading
to the possible usage of unintialized values. See
https://lists.denx.de/pipermail/u-boot/2018-May/328762.html
Best regards
Heinrich Schuchardt
> ---
>
> Changes in v4:
> - Move the fix to query_console_serial()
>
> Changes in v3:
> - Add new patch to init the 'rows' and 'cols' variables
>
> Changes in v2: None
>
> lib/efi_loader/efi_console.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
> index d777db8a3ed..001f68df0a7 100644
> --- a/lib/efi_loader/efi_console.c
> +++ b/lib/efi_loader/efi_console.c
> @@ -185,8 +185,11 @@ static int query_console_serial(int *rows, int *cols)
> return -1;
>
> /* Read {depth,rows,cols} */
> - if (term_read_reply(n, 3, 't'))
> + if (term_read_reply(n, 3, 't')) {
> + *rows = -1;
> + *cols = -1;
> return -1;
> + }
>
> *cols = n[2];
> *rows = n[1];
>
More information about the U-Boot
mailing list