[xen master] libxl: use correct type modifier for vuart_gfn

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] libxl: use correct type modifier for vuart_gfn

patchbot
commit 2b668a84e52a8999d93c438fb259ddf0ec0f62fe
Author:     Wei Liu <[hidden email]>
AuthorDate: Thu Oct 5 10:35:28 2017 +0100
Commit:     Wei Liu <[hidden email]>
CommitDate: Thu Oct 5 15:46:38 2017 +0100

    libxl: use correct type modifier for vuart_gfn
   
    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 <[hidden email]>
    Signed-off-by: Wei Liu <[hidden email]>
    Tested-by: Bhupinder Thakur <[hidden email]>
---
 tools/libxl/libxl_console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_console.c b/tools/libxl/libxl_console.c
index 13ecf12..c05dc28 100644
--- a/tools/libxl/libxl_console.c
+++ b/tools/libxl/libxl_console.c
@@ -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");
--
generated by git-patchbot for /home/xen/git/xen.git#master


_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog