diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-05 09:28:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-05 14:41:59 +0200 |
commit | 8ec183056dd7a954d9af7b26432d7680a31e9896 (patch) | |
tree | 5d6e9a7ee435f3e9fc50b9b34373de1722f0f68b /sal/osl | |
parent | b65d21596b5773d744b242716a78308d2c3714d0 (diff) |
loplugin:reducevarscope in sal
Change-Id: I2ce95de07b8e0952a1e778e65940b30597396aa6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103949
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/unx/profile.cxx | 6 |
1 files changed, 3 insertions, 3 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)); |