summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-11-25 10:21:37 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-11-25 14:05:36 +0100
commitda212b3e090d1832388834b135c8f358747f4b96 (patch)
tree1fae1809520e5a742c172b497f35d77fe83d8f2d /basic
parent39c9596eb7746c16e68e71d76777be58fc94b7c9 (diff)
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 <sbergman@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/symtbl.cxx4
1 files changed, 2 insertions, 2 deletions
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 <stdio.h>
#include <rtl/character.hxx>
#include <basic/sberrors.hxx>
-#include <tools/long.hxx>
// 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<short>(n) ); break;
- case SbxLONG: snprintf( buf, sizeof(buf), "%ld&", static_cast<tools::Long>(n) ); break;
+ case SbxLONG:
+ snprintf( buf, sizeof(buf), "%" SAL_PRIdINT32 "&", static_cast<sal_Int32>(n) ); break;
case SbxSINGLE: snprintf( buf, sizeof(buf), "%.6g!", static_cast<float>(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;