summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-07-23 19:16:31 +0000
committerkib <kib@FreeBSD.org>2012-07-23 19:16:31 +0000
commitb9c519314fc0e5f609a92ad85744ae9ce2866697 (patch)
tree1725da2edd1c81444749c8d88afe4ce6b5051bda /sys/amd64/include
parentb4194dfd5548262d72f4d521bb5895aa65dff172 (diff)
downloadFreeBSD-src-b9c519314fc0e5f609a92ad85744ae9ce2866697.zip
FreeBSD-src-b9c519314fc0e5f609a92ad85744ae9ce2866697.tar.gz
Forcibly shut up clang warning about NULL pointer dereference.
MFC after: 3 weeks
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/pcpu.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h
index 5d1fd4d..2188442 100644
--- a/sys/amd64/include/pcpu.h
+++ b/sys/amd64/include/pcpu.h
@@ -217,6 +217,10 @@ extern struct pcpu *pcpup;
#define PCPU_SET(member, val) __PCPU_SET(pc_ ## member, val)
#define OFFSETOF_CURTHREAD 0
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnull-dereference"
+#endif
static __inline __pure2 struct thread *
__curthread(void)
{
@@ -226,6 +230,9 @@ __curthread(void)
: "m" (*(char *)OFFSETOF_CURTHREAD));
return (td);
}
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
#define curthread (__curthread())
#define OFFSETOF_CURPCB 32
OpenPOWER on IntegriCloud