From d000f0246a64ff75fa57094a5de46c93fd08481d Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 25 Nov 2020 10:21:37 +0100 Subject: Use sal_Int32 to print SbxLONG value (The "%ld" format specifier had now caused -Werror,-Wformat with clang-cl for a Windows 64-bit build.) Change-Id: I741a3e3526a63162dbd75c018dfe7157f06819f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106575 Tested-by: Jenkins Reviewed-by: Stephan Bergmann (cherry picked from commit da212b3e090d1832388834b135c8f358747f4b96) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106611 --- basic/source/comp/symtbl.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'basic') diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx index 46b3b924798e..a4e7befe94b1 100644 --- a/basic/source/comp/symtbl.cxx +++ b/basic/source/comp/symtbl.cxx @@ -26,7 +26,6 @@ #include #include #include -#include // All symbol names are laid down int the symbol-pool's stringpool, so that // all symbols are handled in the same case. On saving the code-image, the @@ -70,7 +69,8 @@ short SbiStringPool::Add( double n, SbxDataType t ) // tdf#131296 - store numeric value including its type character // See GetSuffixType in basic/source/comp/scanner.cxx for type characters case SbxINTEGER: snprintf( buf, sizeof(buf), "%d%%", static_cast(n) ); break; - case SbxLONG: snprintf( buf, sizeof(buf), "%ld&", static_cast(n) ); break; + case SbxLONG: + snprintf( buf, sizeof(buf), "%" SAL_PRIdINT32 "&", static_cast(n) ); break; case SbxSINGLE: snprintf( buf, sizeof(buf), "%.6g!", static_cast(n) ); break; case SbxDOUBLE: snprintf( buf, sizeof(buf), "%.16g", n ); break; // default processing in SbiRuntime::StepLOADNC - no type character case SbxCURRENCY: snprintf(buf, sizeof(buf), "%.16g@", n); break; -- cgit