[Mesa-dev] [PATCH mesa] egl/wayland: check for invalid format index

Daniel Stone daniel at fooishbar.org
Thu Feb 15 11:25:33 UTC 2018


Hi Eric,

On 15 February 2018 at 11:17, Eric Engestrom <eric.engestrom at imgtec.com> wrote:
> Daniel, `w` seemed like the "least bad" thing to return in this case;
> would you prefer `0`?

I guess Coverity doesn't know it can never be invalid. We look up a
visual in the table using dri2_surf->format, whcih is only ever set
from the table itself when creating a surface. assert(visual_idx ==
-1) should be enough to please Coverity there I think.

Cheers,
Daniel


More information about the mesa-dev mailing list