diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-10-12 19:54:22 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-10-13 08:05:38 +0200 |
commit | a60296694b3af2c18e7aa81eba8782e0ad03f7b8 (patch) | |
tree | aba0d775c26d01ad8efd8ba3268869f780619165 /sc/source | |
parent | fb3e13cae8ab0915facaf07fe5fca177a4041a9b (diff) |
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.francis@collabora.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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). |