summaryrefslogtreecommitdiff
path: root/rsc/source/rsc/rsc.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2014-12-19 10:24:04 +0100
committerNoel Grandin <noelgrandin@gmail.com>2014-12-19 13:48:56 +0000
commit5712983f18e7cdec16ea20a9b3d94a1586de543e (patch)
tree80180ebbf5662ead34dff534e5a14b251dafa28d /rsc/source/rsc/rsc.cxx
parent1e2786ac6d51838308c27a2cb84ce8ad9acd59c9 (diff)
fdo#39440 rsc: reduce scope of local variables
This addresses some cppcheck warnings. Change-Id: I69454a75c8ce4aecf9e68f5887f38f8bf6fe6dca Reviewed-on: https://gerrit.libreoffice.org/13543 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'rsc/source/rsc/rsc.cxx')
-rw-r--r--rsc/source/rsc/rsc.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 4b48405b76cf..3a2115bca037 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -390,7 +390,6 @@ void RscCompiler::EndCompile()
if( !(pCL->nCommands & NOSYNTAX_FLAG) )
{
FILE * foutput;
- RscFile * pFN;
if( NULL == (foutput = fopen( pCL->aOutputSrs.getStr(), "w" )) )
pTC->pEH->FatalError( ERR_OPENFILE, RscId(), pCL->aOutputSrs.getStr() );
@@ -400,7 +399,7 @@ void RscCompiler::EndCompile()
sal_uIntPtr aIndex = pTC->aFileTab.FirstIndex();
while( aIndex != UNIQUEINDEX_ENTRY_NOTFOUND )
{
- pFN = pTC->aFileTab.Get( aIndex );
+ RscFile* pFN = pTC->aFileTab.Get( aIndex );
if( !pFN->IsIncFile() )
{
pTC->WriteSrc( foutput, NOFILE_INDEX, false );
@@ -476,14 +475,13 @@ ERRTYPE RscCompiler :: ParseOneFile( sal_uLong lFileKey,
aError = ERR_ERROR;
else if( !pFName->bLoaded )
{
- RscDepend * pDep;
//Include-Dateien vorher lesen
pFName->bLoaded = true; //Endlos Rekursion vermeiden
for ( size_t i = 0; i < pFName->aDepLst.size() && aError.IsOk(); ++i )
{
- pDep = pFName->aDepLst[ i ];
+ RscDepend* pDep = pFName->aDepLst[ i ];
aError = ParseOneFile( pDep->GetFileKey(), pOutputFile, pContext );
}