Re: [PATCH] util: pci: Remove always-false condition

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

 



On Mon, Nov 11, 2019 at 13:23:05 +0100, Peter Krempa wrote:
> Commit d19c21429fd modified the condition so that it checks whether the
> value is more than 0xFFFFFFFF. Since addr->domain is an unsigned int, it
> will never be more than that.
> 
> Remove the whole check
> 
> src/util/virpci.c:1291:22: error: result of comparison 'unsigned int' > 4294967295 is always false [-Werror,-Wtautological-type-limit-compare]
>     if (addr->domain > 0xFFFFFFFF) {
>         ~~~~~~~~~~~~ ^ ~~~~~~~~~~
> 
> Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
> ---
> 
> This was caught by new clang:
> 
> $ clang -v
> clang version 9.0.0 (Fedora 9.0.0-1.fc31)
> 
> This "fix" is the naive approach which assumes the original patch was
> correct.

I'll push this under the build-breaker rule since nobody objected.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux