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_fcntl64.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_fcntl64.c')
-rw-r--r-- | libc/sysdeps/linux/common/__syscall_fcntl64.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/__syscall_fcntl64.c b/libc/sysdeps/linux/common/__syscall_fcntl64.c index eaef22b3b..88b2b143b 100644 --- a/libc/sysdeps/linux/common/__syscall_fcntl64.c +++ b/libc/sysdeps/linux/common/__syscall_fcntl64.c @@ -23,6 +23,9 @@ int fcntl64(int fd, int cmd, ...) { long arg; va_list list; +# ifdef __NEW_THREADS + int oldtype, result; +# endif va_start(list, cmd); arg = va_arg(list, long); @@ -31,8 +34,8 @@ int fcntl64(int fd, int cmd, ...) if (SINGLE_THREAD_P || (cmd != F_SETLKW64)) return __NC(fcntl64)(fd, cmd, arg); # ifdef __NEW_THREADS - int oldtype = LIBC_CANCEL_ASYNC(); - int result = __NC(fcntl64)(fd, cmd, arg); + oldtype = LIBC_CANCEL_ASYNC(); + result = __NC(fcntl64)(fd, cmd, arg); LIBC_CANCEL_RESET(oldtype); return result; # endif |