libs/foreignmemory: Fix osdep_xenforeignmemory_map prototype
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 1 Jun 2021 15:41:47 +0000 (16:41 +0100)
committerJulien Grall <jgrall@amazon.com>
Tue, 15 Jun 2021 17:07:58 +0000 (18:07 +0100)
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.

Fixes: cf8c4d3d13b8 ("tools/libs/foreignmemory: pull array length argument to map forward")
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
tools/libs/foreignmemory/private.h

index 1ee3626dd2789fb3cb9ab30b45c4c7c01c094396..5bb0cefb0987c5fc0289ea708e12618a2dd26f6d 100644 (file)
@@ -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);