Re: [kvm-unit-tests PATCH v2 1/2] tsc: fix build error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17.07.2018 09:12, Peter Xu wrote:
> Fix the following build error:
> 
> x86/tsc.c: In function ‘test_rdpid’:
> x86/tsc.c:40:34: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘u64’ {aka ‘long unsigned int’} [-Werror=format=]
>         report("Test rdpid %%eax %d", eax == aux, aux);
>                                  ~^               ~~~
>                                  %ld
> 
> Signed-off-by: Peter Xu <peterx@xxxxxxxxxx>
> ---
>  x86/tsc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/x86/tsc.c b/x86/tsc.c
> index 2c484f6..f841f03 100644
> --- a/x86/tsc.c
> +++ b/x86/tsc.c
> @@ -37,7 +37,7 @@ void test_rdpid(u64 aux)
>  
>         wrmsr(MSR_TSC_AUX, aux);
>         asm (".byte 0xf3, 0x0f, 0xc7, 0xf8" : "=a" (eax));
> -       report("Test rdpid %%eax %d", eax == aux, aux);
> +       report("Test rdpid %%eax %" PRId64, eax == aux, aux);
>  }
>  
>  int main(void)
> 

Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux