Skip to content

Commit

Permalink
openposix: Fix the dummy declaration for lio_listio
Browse files Browse the repository at this point in the history
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.

Link: https://lore.kernel.org/ltp/[email protected]/
Reviewed-by: Petr Vorel <[email protected]>
Signed-off-by: Ma Xinjian <[email protected]>
  • Loading branch information
MaXinjian authored and pevik committed Dec 20, 2024
1 parent 53886d1 commit 52805ef
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 52805ef

Please sign in to comment.