Project

General

Profile

Actions

Bug #9771

closed

loader.efi: 'handles' is used uninitialized in comconsole.c

Added by Toomas Soome over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
2018-08-27
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

Build error when warnings are enabled:

    ../comconsole.c: In function 'efi_serial_init':
    ../comconsole.c:132:9: warning: 'handles' is used uninitialized in this function [-Wuninitialized]
      status = BS->LocateHandle(ByProtocol, &serial, NULL, &bufsz, handles);
      ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It should be harmless because we are asking for size for the handles array (bufsz is set to 0), but lets play safe and also set handles to NULL.

Actions

Also available in: Atom PDF