On Thursday, 2018-02-15 11:25:33 +0000, Daniel Stone wrote:
> Hi Eric,
> 
> On 15 February 2018 at 11:17, Eric Engestrom <eric.engest...@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.

(I assume you meant `!=`)

Sounds like assume() might be better than assert() though, if it's
actually impossible (barring internal bug), so that the compiler can
drop the `== -1` paths.
Sending a v2 in a minute :)

> 
> Cheers,
> Daniel
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to