[Libreoffice-commits] core.git: idlc/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 14 06:36:14 UTC 2021
idlc/source/scanner.l | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 8b4f13e152acac20930db13fd4ec4f3d31627c09
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Jan 13 21:34:46 2021 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jan 14 07:35:37 2021 +0100
loplugin:unsignedcompare
Change-Id: I007400f745708087f793f37cd081652e07bcd1b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109251
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/idlc/source/scanner.l b/idlc/source/scanner.l
index 660e01588960..7e3423fa8dc5 100644
--- a/idlc/source/scanner.l
+++ b/idlc/source/scanner.l
@@ -29,6 +29,7 @@
#include <stdlib.h>
#include <string.h>
+#include <o3tl/safeint.hxx>
#include <rtl/character.hxx>
#if defined _MSC_VER
@@ -137,7 +138,7 @@ static int asciiToInteger(char const * s, sal_Int64 * sval, sal_uInt64 * uval)
*sval = 0;
}
return IDL_INTEGER_LITERAL;
- } else if (val <= static_cast< sal_uInt64 >(SAL_MAX_INT64)) {
+ } else if (val <= o3tl::make_unsigned(SAL_MAX_INT64)) {
*sval = static_cast< sal_Int64 >(val);
return IDL_INTEGER_LITERAL;
} else {
More information about the Libreoffice-commits
mailing list