1
0
mirror of https://github.com/systemd/systemd synced 2026-03-31 12:14:57 +02:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
97c373c7de
Merge pull request #21065 from keszybz/efi-warnings
Clean up unused variables in efi code
2021-10-21 08:33:08 +02:00
Yu Watanabe
1c15c3653e network: drop unnecessary header inclusion 2021-10-21 08:32:04 +02:00
Zbigniew Jędrzejewski-Szmek
2fffe2ed19 efi: check input parameter
clang complained about an unused variable. We cast the buffer to
struct boot_params, so let's check that it's at least this long.
2021-10-20 14:20:44 +02:00
Zbigniew Jędrzejewski-Szmek
f3611cfb0b efi: drop two unused variables
It seems the code was added in 2553a5482c77980429565d14662f309e385bd472 and
those two were never used for anything.
2021-10-20 13:58:03 +02:00
3 changed files with 3 additions and 4 deletions

View File

@ -82,7 +82,6 @@ EFI_STATUS load_drivers(
_cleanup_(FileHandleClosep) EFI_FILE_HANDLE drivers_dir = NULL;
_cleanup_freepool_ EFI_FILE_INFO *dirent = NULL;
_cleanup_freepool_ EFI_DEVICE_PATH *path = NULL;
UINTN dirent_size = 0, n_succeeded = 0;
EFI_STATUS err;
@ -96,8 +95,6 @@ EFI_STATUS load_drivers(
return log_error_status_stall(err, L"Failed to open \\EFI\\systemd\\drivers: %r", err);
for (;;) {
_cleanup_freepool_ CHAR16 *d = NULL;
err = readdir_harder(drivers_dir, &dirent, &dirent_size);
if (EFI_ERROR(err))
return log_error_status_stall(err, L"Failed to read extra directory of loaded image: %r", err);

View File

@ -138,6 +138,9 @@ EFI_STATUS linux_exec(
assert(linux_buffer);
assert(initrd_buffer || initrd_length == 0);
if (linux_length < sizeof(struct boot_params))
return EFI_LOAD_ERROR;
image_params = (const struct boot_params *) linux_buffer;
if (image_params->hdr.boot_flag != 0xAA55 ||

View File

@ -25,7 +25,6 @@
#include "siphash24.h"
#include "string-table.h"
#include "string-util.h"
#include "radv-internal.h"
bool link_dhcp6_with_address_enabled(Link *link) {
if (!link_dhcp6_enabled(link))