[LTP] [PATCH] openposix: Fix the dummy declaration for `lio_listio`

Ma Xinjian maxj.fnst@fujitsu.com
Fri Dec 20 04:54:04 CET 2024


The second parameter should be "struct aiocb *const [restrict]" instead
of "struct aiocb *restrict const [restrict]" based on the header file "aio.h".

For "struct aiocb *restrict const [restrict]", it will report "-Wincompatible-pointer-types"
issue while compiling:
- With gcc 11.5.0, it's a warning issue.
- With gcc 14.2.0, it becomes an error.

Signed-off-by: Ma Xinjian <maxj.fnst@fujitsu.com>
---
 .../open_posix_testsuite/conformance/definitions/aio_h/4-1.c    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/open_posix_testsuite/conformance/definitions/aio_h/4-1.c b/testcases/open_posix_testsuite/conformance/definitions/aio_h/4-1.c
index f30f14df2..9283e1de8 100644
--- a/testcases/open_posix_testsuite/conformance/definitions/aio_h/4-1.c
+++ b/testcases/open_posix_testsuite/conformance/definitions/aio_h/4-1.c
@@ -16,7 +16,7 @@ static ssize_t (*dummy4) (struct aiocb*) = aio_return;
 static int (*dummy5) (const struct aiocb* const[], int,
 	       const struct timespec *) = aio_suspend;
 static int (*dummy6) (struct aiocb *) = aio_write;
-static int (*dummy7) (int, struct aiocb *restrict const [restrict],
+static int (*dummy7) (int, struct aiocb *const [restrict],
 	       int, struct sigevent *restrict) = lio_listio;
 
 int main(void)
-- 
2.47.0



More information about the ltp mailing list