summaryrefslogtreecommitdiff
path: root/rsc/source/parser/rscdb.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/parser/rscdb.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/parser/rscdb.cxx')
-rw-r--r--rsc/source/parser/rscdb.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 25d78f66d5b4..6af2194d4890 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -329,18 +329,15 @@ void RscTypCont :: WriteInc( FILE * fOutput, sal_uLong lFileKey )
}
else
{
- RscDepend * pDep;
- RscFile * pFile;
-
RscFile * pFName = aFileTab.Get( lFileKey );
if( pFName )
{
for ( size_t i = 0, n = pFName->aDepLst.size(); i < n; ++i )
{
- pDep = pFName->aDepLst[ i ];
+ RscDepend* pDep = pFName->aDepLst[ i ];
if( pDep->GetFileKey() != lFileKey )
{
- pFile = aFileTab.GetFile( pDep->GetFileKey() );
+ RscFile* pFile = aFileTab.GetFile( pDep->GetFileKey() );
if( pFile )
{
fprintf( fOutput, "#include " );
@@ -525,7 +522,6 @@ ERRTYPE RscTypCont::WriteRc( WriteRcContext& rContext )
void RscTypCont :: WriteSrc( FILE * fOutput, sal_uLong nFileKey,
bool bName )
{
- RscFile * pFName;
RscEnumerateRef aEnumRef( this, pRoot, fOutput );
unsigned char aUTF8BOM[3] = { 0xef, 0xbb, 0xbf };
@@ -534,6 +530,7 @@ void RscTypCont :: WriteSrc( FILE * fOutput, sal_uLong nFileKey,
SAL_WARN_IF(!bSuccess, "rsc", "short write");
if( bName )
{
+ RscFile* pFName;
WriteInc( fOutput, nFileKey );
if( NOFILE_INDEX == nFileKey )