[PATCH] makecontext.3: Fix function declarator with empty parentheses.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



glibc uses 'void (*f)(void)' for makecontext()'s second parameter.

C11 marked function declarators with empty parentheses as
obsolescent:


>   6.11.6  Function declarators
> 1 The use of function declarators with empty parentheses (not
>   prototype-format parametertype declarators) is an obsolescent
>   feature.


Let's use the correct syntax by explicitly using '(void)'.

.../glibc$ grep_glibc_prototype makecontext
stdlib/ucontext.h:51:
extern void makecontext (ucontext_t *__ucp, void (*__func) (void),
			 int __argc, ...) __THROW;
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>
---
 man3/makecontext.3 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/man3/makecontext.3 b/man3/makecontext.3
index 83720dd2c..ac9afcf69 100644
--- a/man3/makecontext.3
+++ b/man3/makecontext.3
@@ -32,7 +32,8 @@ makecontext, swapcontext \- manipulate user context
 .nf
 .B #include <ucontext.h>
 .PP
-.BI "void makecontext(ucontext_t *" ucp ", void (*" func ")(), int " argc ", ...);"
+.BI "void makecontext(ucontext_t *" ucp ", void (*" func ")(void), int " argc \
+", ...);"
 .BI "int swapcontext(ucontext_t *" oucp ", const ucontext_t *" ucp );
 .fi
 .SH DESCRIPTION
-- 
2.30.1.721.g45526154a5




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux