Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/lib/subcmd: Replace NORETURN usage with __noreturn

NORETURN is redundant with __noreturn, just use the latter.

Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Link: https://lore.kernel.org/r/c7c83d1e6b3d2b0c3e65dd3790c22c772d3b2527.1681853186.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>

+4 -9
+2 -6
tools/lib/subcmd/parse-options.h
··· 6 6 #include <stdbool.h> 7 7 #include <stdint.h> 8 8 9 - #ifndef NORETURN 10 - #define NORETURN __attribute__((__noreturn__)) 11 - #endif 12 - 13 9 enum parse_opt_type { 14 10 /* special types */ 15 11 OPTION_END, ··· 179 183 const char *const subcommands[], 180 184 const char *usagestr[], int flags); 181 185 182 - extern NORETURN void usage_with_options(const char * const *usagestr, 186 + extern __noreturn void usage_with_options(const char * const *usagestr, 183 187 const struct option *options); 184 - extern NORETURN __attribute__((format(printf,3,4))) 188 + extern __noreturn __attribute__((format(printf,3,4))) 185 189 void usage_with_options_msg(const char * const *usagestr, 186 190 const struct option *options, 187 191 const char *fmt, ...);
+2 -3
tools/lib/subcmd/subcmd-util.h
··· 5 5 #include <stdarg.h> 6 6 #include <stdlib.h> 7 7 #include <stdio.h> 8 - 9 - #define NORETURN __attribute__((__noreturn__)) 8 + #include <linux/compiler.h> 10 9 11 10 static inline void report(const char *prefix, const char *err, va_list params) 12 11 { ··· 14 15 fprintf(stderr, " %s%s\n", prefix, msg); 15 16 } 16 17 17 - static NORETURN inline void die(const char *err, ...) 18 + static __noreturn inline void die(const char *err, ...) 18 19 { 19 20 va_list params; 20 21