xserver: Branch 'master' - 2 commits
Adam Jackson
ajax at kemper.freedesktop.org
Fri Feb 2 20:20:48 UTC 2018
hw/xfree86/common/xf86pciBus.c | 6 +-----
hw/xfree86/drivers/modesetting/dri2.c | 7 +++++--
2 files changed, 6 insertions(+), 7 deletions(-)
New commits:
commit 3e3b8a40fee77d1af6ca0c2946ff276d555ddea8
Author: Michal Srb <msrb at suse.com>
Date: Mon Mar 27 15:03:38 2017 +0300
modesetting: Check for -1 before converting to unsigned int.
dri2.c:516:21: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
if (front->name < 0)
Prevents a failure from being ignored.
diff --git a/hw/xfree86/drivers/modesetting/dri2.c b/hw/xfree86/drivers/modesetting/dri2.c
index b2278e78b..fd36aa118 100644
--- a/hw/xfree86/drivers/modesetting/dri2.c
+++ b/hw/xfree86/drivers/modesetting/dri2.c
@@ -511,11 +511,14 @@ update_front(DrawablePtr draw, DRI2BufferPtr front)
ms_dri2_buffer_private_ptr priv = front->driverPrivate;
CARD32 size;
CARD16 pitch;
+ int name;
- front->name = glamor_name_from_pixmap(pixmap, &pitch, &size);
- if (front->name < 0)
+ name = glamor_name_from_pixmap(pixmap, &pitch, &size);
+ if (name < 0)
return FALSE;
+ front->name = name;
+
(*screen->DestroyPixmap) (priv->pixmap);
front->pitch = pixmap->devKind;
front->cpp = pixmap->drawable.bitsPerPixel / 8;
commit a9f68688f313752b1c6dfcbf6bf54f8c41fd811d
Author: Michal Srb <msrb at suse.com>
Date: Mon Mar 27 15:03:37 2017 +0300
xfree86: Silence always true condition warning.
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.
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index cf4c27aea..0718cdcb0 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1449,11 +1449,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);
More information about the xorg-commit
mailing list