x86/build: Annotate die() with noreturn to fix build warning on clang
authorPeter Foley <pefoley2@pefoley.com>
Sat, 26 Nov 2016 22:22:29 +0000 (17:22 -0500)
committerIngo Molnar <mingo@kernel.org>
Mon, 28 Nov 2016 06:47:22 +0000 (07:47 +0100)
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>
arch/x86/tools/relocs.h

index f59590645b68641e4de9da7278b6f1c07f2e3b82..1d23bf953a4a451033f2d25a08eab2eebd751b3f 100644 (file)
@@ -16,7 +16,7 @@
 #include <regex.h>
 #include <tools/le_byteshift.h>
 
-void die(char *fmt, ...);
+void die(char *fmt, ...) __attribute__((noreturn));
 
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))