diff options
-rw-r--r-- | idlc/source/idlc.cxx | 3 | ||||
-rw-r--r-- | jvmfwk/source/fwkbase.cxx | 6 | ||||
-rw-r--r-- | rsc/source/tools/rsctree.cxx | 4 | ||||
-rw-r--r-- | sc/qa/unit/helper/qahelper.hxx | 5 | ||||
-rw-r--r-- | svtools/source/uno/popupmenucontrollerbase.cxx | 3 |
5 files changed, 10 insertions, 11 deletions
diff --git a/idlc/source/idlc.cxx b/idlc/source/idlc.cxx index 2fd29096a5ee..4002b1395afd 100644 --- a/idlc/source/idlc.cxx +++ b/idlc/source/idlc.cxx @@ -153,10 +153,9 @@ static void SAL_CALL predefineXInterface(AstModule* pRoot) static void SAL_CALL initializePredefinedTypes(AstModule* pRoot) { - AstBaseType* pPredefined = NULL; if ( pRoot ) { - pPredefined = new AstBaseType(ET_long, OString("long"), pRoot); + AstBaseType* pPredefined = new AstBaseType(ET_long, OString("long"), pRoot); pRoot->addDeclaration(pPredefined); pPredefined = new AstBaseType(ET_ulong, OString("unsigned long"), pRoot); diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx index a25140111563..5a6693de7b92 100644 --- a/jvmfwk/source/fwkbase.cxx +++ b/jvmfwk/source/fwkbase.cxx @@ -366,7 +366,6 @@ rtl::OString BootParams::getClasspath() { rtl::OString sClassPath; rtl::OUString sCP; - char szSep[] = {SAL_PATHSEPARATOR,0}; if (Bootstrap::get()->getFrom( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_JAVA_JFW_CLASSPATH)), sCP) == sal_True) @@ -387,6 +386,7 @@ rtl::OString BootParams::getClasspath() char * pCp = getenv("CLASSPATH"); if (pCp) { + char szSep[] = {SAL_PATHSEPARATOR,0}; sClassPath += rtl::OString(szSep) + rtl::OString(pCp); } #if OSL_DEBUG_LEVEL >=2 @@ -602,7 +602,6 @@ rtl::OString makeClassPathOption(OUString const & sUserClassPath) //Compose the class path rtl::OString sPaths; rtl::OUStringBuffer sBufCP(4096); - char szSep[] = {SAL_PATHSEPARATOR,0}; // append all user selected jars to the class path if (!sUserClassPath.isEmpty()) @@ -613,7 +612,10 @@ rtl::OString makeClassPathOption(OUString const & sUserClassPath) if (!sAppCP.isEmpty()) { if (!sUserClassPath.isEmpty()) + { + char szSep[] = {SAL_PATHSEPARATOR,0}; sBufCP.appendAscii(szSep); + } sBufCP.append(sAppCP); } diff --git a/rsc/source/tools/rsctree.cxx b/rsc/source/tools/rsctree.cxx index 339ee393bc27..f424d43d3ef8 100644 --- a/rsc/source/tools/rsctree.cxx +++ b/rsc/source/tools/rsctree.cxx @@ -67,7 +67,6 @@ void BiNode::EnumNodes( Link aLink ) const{ |* *************************************************************************/ BiNode * BiNode::ChangeDLListBTree( BiNode * pList ){ - BiNode * pRightNode; BiNode * pMiddle; BiNode * pTmp; sal_uInt32 nEle, i; @@ -89,7 +88,8 @@ BiNode * BiNode::ChangeDLListBTree( BiNode * pList ){ pTmp->pRight = (BiNode *)0; // linken Zeiger auf Null - if( NULL != (pRightNode = pMiddle->Right()) ) + BiNode * pRightNode = pMiddle->Right(); + if (pRightNode) pRightNode->pLeft = (BiNode *)0; pMiddle->pLeft = ChangeDLListBTree( pList ); diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx index 86275f7d4077..b09a61e2991e 100644 --- a/sc/qa/unit/helper/qahelper.hxx +++ b/sc/qa/unit/helper/qahelper.hxx @@ -103,10 +103,9 @@ void loadFile(const OUString& aFileName, std::string& aContent) OString aOFileName = OUStringToOString(aFileName, RTL_TEXTENCODING_UTF8); #ifdef ANDROID - const char *contents; size_t size; if (strncmp(aOFileName.getStr(), "/assets/", sizeof("/assets/")-1) == 0) { - contents = (const char *) lo_apkentry(aOFileName.getStr(), &size); + const char *contents = (const char *) lo_apkentry(aOFileName.getStr(), &size); if (contents != 0) { aContent = std::string(contents, size); return; @@ -243,7 +242,7 @@ public: for ( unsigned int index=0; index<numElems; ++index ) { OUString sFileName = OUString::createFromAscii( aTestValues[ index ].sTestDoc ); - printf("aTestValues[%d] %s\n", index, OUStringToOString( sFileName, RTL_TEXTENCODING_UTF8 ).getStr() ); + printf("aTestValues[%u] %s\n", index, OUStringToOString( sFileName, RTL_TEXTENCODING_UTF8 ).getStr() ); int nImportType = aTestValues[ index ].nImportType; int nExportType = aTestValues[ index ].nExportType; ScDocShellRef xShell = loadDoc( sFileName, nImportType ); diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx index e2b29c0e3ee4..0469e928c3c3 100644 --- a/svtools/source/uno/popupmenucontrollerbase.cxx +++ b/svtools/source/uno/popupmenucontrollerbase.cxx @@ -85,10 +85,9 @@ void PopupMenuControllerBase::throwIfDisposed() throw ( RuntimeException ) // protected function void PopupMenuControllerBase::resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ) { - VCLXPopupMenu* pPopupMenu = 0; if ( rPopupMenu.is() && rPopupMenu->getItemCount() > 0 ) { - pPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( rPopupMenu ); + VCLXPopupMenu* pPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( rPopupMenu ); if ( pPopupMenu ) { SolarMutexGuard aSolarMutexGuard; |