diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-11-26 19:26:23 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-11-27 16:35:31 +0100 |
commit | 11cf4e80748af05dd6c8f1d30609a5485bf28372 (patch) | |
tree | 46520c787506bd925a0f142dc92bd141ec736939 /libc/sysdeps/linux/common/__syscall_fcntl.c | |
parent | 8ccf7c3e8c725e9fc29ad0f5accebb127c9ea246 (diff) |
fixup gcc warnings
Remove following warning from common code:
warning: ISO C90 forbids mixed declarations and code
Diffstat (limited to 'libc/sysdeps/linux/common/__syscall_fcntl.c')
-rw-r--r-- | libc/sysdeps/linux/common/__syscall_fcntl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/common/__syscall_fcntl.c b/libc/sysdeps/linux/common/__syscall_fcntl.c index 17c67182e..86cc60d1a 100644 --- a/libc/sysdeps/linux/common/__syscall_fcntl.c +++ b/libc/sysdeps/linux/common/__syscall_fcntl.c @@ -39,6 +39,9 @@ int fcntl(int fd, int cmd, ...) { va_list ap; long arg; +#ifdef __NEW_THREADS + int oldtype, result; +#endif va_start (ap, cmd); arg = va_arg (ap, long); @@ -51,11 +54,11 @@ int fcntl(int fd, int cmd, ...) return INLINE_SYSCALL(fcntl64, 3, fd, cmd, arg); #endif #ifdef __NEW_THREADS - int oldtype = LIBC_CANCEL_ASYNC (); + oldtype = LIBC_CANCEL_ASYNC (); #if defined __NR_fcntl - int result = __NC(fcntl)(fd, cmd, arg); + result = __NC(fcntl)(fd, cmd, arg); #else - int result = INLINE_SYSCALL(fcntl64, 3, fd, cmd, arg); + result = INLINE_SYSCALL(fcntl64, 3, fd, cmd, arg); #endif LIBC_CANCEL_RESET (oldtype); return result; |