From 8ec183056dd7a954d9af7b26432d7680a31e9896 Mon Sep 17 00:00:00 2001 From: Noel Date: Mon, 5 Oct 2020 09:28:37 +0200 Subject: loplugin:reducevarscope in sal Change-Id: I2ce95de07b8e0952a1e778e65940b30597396aa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103949 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sal/osl/unx/profile.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sal/osl') 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(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)); -- cgit