From 8b4f13e152acac20930db13fd4ec4f3d31627c09 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 13 Jan 2021 21:34:46 +0100 Subject: loplugin:unsignedcompare Change-Id: I007400f745708087f793f37cd081652e07bcd1b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109251 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- idlc/source/scanner.l | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'idlc') 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 #include +#include #include #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 { -- cgit