summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/arm/bits
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-01-26 15:15:23 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-01-26 15:15:23 +0100
commit549fa53225910f5341092d6647a1e3dd705b605f (patch)
tree04a37070ddefbeeb9def964aa2690d9d75e4c756 /libc/sysdeps/linux/arm/bits
parentba48da4e3c8aa2478f30f7e3b745f3a355ed9442 (diff)
*: silence some warnings
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/arm/bits')
-rw-r--r--libc/sysdeps/linux/arm/bits/syscalls.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/libc/sysdeps/linux/arm/bits/syscalls.h b/libc/sysdeps/linux/arm/bits/syscalls.h
index 92bba7da3..6b747d91b 100644
--- a/libc/sysdeps/linux/arm/bits/syscalls.h
+++ b/libc/sysdeps/linux/arm/bits/syscalls.h
@@ -31,17 +31,22 @@
#include <errno.h>
#define INLINE_SYSCALL_NCS(name, nr, args...) \
- ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL_NCS (name, , nr, args); \
- if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ), 0)) \
+(__extension__ \
+ ({ \
+ unsigned int _inline_sys_result = INTERNAL_SYSCALL_NCS (name, , nr, args);\
+ if (unlikely (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ))) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (_inline_sys_result, )); \
- _inline_sys_result = (unsigned int) -1; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (_inline_sys_result, )); \
+ _inline_sys_result = (unsigned int) -1; \
} \
- (int) _inline_sys_result; })
+ (int) _inline_sys_result; \
+ }) \
+)
#if !defined(__thumb__)
#if defined(__ARM_EABI__)
#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+(__extension__ \
({unsigned int __internal_sys_result; \
{ \
register int __a1 __asm__ ("r0"), _nr __asm__ ("r7"); \
@@ -53,10 +58,12 @@
: "memory"); \
__internal_sys_result = __a1; \
} \
- (int) __internal_sys_result; })
+ (int) __internal_sys_result; }) \
+)
#else /* defined(__ARM_EABI__) */
#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+(__extension__ \
({ unsigned int __internal_sys_result; \
{ \
register int __a1 __asm__ ("a1"); \
@@ -67,13 +74,15 @@
: "memory"); \
__internal_sys_result = __a1; \
} \
- (int) __internal_sys_result; })
+ (int) __internal_sys_result; }) \
+)
#endif
#else /* !defined(__thumb__) */
/* We can't use push/pop inside the asm because that breaks
unwinding (ie. thread cancellation).
*/
#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
+(__extension__ \
({ unsigned int __internal_sys_result; \
{ \
int _sys_buf[2]; \
@@ -90,7 +99,8 @@
: "memory"); \
__internal_sys_result = __a1; \
} \
- (int) __internal_sys_result; })
+ (int) __internal_sys_result; }) \
+)
#endif /*!defined(__thumb__)*/
#define INTERNAL_SYSCALL_ERROR_P(val, err) \