From be1c5f44988fd3d4e2a4f1437a8367f3bd073161 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 22 Oct 2012 14:08:31 -0700 Subject: mesa: Use MIN instead of CLAMP for unsigned source data This silences a zillion GCC warnings like: ../../../src/mesa/main/pack.c: In function '_mesa_pack_rgba_span_from_uints': ../../../src/mesa/main/pack.c:560:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Ian Romanick Reviewed-by: Brian Paul --- src/mesa/main/pack.c | 216 +++++++++++++++++++++++++-------------------------- 1 file changed, 108 insertions(+), 108 deletions(-) (limited to 'src/mesa/main/pack.c') diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index a23bc998dd7..4f0caa7636c 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -557,9 +557,9 @@ _mesa_pack_rgba_span_from_uints(struct gl_context *ctx, GLuint n, GLuint rgba[][ if ((dstFormat == GL_RGB) || (dstFormat == GL_RGB_INTEGER)) { GLubyte *dst = (GLubyte *) dstAddr; for (i=0;i