summaryrefslogtreecommitdiff
path: root/idlc/source/idlccompile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'idlc/source/idlccompile.cxx')
-rw-r--r--idlc/source/idlccompile.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx
index 5f4ff7bf9f64..281d2b2f099e 100644
--- a/idlc/source/idlccompile.cxx
+++ b/idlc/source/idlccompile.cxx
@@ -152,7 +152,7 @@ OString makeTempName(const OString& prefix)
#if defined(SAL_W32) || defined(SAL_UNX)
- OSL_ASSERT( sizeof(tmpFilePattern) > ( strlen(tmpPath)
+ OSL_ASSERT( sizeof(tmpFilePattern) > ( tmpPath.getLength()
+ RTL_CONSTASCII_LENGTH(
PATH_SEPARATOR )
+ prefix.getLength()
@@ -160,7 +160,7 @@ OString makeTempName(const OString& prefix)
"XXXXXX") ) );
tmpFilePattern[ sizeof(tmpFilePattern)-1 ] = '\0';
- strncpy(tmpFilePattern, tmpPath, sizeof(tmpFilePattern)-1);
+ strncpy(tmpFilePattern, tmpPath.getStr(), sizeof(tmpFilePattern)-1);
strncat(tmpFilePattern, PATH_SEPARATOR, sizeof(tmpFilePattern)-1-strlen(tmpFilePattern));
strncat(tmpFilePattern, prefix.getStr(), sizeof(tmpFilePattern)-1-strlen(tmpFilePattern));
strncat(tmpFilePattern, "XXXXXX", sizeof(tmpFilePattern)-1-strlen(tmpFilePattern));
@@ -291,7 +291,7 @@ sal_Int32 compileFile(const OString * pathname)
cppArgs.append("\"");
OString cmdFileName = makeTempName(OString("idlc_"));
- FILE* pCmdFile = fopen(cmdFileName, "w");
+ FILE* pCmdFile = fopen(cmdFileName.getStr(), "w");
if ( !pCmdFile )
{
@@ -368,7 +368,7 @@ sal_Int32 compileFile(const OString * pathname)
if ( pOptions->isValid("-E") )
{
- if (unlink(preprocFile) != 0)
+ if (unlink(preprocFile.getStr()) != 0)
{
fprintf(stderr, "%s: Could not remove parser input file %s\n",
pOptions->getProgramName().getStr(), preprocFile.getStr());