nv50: typecast the result of ffs() to unsigned
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 16 Jan 2014 16:42:45 +0000 (16:42 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 18 Jan 2014 19:17:20 +0000 (19:17 +0000)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv50/nv50_shader_state.c

index c44d208670d8ecdd9c3197db424336aca7599693..c9d80ea57813ebb2bee009a439eec12cd152351a 100644 (file)
@@ -46,7 +46,7 @@ nv50_constbufs_validate(struct nv50_context *nv50)
          p = NV50_3D_SET_PROGRAM_CB_PROGRAM_VERTEX;
 
       while (nv50->constbuf_dirty[s]) {
-         const int i = ffs(nv50->constbuf_dirty[s]) - 1;
+         const unsigned i = (unsigned)ffs(nv50->constbuf_dirty[s]) - 1;
 
          assert(i < NV50_MAX_PIPE_CONSTBUFS);
          nv50->constbuf_dirty[s] &= ~(1 << i);