[PATCH] makecontext.3: Fix function declarator with empty parentheses.
From: Alejandro Colomar <hidden>
Date: 2021-03-04 19:49:39
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Alejandro Colomar <hidden>
Date: 2021-03-04 19:49:39
Subsystem:
the rest · Maintainer:
Linus Torvalds
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 <redacted> --- 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