From 5060c5015882b7109c54598c4ea858949beafc43 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 24 May 2022 15:26:06 +0200 Subject: Use o3tl::make_unsigned in some places ...where a signed and an unsigned value are compared, and the signed value has just been proven to be non-negative here Change-Id: I20600d61a5d59d739bc1bee838c0038e4611aec2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134875 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- vcl/unx/gtk3/a11y/atktextattributes.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vcl/unx/gtk3/a11y') diff --git a/vcl/unx/gtk3/a11y/atktextattributes.cxx b/vcl/unx/gtk3/a11y/atktextattributes.cxx index c127333caf43..25b43f480ab7 100644 --- a/vcl/unx/gtk3/a11y/atktextattributes.cxx +++ b/vcl/unx/gtk3/a11y/atktextattributes.cxx @@ -38,6 +38,7 @@ #include #include +#include #include #include @@ -451,7 +452,7 @@ Strikeout2String(const uno::Any& rAny) { sal_Int16 n = rAny.get(); - if( n >= 0 && n < sal_Int16(SAL_N_ELEMENTS(font_strikethrough)) ) + if( n >= 0 && o3tl::make_unsigned(n) < SAL_N_ELEMENTS(font_strikethrough) ) return g_strdup( font_strikethrough[n] ); return nullptr; -- cgit