diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-02-03 16:21:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-02-03 20:27:29 +0100 |
commit | b66c5f77d150056b2de262dae66301fcd7dc38c1 (patch) | |
tree | be6cb75524abff6f1fbfda2c62fd2ce5cb132e2f /tools/source | |
parent | 86af52b119eaf57b7c1f8943cc1c6631f2044482 (diff) |
loplugin:unsignedcompare (clang-cl)
Change-Id: I69cc1b352221ca053ccd0c5b78e926480a8c9ccd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87884
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/misc/pathutils.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/source/misc/pathutils.cxx b/tools/source/misc/pathutils.cxx index 28e63ac674a8..706740a320f9 100644 --- a/tools/source/misc/pathutils.cxx +++ b/tools/source/misc/pathutils.cxx @@ -21,9 +21,10 @@ #if defined(_WIN32) -#include <cstddef> #define WIN32_LEAN_AND_MEAN #include <windows.h> + +#include <o3tl/safeint.hxx> #include <sal/types.h> #include <tools/pathutils.hxx> @@ -79,8 +80,7 @@ WCHAR * buildPath( } } if (backLength < - static_cast< std::size_t >(MAX_PATH - (frontEnd - frontBegin))) - // hopefully std::size_t is large enough + o3tl::make_unsigned(MAX_PATH - (frontEnd - frontBegin))) { WCHAR * p; if (frontBegin == path) { |