[ARM] Make _kill() a noreturn function.

AngelSWI_Reason_ReportException does not return accoring to the ARM
documentation, so it is valid to mark _kill() as noreturn.  This way,
the compiler does not warn about _exit() returning a value despite
being noreturn.

2018-10-01  Christophe Lyon  <christophe.lyon@linaro.org>

	* libgloss/arm/_exit.c (_exit): Declare _kill() as noreturn.
	* libgloss/arm/_exit.c (_kill): Likewise. Remove the return
	statements.
	* newlib/libc/sys/arm/syscalls.c (_kill): Likewise..
This commit is contained in:
Christophe Lyon
2018-10-01 15:52:42 +00:00
committed by Richard Earnshaw
parent f53ce01125
commit 8a7536e91d
3 changed files with 14 additions and 9 deletions

View File

@ -2,7 +2,7 @@
#include <signal.h>
#include "swi.h"
int _kill (int, int);
int _kill (int, int) __attribute__((__noreturn__));
int
_kill (int pid, int sig)
@ -41,12 +41,14 @@ _kill (int pid, int sig)
#if SEMIHOST_V2
if (_has_ext_exit_extended ())
return do_AngelSWI (insn, block);
do_AngelSWI (insn, block);
else
#endif
return do_AngelSWI (insn, (void*)block[0]);
do_AngelSWI (insn, (void*)block[0]);
#else
asm ("swi %a0" :: "i" (SWI_Exit));
#endif
__builtin_unreachable();
}