diff --git a/include/common/lock.h b/include/common/lock.h index 4782b638f..6baece25f 100644 --- a/include/common/lock.h +++ b/include/common/lock.h @@ -9,10 +9,13 @@ #include "common/asm/atomic.h" #include "common/compiler.h" +/* scan-build complains about derefencing a NULL pointer here. */ +#ifndef __clang_analyzer__ #define LOCK_BUG_ON(condition) \ if ((condition)) \ *(volatile unsigned long *)NULL = 0xdead0000 + __LINE__ #define LOCK_BUG() LOCK_BUG_ON(1) +#endif /* __clang_analyzer__ */ #ifdef CR_NOGLIBC # include