include/o3tl/safeint.hxx | 1 + 1 file changed, 1 insertion(+) New commits: commit 2884ea0ccac3812fcded31327ad4fc9b978fd754 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Jun 5 14:58:10 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Jun 5 18:32:39 2022 +0200
cid#1504664 silence Operands don't affect result Change-Id: I9ec3ae0e8cb87ab8a98746b8e49fd3f969ea0bd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135437 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/o3tl/safeint.hxx b/include/o3tl/safeint.hxx index 027d283342b5..c697a93164aa 100644 --- a/include/o3tl/safeint.hxx +++ b/include/o3tl/safeint.hxx @@ -211,6 +211,7 @@ make_unsigned(T value) template<typename T1, typename T2> constexpr std::enable_if_t<std::is_unsigned_v<T1>, T1> clamp_to_unsigned(T2 value) { if constexpr (std::is_unsigned_v<T2>) { + // coverity[result_independent_of_operands] - suppress warning for template return value <= std::numeric_limits<T1>::max() ? value : std::numeric_limits<T1>::max(); } else { static_assert(std::is_signed_v<T2>);