summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-11-26 19:26:23 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-11-27 16:35:31 +0100
commit11cf4e80748af05dd6c8f1d30609a5485bf28372 (patch)
tree46520c787506bd925a0f142dc92bd141ec736939 /include
parent8ccf7c3e8c725e9fc29ad0f5accebb127c9ea246 (diff)
fixup gcc warnings
Remove following warning from common code: warning: ISO C90 forbids mixed declarations and code
Diffstat (limited to 'include')
-rw-r--r--include/cancel.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/cancel.h b/include/cancel.h
index b60d21808..629df555f 100644
--- a/include/cancel.h
+++ b/include/cancel.h
@@ -60,10 +60,12 @@
# define CANCELLABLE_SYSCALL(res_type, name, param_list, params) \
res_type weak_function name param_list \
{ \
+ int oldtype; \
+ res_type result; \
if (SINGLE_THREAD_P) \
return __NC(name) params; \
- int oldtype = LIBC_CANCEL_ASYNC(); \
- res_type result = __NC(name) params; \
+ oldtype = LIBC_CANCEL_ASYNC(); \
+ result = __NC(name) params; \
LIBC_CANCEL_RESET(oldtype); \
return result; \
}