diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/profile.cxx | 6 | ||||
-rw-r--r-- | sal/qa/osl/pipe/osl_Pipe.cxx | 3 | ||||
-rw-r--r-- | sal/rtl/byteseq.cxx | 7 | ||||
-rw-r--r-- | sal/rtl/ustring.cxx | 4 |
4 files changed, 9 insertions, 11 deletions
diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index 31cfc8575f73..354fe626f390 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -488,12 +488,10 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, const char* pszEntry, const char* pszString) { - sal_uInt32 i; bool bRet = false; sal_uInt32 NoEntry; char* pStr; char* Line = nullptr; - osl_TProfileSection* pSec; osl_TProfileImpl* pProfile = nullptr; osl_TProfileImpl* pTmpProfile = static_cast<osl_TProfileImpl*>(Profile); @@ -525,6 +523,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, if (! (pProfile->m_Flags & osl_Profile_SYSTEM)) { + osl_TProfileSection* pSec; if ((pSec = findEntry(pProfile, pszSection, pszEntry, &NoEntry)) == nullptr) { Line[0] = '\0'; @@ -559,6 +558,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, if (NoEntry >= pSec->m_NoEntries) { + sal_uInt32 i; if (pSec->m_NoEntries > 0) i = pSec->m_Entries[pSec->m_NoEntries - 1].m_Line + 1; else @@ -581,7 +581,7 @@ sal_Bool SAL_CALL osl_writeProfileString(oslProfile Profile, } else { - i = pSec->m_Entries[NoEntry].m_Line; + sal_uInt32 i = pSec->m_Entries[NoEntry].m_Line; free(pProfile->m_Lines[i]); pProfile->m_Lines[i] = strdup(Line); setEntry(pProfile, pSec, NoEntry, i, pProfile->m_Lines[i], strlen(pszEntry)); diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx index f9e2bb16174e..eef77e998380 100644 --- a/sal/qa/osl/pipe/osl_Pipe.cxx +++ b/sal/qa/osl/pipe/osl_Pipe.cxx @@ -802,7 +802,6 @@ namespace osl_StreamPipe void SAL_CALL run( ) override { //create pipe. - sal_Int32 nChars; printf("listen\n"); if ( !aListenPipe.is() ) { @@ -819,7 +818,7 @@ namespace osl_StreamPipe } printf("write\n"); // write to pipe - nChars = aConnectionPipe.write( m_pTestString1.getStr(), m_pTestString1.getLength() + 1 ); + sal_Int32 nChars = aConnectionPipe.write( m_pTestString1.getStr(), m_pTestString1.getLength() + 1 ); if ( nChars < 0) { printf("server write failed! \n"); diff --git a/sal/rtl/byteseq.cxx b/sal/rtl/byteseq.cxx index c78a1e22f43a..3c4967d5456d 100644 --- a/sal/rtl/byteseq.cxx +++ b/sal/rtl/byteseq.cxx @@ -39,13 +39,14 @@ static sal_Sequence aEmpty_rtl_ByteSeq = void SAL_CALL rtl_byte_sequence_reference2One( sal_Sequence ** ppSequence ) SAL_THROW_EXTERN_C() { - sal_Sequence * pSequence, * pNew; + sal_Sequence * pSequence; OSL_ENSURE( ppSequence, "### null ptr!" ); pSequence = *ppSequence; if (pSequence->nRefCount > 1) { + sal_Sequence *pNew; sal_Int32 nElements = pSequence->nElements; if (nElements) { @@ -75,7 +76,7 @@ void SAL_CALL rtl_byte_sequence_reference2One( void SAL_CALL rtl_byte_sequence_realloc( sal_Sequence ** ppSequence, sal_Int32 nSize ) SAL_THROW_EXTERN_C() { - sal_Sequence * pSequence, * pNew; + sal_Sequence * pSequence; sal_Int32 nElements; assert(ppSequence && "### null ptr!"); @@ -87,7 +88,7 @@ void SAL_CALL rtl_byte_sequence_realloc( if (pSequence->nRefCount > 1) // split { - pNew = static_cast<sal_Sequence *>(malloc( SAL_SEQUENCE_HEADER_SIZE + nSize )); + sal_Sequence *pNew = static_cast<sal_Sequence *>(malloc( SAL_SEQUENCE_HEADER_SIZE + nSize )); if ( pNew != nullptr ) { diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx index cbadddc6a98e..7b6687f74bd5 100644 --- a/sal/rtl/ustring.cxx +++ b/sal/rtl/ustring.cxx @@ -1054,14 +1054,12 @@ void SAL_CALL rtl_uString_internConvert( rtl_uString ** newStr, static void internRelease (rtl_uString *pThis) { - oslMutex pPoolMutex; - rtl_uString *pFree = nullptr; if ( SAL_STRING_REFCOUNT( osl_atomic_decrement( &(pThis->refCount) ) ) == 0) { RTL_LOG_STRING_INTERN_DELETE(pThis); - pPoolMutex = getInternMutex(); + oslMutex pPoolMutex = getInternMutex(); osl_acquireMutex( pPoolMutex ); rtl_str_hash_remove (pThis); |