From b9c519314fc0e5f609a92ad85744ae9ce2866697 Mon Sep 17 00:00:00 2001 From: kib Date: Mon, 23 Jul 2012 19:16:31 +0000 Subject: Forcibly shut up clang warning about NULL pointer dereference. MFC after: 3 weeks --- sys/amd64/include/pcpu.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys/amd64') 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 -- cgit v1.1