Skip to content

Commit

Permalink
LLVMLinux: Remove warning about returning an uninitialized variable
Browse files Browse the repository at this point in the history
Fix uninitialized return code in default case in cmpxchg-local.h

This patch fixes the code to prevent an uninitialized return value that is detected
when compiling with clang. The bug produces numerous warnings when compiling the
Linux kernel with clang.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Behan Webster committed Apr 9, 2014
1 parent db46293 commit aa93685
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/asm-generic/cmpxchg-local.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#include <linux/types.h>
#include <linux/irqflags.h>

extern unsigned long wrong_size_cmpxchg(volatile void *ptr);
extern unsigned long wrong_size_cmpxchg(volatile void *ptr)
__noreturn;

/*
* Generic version of __cmpxchg_local (disables interrupts). Takes an unsigned
Expand Down

0 comments on commit aa93685

Please sign in to comment.