include/o3tl/unit_conversion.hxx | 1 + 1 file changed, 1 insertion(+) New commits: commit a527d8da15f715733e1006fc0d7813a5ae84f5c4 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Aug 21 19:34:59 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Aug 21 22:13:26 2025 +0200
cid#1665118 suppress Overflowed return value and cid#1665116 Overflowed return value Change-Id: Ibd6447909d89fe9523aa5d0653155e0b859dcf93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190028 Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/include/o3tl/unit_conversion.hxx b/include/o3tl/unit_conversion.hxx index 3fc75c20f593..66488a3b5e7b 100644 --- a/include/o3tl/unit_conversion.hxx +++ b/include/o3tl/unit_conversion.hxx @@ -102,6 +102,7 @@ template <std::integral I> constexpr sal_Int64 MulDivSaturate(I n, sal_Int64 m, { if (m > d && std::make_unsigned_t<I>(n) > sal_uInt64(SAL_MAX_INT64 / m * d - d_2)) return SAL_MAX_INT64; // saturate + // coverity[ tainted_data_return : SUPPRESS ] 2024.6.1 return saturating_add<sal_uInt64>(n, d_2) / d * m; // divide before multiplication } else if constexpr (std::is_signed_v<I>) // n < 0; don't compile for unsigned n