From: Jan Janssen Date: Thu, 23 Jun 2022 12:48:13 +0000 (+0200) Subject: boot: Fix calls to ResetSystem X-Git-Tag: v252-rc1~775 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c4ba5fef7836eb33efeb95208c0b3692a82e6004;p=thirdparty%2Fsystemd.git boot: Fix calls to ResetSystem gnu-efi falsely declares a return type for ResetSystem when it should be void. The spec also says that it never returns, so just assert. --- diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index ea80c1875dd..0d472b0386d 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -593,8 +593,8 @@ static EFI_STATUS reboot_into_firmware(void) { if (EFI_ERROR(err)) return log_error_status_stall(err, L"Error setting OsIndications: %r", err); - err = RT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL); - return log_error_status_stall(err, L"Error calling ResetSystem: %r", err); + RT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL); + assert_not_reached(); } static BOOLEAN menu_run( @@ -1986,7 +1986,8 @@ static EFI_STATUS boot_windows_bitlocker(void) { EFI_VARIABLE_NON_VOLATILE); if (EFI_ERROR(err)) return err; - return RT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL); + RT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL); + assert_not_reached(); } }