summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/pcpu.h
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2003-11-17 04:40:58 +0000
committerbde <bde@FreeBSD.org>2003-11-17 04:40:58 +0000
commitefa9a611d92f1715cfd270d819320b1d41e6d7e9 (patch)
treedfc2203332cc79151d922e857c7945815ed0e8ef /sys/i386/include/pcpu.h
parent52658f2fb96b652cdd03121bc128ba3605f31efb (diff)
downloadFreeBSD-src-efa9a611d92f1715cfd270d819320b1d41e6d7e9.zip
FreeBSD-src-efa9a611d92f1715cfd270d819320b1d41e6d7e9.tar.gz
Fixed pedantic warnings for statement-expressions using __extension__
and by not using a statement-expression for the non-expression __PCPU_SET().
Diffstat (limited to 'sys/i386/include/pcpu.h')
-rw-r--r--sys/i386/include/pcpu.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/i386/include/pcpu.h b/sys/i386/include/pcpu.h
index 6378842..1e5cba4 100644
--- a/sys/i386/include/pcpu.h
+++ b/sys/i386/include/pcpu.h
@@ -76,7 +76,7 @@ extern struct pcpu *pcpup;
/*
* Evaluates to the address of the per-cpu variable name.
*/
-#define __PCPU_PTR(name) ({ \
+#define __PCPU_PTR(name) __extension__ ({ \
__pcpu_type(name) *__p; \
\
__asm __volatile("movl %%fs:%1,%0; addl %2,%0" \
@@ -90,7 +90,7 @@ extern struct pcpu *pcpup;
/*
* Evaluates to the value of the per-cpu variable name.
*/
-#define __PCPU_GET(name) ({ \
+#define __PCPU_GET(name) __extension__ ({ \
__pcpu_type(name) __result; \
\
if (sizeof(__result) == 1) { \
@@ -121,7 +121,7 @@ extern struct pcpu *pcpup;
/*
* Sets the value of the per-cpu variable name to value val.
*/
-#define __PCPU_SET(name, val) ({ \
+#define __PCPU_SET(name, val) { \
__pcpu_type(name) __val = (val); \
\
if (sizeof(__val) == 1) { \
@@ -145,7 +145,7 @@ extern struct pcpu *pcpup;
} else { \
*__PCPU_PTR(name) = __val; \
} \
-})
+}
#define PCPU_GET(member) __PCPU_GET(pc_ ## member)
#define PCPU_PTR(member) __PCPU_PTR(pc_ ## member)
OpenPOWER on IntegriCloud