All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] LLVMLinux: Remove warning about returning an uninitialized variable
@ 2014-03-22  6:38 behanw
  2014-03-22 10:01 ` Arnd Bergmann
  2014-03-31 20:52 ` [PATCH] " H. Peter Anvin
  0 siblings, 2 replies; 19+ messages in thread
From: behanw @ 2014-03-22  6:38 UTC (permalink / raw)
  To: arnd
  Cc: linux-arch, linux-kernel, dwmw2, pageexec, Behan Webster,
	Mark Charlebois

From: Behan Webster <behanw@converseincode.com>

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>
---
 include/asm-generic/cmpxchg-local.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/asm-generic/cmpxchg-local.h b/include/asm-generic/cmpxchg-local.h
index d8d4c89..4c41bb8 100644
--- a/include/asm-generic/cmpxchg-local.h
+++ b/include/asm-generic/cmpxchg-local.h
@@ -41,6 +41,7 @@ static inline unsigned long __cmpxchg_local_generic(volatile void *ptr,
 		break;
 	default:
 		wrong_size_cmpxchg(ptr);
+		prev = 0;
 	}
 	raw_local_irq_restore(flags);
 	return prev;
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2014-03-31 22:20 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-22  6:38 [PATCH] LLVMLinux: Remove warning about returning an uninitialized variable behanw
2014-03-22 10:01 ` Arnd Bergmann
2014-03-22 15:45   ` Behan Webster
2014-03-22 15:48   ` [PATCH v2] " behanw
2014-03-22 16:21     ` Sam Ravnborg
2014-03-22 16:31       ` Behan Webster
2014-03-22 16:35       ` [PATCH v3] " behanw
2014-03-22 16:29     ` [PATCH v2] " James Bottomley
2014-03-22 16:37       ` Behan Webster
2014-03-22 16:42         ` James Bottomley
2014-03-23  6:32           ` Behan Webster
2014-03-24  5:53           ` [PATCH v4] " behanw
2014-03-25 17:16             ` Arnd Bergmann
2014-03-24  9:46           ` David Howells
2014-03-31 20:52 ` [PATCH] " H. Peter Anvin
2014-03-31 22:10   ` Behan Webster
2014-03-31 22:11     ` H. Peter Anvin
2014-03-31 22:16       ` Behan Webster
2014-03-31 22:19         ` H. Peter Anvin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.