summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-15 14:26:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-16 11:12:31 +0200
commit87c90cec38c43efbbd9cbfad1f0f607f428043d4 (patch)
treeb65b6ccc78a4a922c027f98e4d8ab5251fdf33bb /idlc
parent9b34dc20b6946698ae6ce2d5d859885bfb444633 (diff)
fix some *printf which are using "%l" ie. long specifiers
which are not portable between Linux and Windows because long is not portable. In preparation for converting long -> tools::Long Change-Id: I8bf1aa1570946ca887a6c83dd5f99c024d437336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104374 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'idlc')
-rw-r--r--idlc/source/errorhandler.cxx12
-rw-r--r--idlc/source/idlcmain.cxx9
2 files changed, 10 insertions, 11 deletions
diff --git a/idlc/source/errorhandler.cxx b/idlc/source/errorhandler.cxx
index 1e09bb995302..aa2de56bc969 100644
--- a/idlc/source/errorhandler.cxx
+++ b/idlc/source/errorhandler.cxx
@@ -389,10 +389,10 @@ static void errorHeader(ErrorCode eCode, sal_Int32 lineNumber, sal_uInt32 start,
else
file = idlc()->getFileName();
- fprintf(stderr, "%s:%lu [%lu:%lu] : %s", file.getStr(),
- sal::static_int_cast< unsigned long >(lineNumber),
- sal::static_int_cast< unsigned long >(start),
- sal::static_int_cast< unsigned long >(end),
+ fprintf(stderr, "%s:%" SAL_PRIdINT64 " [%" SAL_PRIdINT64 ":%" SAL_PRIdINT64 "] : %s", file.getStr(),
+ sal_Int64(lineNumber),
+ sal_Int64(start),
+ sal_Int64(end),
errorCodeToMessage(eCode));
}
@@ -416,8 +416,8 @@ static void warningHeader(WarningCode wCode)
else
file = idlc()->getFileName();
- fprintf(stderr, "%s(%lu) : WARNING, %s", file.getStr(),
- sal::static_int_cast< unsigned long >(idlc()->getLineNumber()),
+ fprintf(stderr, "%s(%" SAL_PRIdINT64 ") : WARNING, %s", file.getStr(),
+ sal_Int64(idlc()->getLineNumber()),
warningCodeToMessage(wCode));
}
diff --git a/idlc/source/idlcmain.cxx b/idlc/source/idlcmain.cxx
index 0c4ded92be10..a79a30a504e2 100644
--- a/idlc/source/idlcmain.cxx
+++ b/idlc/source/idlcmain.cxx
@@ -90,10 +90,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
nErrors = compileFile(&sysFileName);
if ( idlc()->getWarningCount() && !options.quiet() )
- fprintf(stdout, "%s: detected %lu warnings compiling file '%s'\n",
+ fprintf(stdout, "%s: detected %" SAL_PRIdINT64 " warnings compiling file '%s'\n",
options.getProgramName().getStr(),
- sal::static_int_cast< unsigned long >(
- idlc()->getWarningCount()),
+ sal_Int64(idlc()->getWarningCount()),
elem.getStr());
// prepare output file name
@@ -140,9 +139,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
if ( nErrors > 0 )
{
- fprintf(stderr, "%s: detected %ld errors%s",
+ fprintf(stderr, "%s: detected %" SAL_PRIdINT64 " errors%s",
options.getProgramName().getStr(),
- sal::static_int_cast< long >(nErrors),
+ sal_Int64(nErrors),
options.prepareVersion().getStr());
} else
{