summaryrefslogtreecommitdiff
path: root/libdde-linux26
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-14 12:29:55 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-08-14 12:29:55 +0200
commit6dd8dac9368539abca0315601198880afa2d203a (patch)
tree4421be8ebe12d44b3663d7a17ac2e66dd679425c /libdde-linux26
parentdfeef5fd4fc2ea8705329e93a6ffbf198319556d (diff)
define uninitialized_var
Diffstat (limited to 'libdde-linux26')
-rw-r--r--libdde-linux26/contrib/include/linux/compiler-gcc5.h6
1 files changed, 6 insertions, 0 deletions
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