diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-09-27 20:21:15 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-09-27 20:22:03 +0200 |
commit | 6671fa81db0ecea4ada005bb79f55f08fb440ad4 (patch) | |
tree | 85ad806ece8d60736b6b01310b04b053dc2f8179 /idlc | |
parent | b6d8251eee90b7e24ebb3f8452eff36a507e6d91 (diff) |
Removed uses of rtl::O[U]String[Buffer]::operator sal_{char|Unicode} const *().
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/source/idlccompile.cxx | 8 | ||||
-rw-r--r-- | idlc/source/options.cxx | 3 |
2 files changed, 5 insertions, 6 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()); diff --git a/idlc/source/options.cxx b/idlc/source/options.cxx index a56852dc778e..407f85e4cc4e 100644 --- a/idlc/source/options.cxx +++ b/idlc/source/options.cxx @@ -229,10 +229,9 @@ bool Options::initOptions(std::vector< std::string > & rArgs) throw(IllegalArgum sal_Int32 k = 0; do { - OStringBuffer token; token.append("-I\""); token.append(param.getToken(0, ';', k)); token.append("\""); if (buffer.getLength() > 0) buffer.append(' '); - buffer.append(token); + buffer.append("-I\""); buffer.append(param.getToken(0, ';', k)); buffer.append("\""); } while (k != -1); param = buffer.makeStringAndClear(); } |