[Mesa-dev] [PATCH] i915: Fix logic_op check.

Vinson Lee vlee at freedesktop.org
Sat Oct 26 09:36:41 CEST 2013


logic_op is of type GLenum (unsigned int).

Fixes "Macro compares unsigned to 0" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/mesa/drivers/dri/i915/intel_blit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i915/intel_blit.c b/src/mesa/drivers/dri/i915/intel_blit.c
index 7b59708..9a66736 100644
--- a/src/mesa/drivers/dri/i915/intel_blit.c
+++ b/src/mesa/drivers/dri/i915/intel_blit.c
@@ -534,7 +534,7 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
 	 return false;
    }
 
-   assert( logic_op - GL_CLEAR >= 0 );
+   assert( logic_op >= GL_CLEAR );
    assert( logic_op - GL_CLEAR < 0x10 );
    assert(dst_pitch > 0);
 
-- 
1.8.3.1



More information about the mesa-dev mailing list