From 6dd8dac9368539abca0315601198880afa2d203a Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Fri, 14 Aug 2015 12:29:55 +0200 Subject: define uninitialized_var --- libdde-linux26/contrib/include/linux/compiler-gcc5.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libdde-linux26') diff --git a/libdde-linux26/contrib/include/linux/compiler-gcc5.h b/libdde-linux26/contrib/include/linux/compiler-gcc5.h index efee4937..00cb5759 100644 --- a/libdde-linux26/contrib/include/linux/compiler-gcc5.h +++ b/libdde-linux26/contrib/include/linux/compiler-gcc5.h @@ -6,6 +6,12 @@ #define __must_check __attribute__((warn_unused_result)) #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) +/* + * A trick to suppress uninitialized variable warning without generating any + * code + */ +#define uninitialized_var(x) x = x + /* Mark functions as cold. gcc will assume any path leading to a call to them will be unlikely. This means a lot of manual unlikely()s are unnecessary now for any paths leading to the usual suspects -- cgit v1.2.3