tools/source/generic/bigint.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 61a3aaae61dfb6d9538eeeed4721d44293d737f4 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Thu Jan 14 14:31:22 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Jan 15 08:08:40 2021 +0100 cid#1471704 workaround Coverity complaints that "nVal = nNum[0] in bigint.cxx:84 is an assignment of overlapping memory" But this is essentially a tagged union, so it's actually fine. Workaround the warning by using a temporary (which the compiler will optimise away anyhow) Change-Id: I0fda945f831b1cdd7b33f7cb671a744150990bf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109294 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx index 5c8c7771a2c5..f6627200a61c 100644 --- a/tools/source/generic/bigint.cxx +++ b/tools/source/generic/bigint.cxx @@ -80,14 +80,16 @@ void BigInt::Normalize() if ( nLen < 3 ) { + sal_Int32 newVal; if ( nLen < 2 ) - nVal = nNum[0]; + newVal = nNum[0]; else if ( nNum[1] & 0x8000 ) return; else - nVal = (static_cast<sal_Int32>(nNum[1]) << 16) + nNum[0]; + newVal = (static_cast<sal_Int32>(nNum[1]) << 16) + nNum[0]; nLen = 0; + nVal = newVal; if ( bIsNeg ) nVal = -nVal; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits