libs/foreignmemory: Fix osdep_xenforeignmemory_map prototype
PATCH 1/1 libs/foreignmemory: Fix osdep_xenforeignmemory_map prototype
Commit cf8c4d3d13b8 made some preparation to have one day variable-length-array argument, but didn't declare the array in the function prototype the same way as in the function definition. And now GCC 11 complains about it.
--- tools/libs/foreignmemory/private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libs/foreignmemory/private.h +1 -1
@@ -32,7 +32,7 @@ int osdep_xenforeignmemory_close(xenforeignmemory_handle *fmem);void *osdep_xenforeignmemory_map (xenforeignmemory_handle *fmem,uint32_t dom,void *addr,int prot,int flags,size_t num, -const xen_pfn_t arr[num],int err[num]); +const xen_pfn_t arr[/*num*/ ],int err[/*num*/ ]);int osdep_xenforeignmemory_unmap (xenforeignmemory_handle *fmem,void *addr,size_t num);
Signature · 1 line
Anthony PERARD
Quoted 7 lines · Anthony PERARD
Commit
cf8c4d3d13b8made some preparation to have one day variable-length-array argument, but didn't declare the array in the function prototype the same way as in the function definition. And now GCC 11 complains about it.Fixes cf8c4d3d13b8 ("tools/libs/foreignmemory: pull array length argument to map forward")Signed-off-by Anthony PERARD <[email protected]>
Ian - this (or whichever alternative might be chosen to address gcc11's valid complaint) also will want backporting.
Jan
PING Re: [XEN PATCH] libs/foreignmemory: Fix osdep_xenforeignmemory_map prototype
Hi Ian & Wei,
Quoted 6 lines · Jan Beulich
Quoted 5 lines · Anthony PERARD
Commit
cf8c4d3d13b8made some preparation to have one day variable-length-array argument, but didn't declare the array in the function prototype the same way as in the function definition. And now GCC 11 complains about it.
Quoted 7 lines
Quoted 2 lines
Fixes cf8c4d3d13b8 ("tools/libs/foreignmemory: pull array length argument to map forward")Signed-off-by Anthony PERARD <[email protected]>Reviewed-by Jan Beulich <[email protected]>Ian - this (or whichever alternative might be chosen to address gcc11's valid complaint) also will want backporting.
I was about to commit this patch and noticed that there is still a missing an ack from the tools maintainers. @Ian, @Wei, can you provide one?
Cheers,
Signature · 1 line
Julien Grall
Re: PING Re: [XEN PATCH] libs/foreignmemory: Fix osdep_xenforeignmemory_map prototype
Hi,
Quoted 12 lines · Julien Grall
Hi Ian & Wei,
Quoted 9 lines · Jan Beulich
Quoted 7 lines · Anthony PERARD
Commit
cf8c4d3d13b8made some preparation to have one day variable-length-array argument, but didn't declare the array in the function prototype the same way as in the function definition. And now GCC 11 complains about it.Fixes cf8c4d3d13b8 ("tools/libs/foreignmemory: pull array length argument to map forward")Signed-off-by Anthony PERARD <[email protected]>
Quoted 6 lines
Quoted 4 lines
Reviewed-by Jan Beulich <[email protected]>Ian - this (or whichever alternative might be chosen to address gcc11's valid complaint) also will want backporting.
I was about to commit this patch and noticed that there is still a missing an ack from the tools maintainers. @Ian, @Wei, can you provide one?
From an IRC discussion, Ian was happy to follow the rule:
"Commit something without the necessary acks if you're reasonably certain that the maintainer would have approved it"
This doesn't seem to be part of MAINTAINERS, but I will use it for this patch as Ian gave his assent.
This is committed now.
Cheers,
Signature · 1 line
Julien Grall