From: Michal Srb <[email protected]>
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.
---
hw/xfree86/drivers/modesetting/dri2.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/drivers/modesetting/dri2.c
b/hw/xfree86/drivers/modesetting/dri2.c
index 8944ef1..a9e20b1 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;
--
2.10.2
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel