Re: [PATCH rt-tests 8/9] error: mark fatal, err_exit, err_quit as being noreturn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 31 Aug 2015, Josh Cartwright wrote:

> These functions never return to their caller.  Mark them as such to aide
> in code generation and help out static analysis.
> 
> Signed-off-by: Josh Cartwright <joshc@xxxxxx>
> ---
>  src/include/error.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/include/error.h b/src/include/error.h
> index ae05a2e..4acff49 100644
> --- a/src/include/error.h
> +++ b/src/include/error.h
> @@ -6,14 +6,14 @@
>  #include <stdarg.h>
>  #include <string.h>
>  
> -void err_exit(int err, char *fmt, ...);
> +void err_exit(int err, char *fmt, ...) __attribute__((noreturn));
>  void err_msg(char *fmt, ...);
>  void err_msg_n(int err, char *fmt, ...);
> -void err_quit(char *fmt, ...);
> +void err_quit(char *fmt, ...) __attribute__((noreturn));
>  void debug(char *fmt, ...);
>  void info(char *fmt, ...);
>  void warn(char *fmt, ...);
> -void fatal(char *fmt, ...);
> +void fatal(char *fmt, ...) __attribute__((noreturn));
>  void err_doit(int err, const char *fmt, va_list ap);
>  
>  #endif	/* __ERROR_H */
> -- 
> 2.5.0
> 
> --
Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux