diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-11-10 10:36:06 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-11-10 10:36:06 +0000 |
commit | 848e428171af0dea977fcf3a925ea855127da0dc (patch) | |
tree | 1286ba381cbd126c12e71046c68fb8af19c2f087 /sys/arch | |
parent | 69f375ddcc310faddbe993d1c36d4729cc2b66cf (diff) |
Be careful about local varnames in macros.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/m68k/include/endian.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/sys/arch/m68k/include/endian.h b/sys/arch/m68k/include/endian.h index e35b15e8365..544a4720131 100644 --- a/sys/arch/m68k/include/endian.h +++ b/sys/arch/m68k/include/endian.h @@ -1,4 +1,4 @@ -/* $OpenBSD: endian.h,v 1.10 1997/11/10 05:52:57 niklas Exp $ */ +/* $OpenBSD: endian.h,v 1.11 1997/11/10 10:36:05 niklas Exp $ */ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -34,16 +34,20 @@ #ifdef __GNUC__ -#define __swap32md(x) ({ \ - register u_int32_t __x = (x); \ - __asm ("rorw #8, %0; swap %0; rorw #8, %0" : "=d" (__x) : "0" (__x)); \ - __x; \ +#define __swap32md(x) ({ \ + u_int32_t __swap32md_x = (x); \ + \ + __asm ("rorw #8, %0; swap %0; rorw #8, %0" : \ + "=d" (__swap32md_x) : "0" (__swap32md_x)); \ + __swap32md_x; \ }) -#define __swap16md(x) ({ \ - register u_int16_t __x = (x); \ - __asm ("rorw #8, %0" : "=d" (__x) : "0" (__x)); \ - __x; \ +#define __swap16md(x) ({ \ + u_int16_t __swap16md_x = (x); \ + \ + __asm ("rorw #8, %0" : "=d" (__swap16md_x) : \ + "0" (__swap16md_x)); \ + __swap16md_x; \ }) /* Tell sys/endian.h we have MD variants of the swap macros. */ |