sc/source/core/tool/compiler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit a60296694b3af2c18e7aa81eba8782e0ad03f7b8 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Oct 12 19:54:22 2021 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Oct 13 08:05:38 2021 +0200 Remove useless check ...that was introduced with b14107dd0eaf9bfc276544e1900873d36075425e "tdf#133858 reduce the double-ref range to data content", but which can only ever be either true or invoke undefined behavior (as gets reported as > sc/source/core/tool/compiler.cxx:6412:27: error: comparing the result of pointer addition ‘(((ScCompiler*)this)->ScCompiler::<anonymous>.formula::FormulaCompiler::pCode + -8)’ and NULL [-Werror=address] > 6412 | if (!pCode || !(pCode -1) || !(*(pCode - 1))) > | ~~~~~~~^~~ with recent GCC 12 trunk) Change-Id: I72395f1874343a047afceaa5e342e9e67a51c44f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123531 Reviewed-by: Dennis Francis <dennis.fran...@collabora.com> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Jenkins diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index fd9c0ab51fe8..691eab13bbed 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -6409,7 +6409,7 @@ void ScCompiler::CorrectSumRange(const ScComplexRefData& rBaseRange, void ScCompiler::AnnotateTrimOnDoubleRefs() { - if (!pCode || !(pCode -1) || !(*(pCode - 1))) + if (!pCode || !(*(pCode - 1))) return; // OpCode of the "root" operator (which is already in RPN array).