svn commit: r238723 - head/sys/amd64/include

Konstantin Belousov kib at FreeBSD.org
Mon Jul 23 19:16:32 UTC 2012


Author: kib
Date: Mon Jul 23 19:16:31 2012
New Revision: 238723
URL: http://svn.freebsd.org/changeset/base/238723

Log:
  Forcibly shut up clang warning about NULL pointer dereference.
  
  MFC after:	3 weeks

Modified:
  head/sys/amd64/include/pcpu.h

Modified: head/sys/amd64/include/pcpu.h
==============================================================================
--- head/sys/amd64/include/pcpu.h	Mon Jul 23 19:13:55 2012	(r238722)
+++ head/sys/amd64/include/pcpu.h	Mon Jul 23 19:16:31 2012	(r238723)
@@ -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


More information about the svn-src-head mailing list