lkml.org 
[lkml]   [2018]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] compiler-gcc: hide COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW from sparse
Date
From: Johannes Berg <johannes.berg@intel.com>

Sparse doesn't support all the overflow builtins, so just hide
them from it to avoid lots of warnings/errors reported by it.

We could try to teach them to sparse, but the passed types are
variable, and sparse doesn't seem to handle that well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
include/linux/compiler-gcc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 2010493e1040..3154f2a84571 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -143,7 +143,7 @@
#define KASAN_ABI_VERSION 3
#endif

-#if GCC_VERSION >= 50100
+#if GCC_VERSION >= 50100 && !defined(__CHECKER__)
#define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1
#endif

--
2.17.2
\
 
 \ /
  Last update: 2018-11-09 10:35    [W:0.467 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site