Skip to contentSkip to conversation

tools/xen-access: use PRI_xen_pfn

PATCH In review Wei Liu 4 participants 4 messages Sep 3, 2015 – Sep 4, 2015

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 tools/xen-access: use PRI_xen_pfn

Otherwise when building with 32bit compiler, we get:

xen-access.c: In function 'xenaccess_init':
xen-access.c:263:5: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'xen_pfn_t' [-Werror=format]
cc1: all warnings being treated as errors

---
Cc: Razvan Cojocaru <[email protected]>
Cc: Tamas K Lengyel <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Ian Campbell <[email protected]>

---
 tools/tests/xen-access/xen-access.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/tests/xen-access/xen-access.c +1 -1
index cdb8f4e..a52ca6e 100644
@@ -260,7 +260,7 @@ xenaccess_t *xenaccess_init(xc_interface **xch_r, domid_t domain_id)
         goto err;
     }
 
-    DPRINTF("max_gpfn = %"PRIx64"\n", xenaccess->max_gpfn);
+    DPRINTF("max_gpfn = %"PRI_xen_pfn"\n", xenaccess->max_gpfn);
 
     return xenaccess;
 
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Wei Liu

Otherwise when building with 32bit compiler, we get:

xen-access.c: In function 'xenaccess_init':
xen-access.c:263:5: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'xen_pfn_t' [-Werror=format]
cc1: all warnings being treated as errors

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
In reply to Wei Liu
Quoted 8 lines · Wei Liu

Otherwise when building with 32bit compiler, we get:

xen-access.c: In function 'xenaccess_init':
xen-access.c:263:5: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'xen_pfn_t' [-Werror=format]
cc1: all warnings being treated as errors

Applied with both acks.

Quoted 24 lines

---
Cc: Razvan Cojocaru <[email protected]>
Cc: Tamas K Lengyel <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Ian Campbell <[email protected]>

---
 tools/tests/xen-access/xen-access.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/tests/xen renamed from tools/tests/xen-access/xen-access.c +0 -1
-access/xen-access.c

index cdb8f4e..a52ca6e 100644

tools/tests/xen-access/xen-access.c +1 -1
@@ -260,7 +260,7 @@ xenaccess_t *xenaccess_init(xc_interface **xch_r, 
 domid_t domain_id)
         goto err;
     }
 
-    DPRINTF("max_gpfn = %"PRIx64"\n", xenaccess->max_gpfn);
+    DPRINTF("max_gpfn = %"PRI_xen_pfn"\n", xenaccess->max_gpfn);
 
     return xenaccess;