Bug 88883

Summary: ir-a2xx.c: variable changed in assert statement
Product: Mesa Reporter: Heinrich Schuchardt <xypron.glpk>
Component: Drivers/Gallium/FreedrenoAssignee: Rob Clark <robclark>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: medium Keywords: love
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Heinrich Schuchardt 2015-01-30 21:21:32 UTC
In
mesa/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c
we find

		if (src3_reg) {
			assert(src3_reg == instr->regs[reg++]);
		} else {
			src3_reg = instr->regs[reg++];
		}

The argument of assert is executed in debug code but not in release code.
Hence subsequent usage of variable reg would be different between both.
Such usage currently does not exist.

The inconsistency was discovered with cppcheck
http://cppcheck.sourceforge.net/

Best regards

Heinrich Schuchardt

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.