From 6fd4e6e4d01122a0b0121723811196ece4a75b40 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 29 Feb 2012 15:06:39 +0100 Subject: [PATCH] * grub-core/commands/i386/pc/halt.c (grub_halt): Add noreturn attribute. (grub_cmd_halt): Likewise. --- ChangeLog | 5 +++++ grub-core/commands/i386/pc/halt.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 679849158..c1c594fe5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-29 Vladimir Serbinenko + + * grub-core/commands/i386/pc/halt.c (grub_halt): Add noreturn attribute. + (grub_cmd_halt): Likewise. + 2012-02-29 Vladimir Serbinenko * grub-core/lib/i386/relocator16.S: Declare LOCAL(relocator16_end) diff --git a/grub-core/commands/i386/pc/halt.c b/grub-core/commands/i386/pc/halt.c index e7c191de3..1e7c2c9b3 100644 --- a/grub-core/commands/i386/pc/halt.c +++ b/grub-core/commands/i386/pc/halt.c @@ -44,7 +44,7 @@ stop (void) * Halt the system, using APM if possible. If NO_APM is true, don't use * APM even if it is available. */ -void +void __attribute__ ((noreturn)) grub_halt (int no_apm) { struct grub_bios_int_registers regs; @@ -97,7 +97,7 @@ grub_halt (int no_apm) stop (); } -static grub_err_t +static grub_err_t __attribute__ ((noreturn)) grub_cmd_halt (grub_extcmd_context_t ctxt, int argc __attribute__ ((unused)), char **args __attribute__ ((unused))) @@ -109,7 +109,6 @@ grub_cmd_halt (grub_extcmd_context_t ctxt, if (state[0].set) no_apm = 1; grub_halt (no_apm); - return 0; } static grub_extcmd_t cmd;