]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Allow swab.h to be used in -pedantic c++ build environments.
authorNathan Scott <nathans@sgi.com>
Fri, 11 Nov 2005 14:25:59 +0000 (14:25 +0000)
committerNathan Scott <nathans@sgi.com>
Fri, 11 Nov 2005 14:25:59 +0000 (14:25 +0000)
Merge of master-melb:xfs-cmds:24373a by kenmcd.

include/swab.h

index bd926a7878e540bb9d764e7f1ee4e1c769d2578b..2684aa70ed88f3d4d41b60199b965cd2edd16e46 100644 (file)
 
 static __inline__ __u16 __fswab16(__u16 x)
 {
-       return __arch__swab16(x);
+       return (__extension__ __arch__swab16(x));
 }
 static __inline__ __u16 __swab16p(__u16 *x)
 {
-       return __arch__swab16p(x);
+       return (__extension__ __arch__swab16p(x));
 }
 static __inline__ void __swab16s(__u16 *addr)
 {
-       __arch__swab16s(addr);
+       (__extension__ ({__arch__swab16s(addr);}));
 }
 
 static __inline__ __u32 __fswab32(__u32 x)
 {
-       return __arch__swab32(x);
+       return (__extension__ __arch__swab32(x));
 }
 static __inline__ __u32 __swab32p(__u32 *x)
 {
-       return __arch__swab32p(x);
+       return (__extension__ __arch__swab32p(x));
 }
 static __inline__ void __swab32s(__u32 *addr)
 {
-       __arch__swab32s(addr);
+       (__extension__ ({__arch__swab32s(addr);}));
 }
 
 static __inline__ __u64 __fswab64(__u64 x)
@@ -141,16 +141,16 @@ static __inline__ __u64 __fswab64(__u64 x)
        __u32 l = x & ((1ULL<<32)-1);
        return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));
 #  else
-       return __arch__swab64(x);
+       return (__extension__ __arch__swab64(x));
 #  endif
 }
 static __inline__ __u64 __swab64p(__u64 *x)
 {
-       return __arch__swab64p(x);
+       return (__extension__ __arch__swab64p(x));
 }
 static __inline__ void __swab64s(__u64 *addr)
 {
-       __arch__swab64s(addr);
+       (__extension__ ({__arch__swab64s(addr);}));
 }
 
 #endif /* SWAB_H */