Am 27.03.2017 14:03, schrieb [email protected]: > From: Michal Srb <[email protected]> > > xf86pciBus.c:1464:21: warning: comparison of constant 256 with expression of > type 'uint8_t' (aka 'unsigned char') is always true > [-Wtautological-constant-out-of-range-compare] > if (pVideo->bus < 256) > > The code used to be in xf86FormatPciBusNumber and compared parameter which > was int, but since b967bf2a it was inlined now it works with uint8_t. > --- > hw/xfree86/common/xf86pciBus.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c > index 9adfee5..ae03b75 100644 > --- a/hw/xfree86/common/xf86pciBus.c > +++ b/hw/xfree86/common/xf86pciBus.c > @@ -1461,11 +1461,7 @@ xf86PciConfigureNewDev(void *busData, struct > pci_device *pVideo, > > pVideo = (struct pci_device *) busData; > > - if (pVideo->bus < 256) > - snprintf(busnum, sizeof(busnum), "%d", pVideo->bus); > - else > - snprintf(busnum, sizeof(busnum), "%d@%d", > - pVideo->bus & 0x00ff, pVideo->bus >> 8); > + snprintf(busnum, sizeof(busnum), "%d", pVideo->bus); > > XNFasprintf(&tmp, "PCI:%s:%d:%d", > busnum, pVideo->dev, pVideo->func);
is busnum used later ? otherwise you could use the XNFasprintf(). re, wh _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
