]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
libxl: use correct type modifier for vuart_gfn
authorWei Liu <wei.liu2@citrix.com>
Thu, 5 Oct 2017 09:35:28 +0000 (10:35 +0100)
committerWei Liu <wei.liu2@citrix.com>
Thu, 5 Oct 2017 14:46:38 +0000 (15:46 +0100)
Fixes compilation error like:

libxl_console.c: In function ‘libxl__device_vuart_add’:
libxl_console.c:379:5: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘xen_pfn_t’ [-Werror=format=]
      flexarray_append(ro_front, GCSPRINTF("%lu", state->vuart_gfn));

Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Tested-by: Bhupinder Thakur <bhupinder.thakur@linaro.org>
tools/libxl/libxl_console.c

index 13ecf128e2f128954642871d28f7760d701cd2b5..c05dc28b99f3a00822cfbc5a848feccd181ad9de 100644 (file)
@@ -376,7 +376,7 @@ int libxl__device_vuart_add(libxl__gc *gc, uint32_t domid,
     flexarray_append(ro_front, "port");
     flexarray_append(ro_front, GCSPRINTF("%"PRIu32, state->vuart_port));
     flexarray_append(ro_front, "ring-ref");
-    flexarray_append(ro_front, GCSPRINTF("%lu", state->vuart_gfn));
+    flexarray_append(ro_front, GCSPRINTF("%"PRI_xen_pfn, state->vuart_gfn));
     flexarray_append(ro_front, "limit");
     flexarray_append(ro_front, GCSPRINTF("%d", LIBXL_XENCONSOLE_LIMIT));
     flexarray_append(ro_front, "type");