Skip to contentSkip to conversation

openposix: Fix the dummy declaration for `lio_listio`

PATCH In review Ma Xinjian via ltp 2 participants 2 messages Dec 20, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openposix: Fix the dummy declaration for `lio_listio`

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.

---
 .../open_posix_testsuite/conformance/definitions/aio_h/4-1.c    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/open_posix_testsuite/conformance/definitions/aio_h/4-1.c +1 -1
index f30f14df2..9283e1de8 100644
@@ -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)
Signature · 5 lines
2.47.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi Ma Xinjian,

Quoted 7 lines

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.

Thanks, merged!

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp