Skip to content

Commit adee870

Browse files
pefoley2ingomolnar
authored andcommitted
x86/build: Annotate die() with noreturn to fix build warning on clang
Fixes below warning with clang: In file included from ../arch/x86/tools/relocs_64.c:17: ../arch/x86/tools/relocs.c:977:6: warning: variable 'do_reloc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] Signed-off-by: Peter Foley <pefoley2@pefoley.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20161126222229.673-1-pefoley2@pefoley.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 20ab667 commit adee870

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/tools/relocs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <regex.h>
1717
#include <tools/le_byteshift.h>
1818

19-
void die(char *fmt, ...);
19+
void die(char *fmt, ...) __attribute__((noreturn));
2020

2121
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
2222

0 commit comments

Comments
 (0)