Drop some useless conversions to sal_Int32

Desktop / LibreOffice - Stephan Bergmann [redhat.com] - 14 September 2021 14:49 UTC

These started out as sal::static_int_cast in 1b9a6329fcda25fd738bd0e0a36663a6e745cab8 "INTEGRATION: CWS calcwarnings", presumably to silence some signed-to-unsigned conversion warnings, then morphed into the completely useless sal::static_int_cast with the String -> OUString changes (where the length parameter changed from unsigned xub_StrLen to signed sal_Int32), which then started to hide erroneous overflow (see e.g. 4a4be7a1edead11b48e1a8598e52a3246e6744bb "tdf#144106 Don't proceed ptrim_i past ptrim_f") from tools like -fsanitize=implicit-integer-sign-change with the OUString -> std::u16string_view changes (where the length parameter changed from signed sal_Int32 to unsigned std::size_t). If there were demand to prevent signed-to-unsigned conversion warnings here, that should be done with o3tl::make_unsigned instead.

Change-Id: I9b078658500b6ed5dcd0e860d2f0b725133188f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122092

7469af24baeb Drop some useless conversions to sal_Int32
sc/source/ui/docshell/impex.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Upstream: cgit.freedesktop.org


  • Share