[Mesa-dev] [PATCH 1/1] st/xvmc: Fix compiler warnings

Jan Vesely jan.vesely at rutgers.edu
Wed Dec 3 07:31:45 PST 2014


On Wed, 2014-12-03 at 11:15 +0100, Christian König wrote:
> Am 02.12.2014 um 21:14 schrieb Jan Vesely:
> > Mostly signed/unsigned comparison
> >
> > Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> 
> Reviewed-by: Christian König <christian.koenig at amd.com>
> 
> Feel free to commit this patch or if you don't have commit access leave 
> me a note and I can commit it.

Can you pls, push it for me, I don't have commit access.

thank you,
jan

> 
> Regards,
> Christian.
> 
> > ---
> >   src/gallium/state_trackers/xvmc/context.c      | 6 +++---
> >   src/gallium/state_trackers/xvmc/subpicture.c   | 2 +-
> >   src/gallium/state_trackers/xvmc/xvmc_private.h | 4 ++--
> >   3 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/src/gallium/state_trackers/xvmc/context.c b/src/gallium/state_trackers/xvmc/context.c
> > index 2329e2a..9ded2e5 100644
> > --- a/src/gallium/state_trackers/xvmc/context.c
> > +++ b/src/gallium/state_trackers/xvmc/context.c
> > @@ -67,7 +67,7 @@ static Status Validate(Display *dpy, XvPortID port, int surface_type_id,
> >   
> >      *found_port = false;
> >   
> > -   for (unsigned int i = 0; i < XScreenCount(dpy); ++i) {
> > +   for (int i = 0; i < XScreenCount(dpy); ++i) {
> >         ret = XvQueryAdaptors(dpy, XRootWindow(dpy, i), &num_adaptors, &adaptor_info);
> >         if (ret != Success)
> >            return ret;
> > @@ -87,7 +87,7 @@ static Status Validate(Display *dpy, XvPortID port, int surface_type_id,
> >                  return BadAlloc;
> >               }
> >   
> > -            for (unsigned int l = 0; l < num_types && !found_surface; ++l) {
> > +            for (int l = 0; l < num_types && !found_surface; ++l) {
> >                  if (surface_info[l].surface_type_id != surface_type_id)
> >                     continue;
> >   
> > @@ -191,7 +191,7 @@ Status XvMCCreateContext(Display *dpy, XvPortID port, int surface_type_id,
> >      Status ret;
> >      struct vl_screen *vscreen;
> >      struct pipe_context *pipe;
> > -   struct pipe_video_codec templat = {};
> > +   struct pipe_video_codec templat = {0};
> >      XvMCContextPrivate *context_priv;
> >      vl_csc_matrix csc;
> >   
> > diff --git a/src/gallium/state_trackers/xvmc/subpicture.c b/src/gallium/state_trackers/xvmc/subpicture.c
> > index 7a951fa..6f42216 100644
> > --- a/src/gallium/state_trackers/xvmc/subpicture.c
> > +++ b/src/gallium/state_trackers/xvmc/subpicture.c
> > @@ -112,7 +112,7 @@ static Status Validate(Display *dpy, XvPortID port, int surface_type_id, int xvi
> >   {
> >      XvImageFormatValues *subpictures;
> >      int num_subpics;
> > -   unsigned int i;
> > +   int i;
> >   
> >      subpictures = XvMCListSubpictureTypes(dpy, port, surface_type_id, &num_subpics);
> >      if (num_subpics < 1) {
> > diff --git a/src/gallium/state_trackers/xvmc/xvmc_private.h b/src/gallium/state_trackers/xvmc/xvmc_private.h
> > index eaf388a..84c7b6c 100644
> > --- a/src/gallium/state_trackers/xvmc/xvmc_private.h
> > +++ b/src/gallium/state_trackers/xvmc/xvmc_private.h
> > @@ -69,7 +69,7 @@ typedef struct
> >      struct pipe_video_buffer *video_buffer;
> >   
> >      /* nonzero if this picture is already being decoded */
> > -   int picture_structure;
> > +   unsigned picture_structure;
> >   
> >      XvMCSurface *ref[2];
> >   
> > @@ -106,7 +106,7 @@ typedef struct
> >   #define XVMC_WARN  2
> >   #define XVMC_TRACE 3
> >   
> > -static INLINE void XVMC_MSG(unsigned int level, const char *fmt, ...)
> > +static INLINE void XVMC_MSG(int level, const char *fmt, ...)
> >   {
> >      static int debug_level = -1;
> >   
> 

-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141203/8afe6172/attachment.sig>


More information about the mesa-dev mailing list