diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2015-08-22 16:50:56 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-08-23 06:02:42 +0000 |
commit | b712b1f63492a311e4a51cffd516b3e202a140e6 (patch) | |
tree | 6703ded631b477680b87da3f1fe6b398c595e5f7 /sal | |
parent | 93cd7b78c29c11ccc87c19c845c6617acb834630 (diff) |
tdf#39440 cppcheck: redundantAssignment
This addresses some of cppcheck's "redundantAssignment" warnings
("Variable '<varName>' is reassigned a value before the old one
has been used").
Change-Id: I8fd2950d5aa1a3f4bd9e1c4c336abe465d1f657e
Reviewed-on: https://gerrit.libreoffice.org/17926
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/rtl/locale/rtl_locale.cxx | 3 | ||||
-rw-r--r-- | sal/workben/testfile.cxx | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/sal/qa/rtl/locale/rtl_locale.cxx b/sal/qa/rtl/locale/rtl_locale.cxx index ef8d7e31a656..f2b03fefebd1 100644 --- a/sal/qa/rtl/locale/rtl_locale.cxx +++ b/sal/qa/rtl/locale/rtl_locale.cxx @@ -269,8 +269,7 @@ public: rtl_Locale* pData1 = rtl_locale_register(rtl::OUString("en").getStr(), rtl::OUString("US").getStr(), rtl::OUString().getStr()); rtl_Locale* pData2 = rtl_locale_register(rtl::OUString("en").getStr(), rtl::OUString("US").getStr(), rtl::OUString().getStr()); - bool bLocaleAreEqual = false; - bLocaleAreEqual = (pData1 == pData2); + bool bLocaleAreEqual = (pData1 == pData2); CPPUNIT_ASSERT_MESSAGE("check operator ==()", bLocaleAreEqual); } diff --git a/sal/workben/testfile.cxx b/sal/workben/testfile.cxx index addb1b6b8603..dd9448bce907 100644 --- a/sal/workben/testfile.cxx +++ b/sal/workben/testfile.cxx @@ -2455,10 +2455,8 @@ void print_error( const ::rtl::OString& str, FileBase::RC rc ) int MAIN( int argc, char* argv[] ) { - sal_Bool fSuccess=sal_False; - //Initialization - fSuccess=Initialize(); + sal_Bool fSuccess=Initialize(); if ( !fSuccess ) { printf("Error during Initialization"); |