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.
This commit is contained in:
parent
a9f68688f3
commit
3e3b8a40fe
|
@ -511,11 +511,14 @@ update_front(DrawablePtr draw, DRI2BufferPtr front)
|
||||||
ms_dri2_buffer_private_ptr priv = front->driverPrivate;
|
ms_dri2_buffer_private_ptr priv = front->driverPrivate;
|
||||||
CARD32 size;
|
CARD32 size;
|
||||||
CARD16 pitch;
|
CARD16 pitch;
|
||||||
|
int name;
|
||||||
|
|
||||||
front->name = glamor_name_from_pixmap(pixmap, &pitch, &size);
|
name = glamor_name_from_pixmap(pixmap, &pitch, &size);
|
||||||
if (front->name < 0)
|
if (name < 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
front->name = name;
|
||||||
|
|
||||||
(*screen->DestroyPixmap) (priv->pixmap);
|
(*screen->DestroyPixmap) (priv->pixmap);
|
||||||
front->pitch = pixmap->devKind;
|
front->pitch = pixmap->devKind;
|
||||||
front->cpp = pixmap->drawable.bitsPerPixel / 8;
|
front->cpp = pixmap->drawable.bitsPerPixel / 8;
|
||||||
|
|
Loading…
Reference in New Issue