From 83809f06a732e42ae2782008306feb17b12cc8cb Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 4 Jan 2025 22:25:19 -0800 Subject: [PATCH] intel/elk: Fix assert with side effect Fix defect reported by Coverity Scan. Side effect in assertion (ASSERT_SIDE_EFFECT) assert_side_effect: Argument ++eot_count of assert() has a side effect. The containing function might work differently in a non-debug build. Fixes: ebd67382604d ("intel/elk/chv: Implement WaClearArfDependenciesBeforeEot") Signed-off-by: Vinson Lee Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/elk/elk_fs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/elk/elk_fs.cpp b/src/intel/compiler/elk/elk_fs.cpp index bf5db704837..598ee12c9cb 100644 --- a/src/intel/compiler/elk/elk_fs.cpp +++ b/src/intel/compiler/elk/elk_fs.cpp @@ -3387,7 +3387,8 @@ elk_fs_visitor::workaround_source_arf_before_eot() /* Currently, we always emit only one EOT per program, * this WA should be updated if it ever changes. */ - assert(++eot_count == 1); + ++eot_count; + assert(eot_count == 1); const fs_builder ibld(this, block, inst); const fs_builder ubld = ibld.exec_all().group(1, 0);