From 549fa53225910f5341092d6647a1e3dd705b605f Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 26 Jan 2012 15:15:23 +0100 Subject: *: silence some warnings warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/bits/syscalls-common.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'libc/sysdeps/linux/common/bits') diff --git a/libc/sysdeps/linux/common/bits/syscalls-common.h b/libc/sysdeps/linux/common/bits/syscalls-common.h index 1b84d9e2b..faebd1b71 100644 --- a/libc/sysdeps/linux/common/bits/syscalls-common.h +++ b/libc/sysdeps/linux/common/bits/syscalls-common.h @@ -40,21 +40,27 @@ /* Just like INLINE_SYSCALL(), but take a non-constant syscall (NCS) argument */ #ifndef INLINE_SYSCALL_NCS # define INLINE_SYSCALL_NCS(name, nr, args...) \ -({ \ +(__extension__ \ + ({ \ INTERNAL_SYSCALL_DECL(__err); \ - long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \ - if (unlikely(INTERNAL_SYSCALL_ERROR_P(__res, __err))) { \ + (__extension__ \ + ({ \ + long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \ + if (unlikely(INTERNAL_SYSCALL_ERROR_P(__res, __err))) { \ __set_errno(INTERNAL_SYSCALL_ERRNO(__res, __err)); \ __res = -1L; \ - } \ - __res; \ -}) + } \ + __res; \ + }) \ + ); \ + }) \ +) #endif #ifndef INLINE_SYSCALL_NOERR_NCS # define INLINE_SYSCALL_NOERR_NCS(name, nr, args...) \ ({ \ - INTERNAL_SYSCALL_DECL(__err); \ - long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \ + /*INTERNAL_SYSCALL_DECL(__err);*/ \ + long __res = INTERNAL_SYSCALL_NCS(name, /*__err*/, nr, args); \ __res; \ }) #endif -- cgit v1.2.3