Bug 88883 - ir-a2xx.c: variable changed in assert statement
Summary: ir-a2xx.c: variable changed in assert statement
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/Freedreno (show other bugs)
Version: git
Hardware: Other All
: medium minor
Assignee: Rob Clark
QA Contact:
URL:
Whiteboard:
Keywords: love
Depends on:
Blocks:
 
Reported: 2015-01-30 21:21 UTC by Heinrich Schuchardt
Modified: 2015-02-21 22:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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


bug/show.html.tmpl processed on Jan 16, 2017 at 19:17:23.
(provided by the Example extension).