linux-6.15-rc2/tools/testing/selftests/kvm/lib/arm64/processor.c:107: Possible int/long mixup ?

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

 



Hello there,

Static analyser cppcheck says:

linux-6.15-rc2/tools/testing/selftests/kvm/lib/arm64/processor.c:107:2: style: int result is returned as long value. If the return value is long to avoid loss of information, then you have loss of information. [truncLongCastReturn]

Source code is

   return 1 << (vm->va_bits - shift);

Maybe better code:

   return 1UL << (vm->va_bits - shift);

Regards

David Binderman





[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