[Mesa-dev] [PATCH v2 17/29] mesa/main/framebuffer.h: Fix one -Wsign-compare warning in ?: construct.

Gert Wollny gw.fossdev at gmail.com
Thu Nov 16 21:52:04 UTC 2017


Am Donnerstag, den 16.11.2017, 17:13 +0000 schrieb Emil Velikov:
> On 16 November 2017 at 15:09, Gert Wollny <gw.fossdev at gmail.com>
> wrote:
> > Explicitely convert on value to the target type.
> > 
> > Signed-off-by: Gert Wollny <gw.fossdev at gmail.com>
> > Reviewed-by: Brian Paul <brianp at vmware.com>
> > ---
> >  src/mesa/main/framebuffer.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/mesa/main/framebuffer.h
> > b/src/mesa/main/framebuffer.h
> > index bc6e7bc31a..bffa21dcea 100644
> > --- a/src/mesa/main/framebuffer.h
> > +++ b/src/mesa/main/framebuffer.h
> > @@ -93,7 +93,7 @@ static inline GLuint
> >  _mesa_geometric_samples(const struct gl_framebuffer *buffer)
> >  {
> >     return buffer->_HasAttachments ?
> > -      buffer->Visual.samples :
> > +      (GLuint)buffer->Visual.samples :
> 
> samples and sampleBuffers are as described in the ARB_multisample /
> SGIS_multisample spec.
> 
> According to the spec both of these are 'Z + Non-negative integer or
> enumerated value' Worth doing that instead?

After having a short look into it, I guess it is doable, but I'd then
prefer to drop this patch from the series and do this separately, i.e.
really track this value to make its use consistent (also with respect
to function parameters etc). 

Best, 
Gert 


> 
> -Emil


More information about the mesa-dev mailing list