All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/xen-cpuid: Fix 32bit build
@ 2018-11-07 12:53 Andrew Cooper
  2018-11-07 12:54 ` Wei Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cooper @ 2018-11-07 12:53 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Wei Liu, Ian Jackson

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 <andrew.cooper3@citrix.com>
---
CC: Ian Jackson <Ian.Jackson@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
---
 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 2c41031..04b11d7 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);
 }
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tools/xen-cpuid: Fix 32bit build
  2018-11-07 12:53 [PATCH] tools/xen-cpuid: Fix 32bit build Andrew Cooper
@ 2018-11-07 12:54 ` Wei Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2018-11-07 12:54 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Ian Jackson, Wei Liu, Xen-devel

On Wed, Nov 07, 2018 at 12:53:24PM +0000, Andrew Cooper wrote:
> 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 <andrew.cooper3@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-07 12:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 12:53 [PATCH] tools/xen-cpuid: Fix 32bit build Andrew Cooper
2018-11-07 12:54 ` Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.