diff options
author | Toomas Soome <tsoome@me.com> | 2019-08-13 13:20:58 +0300 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-08-14 22:22:49 +0300 |
commit | c6dd35daf6754ceadffe27f721e78fec1f894036 (patch) | |
tree | d7eecb67c061b0c926b4b1e6d97b965ac20589d6 /usr/src | |
parent | bf8d275a3639b21395ae091b2ec762346fc931f6 (diff) | |
download | illumos-joyent-c6dd35daf6754ceadffe27f721e78fec1f894036.tar.gz |
11549 loader: smatch error: efi_cons_cursor(): uninitialized symbol 'row' and 'col'
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: John Levon <john.levon@joyent.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/boot/Makefile.version | 2 | ||||
-rw-r--r-- | usr/src/boot/sys/boot/efi/libefi/efi_console.c | 19 | ||||
-rw-r--r-- | usr/src/boot/sys/boot/efi/libefi/i386/Makefile | 3 |
3 files changed, 11 insertions, 13 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version index 50fbef1c79..e13aba8f05 100644 --- a/usr/src/boot/Makefile.version +++ b/usr/src/boot/Makefile.version @@ -33,4 +33,4 @@ LOADER_VERSION = 1.1 # Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes. # The version is processed from left to right, the version number can only # be increased. -BOOT_VERSION = $(LOADER_VERSION)-2019.08.07.1 +BOOT_VERSION = $(LOADER_VERSION)-2019.08.13.1 diff --git a/usr/src/boot/sys/boot/efi/libefi/efi_console.c b/usr/src/boot/sys/boot/efi/libefi/efi_console.c index a4bc6a27ec..1e60d2488a 100644 --- a/usr/src/boot/sys/boot/efi/libefi/efi_console.c +++ b/usr/src/boot/sys/boot/efi/libefi/efi_console.c @@ -57,7 +57,7 @@ struct efi_console_data { }; #define KEYBUFSZ 10 -static unsigned keybuf[KEYBUFSZ]; /* keybuf for extended codes */ +static unsigned keybuf[KEYBUFSZ]; /* keybuf for extended codes */ static int key_pending; @@ -218,12 +218,12 @@ plat_cons_update_mode(int mode) } if (console_control != NULL) - (void)console_control->SetMode(console_control, console_mode); + (void) console_control->SetMode(console_control, console_mode); /* some firmware enables the cursor when switching modes */ conout->EnableCursor(conout, FALSE); if (console_mode == EfiConsoleControlScreenText) { - (void)conout->QueryMode(conout, conout->Mode->Mode, + (void) conout->QueryMode(conout, conout->Mode->Mode, &cols, &rows); devinit.version = VIS_CONS_REV; devinit.width = cols; @@ -275,7 +275,7 @@ efi_text_devinit(struct vis_devinit *data) if (console_mode != EfiConsoleControlScreenText) return (1); - (void)conout->QueryMode(conout, conout->Mode->Mode, &cols, &rows); + (void) conout->QueryMode(conout, conout->Mode->Mode, &cols, &rows); data->version = VIS_CONS_REV; data->width = cols; data->height = rows; @@ -328,7 +328,7 @@ efi_text_cons_display(struct vis_consdisplay *da) tem_char_t *data; int i; - (void)conout->QueryMode(conout, conout->Mode->Mode, &col, &row); + (void) conout->QueryMode(conout, conout->Mode->Mode, &col, &row); /* reduce clear line on bottom row by one to prevent autoscroll */ if (row - 1 == da->row && da->col == 0 && da->width == col) @@ -365,6 +365,7 @@ static void efi_cons_cursor(struct vis_conscursor *cc) case VIS_GET_CURSOR: { /* only used at startup */ uint32_t row, col; + row = col = 0; plat_tem_get_prom_pos(&row, &col); cc->row = row; cc->col = col; @@ -475,7 +476,7 @@ efi_cons_init(struct console *cp, int arg __unused) memset(keybuf, 0, KEYBUFSZ); status = BS->LocateProtocol(&ccontrol_protocol_guid, NULL, - (VOID **)&console_control); + (void **)&console_control); if (status == EFI_SUCCESS) { BOOLEAN GopUgaExists, StdInLocked; status = console_control->GetMode(console_control, @@ -485,7 +486,7 @@ efi_cons_init(struct console *cp, int arg __unused) } max_dim = best_mode = 0; - for (i = 0; i <= conout->Mode->MaxMode ; i++) { + for (i = 0; i <= conout->Mode->MaxMode; i++) { status = conout->QueryMode(conout, i, &cols, &rows); if (EFI_ERROR(status)) continue; @@ -518,7 +519,7 @@ efi_cons_init(struct console *cp, int arg __unused) } if (console_control != NULL) - (void)console_control->SetMode(console_control, console_mode); + (void) console_control->SetMode(console_control, console_mode); /* some firmware enables the cursor when switching modes */ conout->EnableCursor(conout, FALSE); @@ -742,7 +743,7 @@ efi_cons_efiputchar(int c) EFI_STATUS status; buf[0] = c; - buf[1] = 0; /* terminate string */ + buf[1] = 0; /* terminate string */ status = conout->TestString(conout, buf); if (EFI_ERROR(status)) diff --git a/usr/src/boot/sys/boot/efi/libefi/i386/Makefile b/usr/src/boot/sys/boot/efi/libefi/i386/Makefile index cc749255bd..60274fab76 100644 --- a/usr/src/boot/sys/boot/efi/libefi/i386/Makefile +++ b/usr/src/boot/sys/boot/efi/libefi/i386/Makefile @@ -24,9 +24,6 @@ include ../Makefile.com CFLAGS += -m32 -# false positive only with a 64-bit smatch -SMOFF += uninitialized - CLEANFILES += machine x86 $(OBJS): machine x86 |