Enable the static analyser from clang-tidy.

Fix a false positive.  The loops in the pagemap accessor are too
complicated for the static analyser to check, so it doesn't spot that a
non-null return is impossible.
This commit is contained in:
David Chisnall
2019-04-29 15:47:55 +01:00
parent d06e539732
commit 49ece8f4e1
3 changed files with 11 additions and 1 deletions

View File

@@ -42,6 +42,15 @@
#define UNUSED(x) ((void)(x))
#if __has_builtin(__builtin_assume)
# define SNMALLOC_ASSUME(x) __builtin_assume(x)
#else
# define SNMALLOC_ASSUME(x) \
do \
{ \
} while (0)
#endif
// #define USE_LZCNT
#include "address.h"