Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jul 2012 19:16:31 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r238723 - head/sys/amd64/include
Message-ID:  <201207231916.q6NJGVap040580@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207231916.q6NJGVap040580>