diff options
author | nate <nate@FreeBSD.org> | 1996-10-21 17:15:05 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1996-10-21 17:15:05 +0000 |
commit | 3667cd057565036465ca3c60c6a263d3b2ad5c8e (patch) | |
tree | c0e1a825bfde2ccc82d56d15ef808cea9b837236 /sys/i386/include/endian.h | |
parent | dacf99d4007d189c16a606789eed73b313c5a9a6 (diff) | |
download | FreeBSD-src-3667cd057565036465ca3c60c6a263d3b2ad5c8e.zip FreeBSD-src-3667cd057565036465ca3c60c6a263d3b2ad5c8e.tar.gz |
When compiling with '-Wall -pedantic', the byte swapping macros gave the
following warning:
warning: ANSI C forbids braced-groups within expressions
Adding __extension__ before the statement-expression seems to work right.
Submitted by: bde (a *long* time ago)
Diffstat (limited to 'sys/i386/include/endian.h')
-rw-r--r-- | sys/i386/include/endian.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/i386/include/endian.h b/sys/i386/include/endian.h index ac60e4c..85ee057 100644 --- a/sys/i386/include/endian.h +++ b/sys/i386/include/endian.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)endian.h 7.8 (Berkeley) 4/3/91 - * $Id: endian.h,v 1.5 1994/09/10 20:03:14 csgr Exp $ + * $Id: endian.h,v 1.6 1995/02/12 08:31:31 jkh Exp $ */ #ifndef _MACHINE_ENDIAN_H_ @@ -65,13 +65,13 @@ __X; }) #if __GNUC__ >= 2 #define __byte_swap_long(x) \ -({ register u_long __X = (x); \ +__extension__ ({ register u_long __X = (x); \ __asm ("xchgb %h1, %b1\n\trorl $16, %1\n\txchgb %h1, %b1" \ : "=q" (__X) \ : "0" (__X)); \ __X; }) #define __byte_swap_word(x) \ -({ register u_short __X = (x); \ +__extension__ ({ register u_short __X = (x); \ __asm ("xchgb %h1, %b1" \ : "=q" (__X) \ : "0" (__X)); \ |