[Libreoffice-commits] .: desktop/source desktop/unx desktop/win32
Julien Nabet
serval2412 at kemper.freedesktop.org
Mon Jan 31 13:50:24 PST 2011
desktop/source/app/appinit.cxx | 2 +-
desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 2 +-
desktop/source/migration/services/jvmfwk.cxx | 4 ++--
desktop/source/splash/splash.cxx | 12 ++++--------
desktop/unx/source/splashx.c | 1 -
desktop/unx/source/start.c | 5 ++---
desktop/win32/source/setup/setup_main.cxx | 2 +-
7 files changed, 11 insertions(+), 17 deletions(-)
New commits:
commit ea5d2e31054de85f5666328fed353920feb2d5f2
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Mon Jan 31 22:50:13 2011 +0100
Some cppcheck cleaning
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 3ea394b..c3b54f2 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -173,7 +173,7 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
}
}
}
- } catch (RuntimeException e) {
+ } catch (RuntimeException &e) {
}
}
#endif // GNOME_VFS_ENABLED
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index b500880..590b8da 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -821,10 +821,10 @@ void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly )
return;
css::uno::Sequence< css::uno::Sequence< rtl::OUString > > aItemList;
- sal_Int32 nCount = 0;
if ( ! bRecheckOnly )
{
+ sal_Int32 nCount = 0;
for ( sal_Int16 i = 0; i < m_updates.getItemCount(); ++i )
{
css::uno::Sequence< rtl::OUString > aItem(2);
diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx
index 6978ce0..5c58b9e 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -78,7 +78,7 @@ public:
JavaInfo* pData;
CJavaInfo();
~CJavaInfo();
- operator JavaInfo* ();
+ operator JavaInfo* () const;
};
CJavaInfo::CJavaInfo(): pData(NULL)
@@ -90,7 +90,7 @@ CJavaInfo::~CJavaInfo()
jfw_freeJavaInfo(pData);
}
-CJavaInfo::operator JavaInfo*()
+CJavaInfo::operator JavaInfo*() const
{
return pData;
}
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index d316f76..c25824d 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -322,8 +322,6 @@ void SplashScreen::loadConfig()
if ( sProgressFrameColor.getLength() )
{
UINT8 nRed = 0;
- UINT8 nGreen = 0;
- UINT8 nBlue = 0;
sal_Int32 idx = 0;
sal_Int32 temp = sProgressFrameColor.getToken( 0, ',', idx ).toInt32();
if ( idx != -1 )
@@ -333,8 +331,8 @@ void SplashScreen::loadConfig()
}
if ( idx != -1 )
{
- nGreen = static_cast< UINT8 >( temp );
- nBlue = static_cast< UINT8 >( sProgressFrameColor.getToken( 0, ',', idx ).toInt32() );
+ UINT8 nGreen = static_cast< UINT8 >( temp );
+ UINT8 nBlue = static_cast< UINT8 >( sProgressFrameColor.getToken( 0, ',', idx ).toInt32() );
_cProgressFrameColor = Color( nRed, nGreen, nBlue );
}
}
@@ -342,8 +340,6 @@ void SplashScreen::loadConfig()
if ( sProgressBarColor.getLength() )
{
UINT8 nRed = 0;
- UINT8 nGreen = 0;
- UINT8 nBlue = 0;
sal_Int32 idx = 0;
sal_Int32 temp = sProgressBarColor.getToken( 0, ',', idx ).toInt32();
if ( idx != -1 )
@@ -353,8 +349,8 @@ void SplashScreen::loadConfig()
}
if ( idx != -1 )
{
- nGreen = static_cast< UINT8 >( temp );
- nBlue = static_cast< UINT8 >( sProgressBarColor.getToken( 0, ',', idx ).toInt32() );
+ UINT8 nGreen = static_cast< UINT8 >( temp );
+ UINT8 nBlue = static_cast< UINT8 >( sProgressBarColor.getToken( 0, ',', idx ).toInt32() );
_cProgressBarColor = Color( nRed, nGreen, nBlue );
}
}
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index a4b9abd..4aa5622 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -459,7 +459,6 @@ static void suppress_decorations_motif()
struct {
unsigned long flags, functions, decorations;
long input_mode;
- unsigned long status;
} mwmhints;
Atom a = XInternAtom( display, "_MOTIF_WM_HINTS", False );
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index d747a7d..4698ad8 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -462,8 +462,6 @@ static void
get_bootstrap_value( int *array, int size, rtlBootstrapHandle handle, const char *name )
{
rtl_uString *pKey = NULL, *pValue = NULL;
- sal_Int32 nIndex = 0;
- int i = 0;
/* get the value from the ini file */
rtl_uString_newFromAscii( &pKey, name );
@@ -473,7 +471,8 @@ get_bootstrap_value( int *array, int size, rtlBootstrapHandle handle, const char
if ( rtl_uString_getLength( pValue ) > 0 )
{
rtl_uString *pToken = NULL;
-
+ int i = 0;
+ sal_Int32 nIndex = 0;
for ( ; ( nIndex >= 0 ) && ( i < size ); ++i )
{
nIndex = rtl_uString_getToken( &pToken, pValue, 0, ',', nIndex );
diff --git a/desktop/win32/source/setup/setup_main.cxx b/desktop/win32/source/setup/setup_main.cxx
index effd3de..4e44473 100644
--- a/desktop/win32/source/setup/setup_main.cxx
+++ b/desktop/win32/source/setup/setup_main.cxx
@@ -129,7 +129,7 @@ extern "C" int __stdcall WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, int )
{
pSetup->DisplayError( ERROR_OUTOFMEMORY );
}
- catch ( UINT nErr )
+ catch ( UINT &nErr )
{
pSetup->DisplayError( nErr );
}
More information about the Libreoffice-commits
mailing list