[xen staging] tools/xen-cpuid: Fix 32bit build

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

[xen staging] tools/xen-cpuid: Fix 32bit build

patchbot
commit 830f4a2df509d5555ad2bf04824b600717480895
Author:     Andrew Cooper <[hidden email]>
AuthorDate: Wed Nov 7 12:51:43 2018 +0000
Commit:     Andrew Cooper <[hidden email]>
CommitDate: Wed Nov 7 12:54:53 2018 +0000

    tools/xen-cpuid: Fix 32bit build
   
    Clang reports:
   
      xen-cpuid.c:307:29: error: format specifies type 'unsigned long' but the
      argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
   
                     msrs[l].idx, msrs[l].val);
                                  ^~~~~~~~~~~
   
    Use PRIx64 instead.
   
    Signed-off-by: Andrew Cooper <[hidden email]>
    Acked-by: Wei Liu <[hidden email]>
---
 tools/misc/xen-cpuid.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/misc/xen-cpuid.c b/tools/misc/xen-cpuid.c
index 2c41031497..04b11d7250 100644
--- a/tools/misc/xen-cpuid.c
+++ b/tools/misc/xen-cpuid.c
@@ -5,6 +5,7 @@
 #include <string.h>
 #include <errno.h>
 #include <limits.h>
+#include <inttypes.h>
 
 #include <xenctrl.h>
 
@@ -303,7 +304,7 @@ static void print_policy(const char *name,
     printf(" MSRs:\n");
     printf("  %-8s -> %-16s\n", "index", "value");
     for ( l = 0; l < nr_msrs; ++l )
-        printf("  %08x -> %016lx\n",
+        printf("  %08x -> %016"PRIx64"\n",
                msrs[l].idx, msrs[l].val);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging

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