summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-08-07 08:35:12 +0200
committerNoel Grandin <noel@peralex.com>2015-08-11 08:25:33 +0200
commit9d307abeec2a80e59af0f0af10dc42d90cd7441a (patch)
treeab939f6c7d0d65d0419fbe305bbc1501f1faceb8 /sal
parent12fb9096f562281c7ca4b7fed6a3342dac9a91b7 (diff)
new loplugin: defaultparams
find places where we do not need to be passing a parameter to a function, because that function has a default value which matches the value we are passing. Change-Id: I04d1fd6275204dd4925e6563282464f461123632
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/osl/file/osl_File.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index dbb9b123e980..b391f69f3243 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -355,7 +355,7 @@ inline bool checkDirectory( const ::rtl::OUString & str, oslCheckMode nCheckMode
break;
case osl_Check_Mode_ReadAccess:
//rc = pDir->getNextItem( rItem, 0 );
- rc = aDir.getNextItem( rItem, 0 );
+ rc = aDir.getNextItem( rItem );
if ( ( rc == ::osl::FileBase::E_None ) || ( rc == ::osl::FileBase::E_NOENT ) )
bCheckResult = true;
else
@@ -1255,7 +1255,7 @@ namespace osl_FileStatus
Directory pDir( aTmpName3 );
nError1 = pDir.open();
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
- nError1 = pDir.getNextItem( rItem, 0 );
+ nError1 = pDir.getNextItem( rItem );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
pDir.close();
/*
@@ -4228,7 +4228,7 @@ namespace osl_Directory
nError2 = testDirectory.reset();
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError2 );
//get reseted Item, if reset does not work, getNextItem() should return the second Item (aTmpName1)
- nError1 = testDirectory.getNextItem( rItem, 0 );
+ nError1 = testDirectory.getNextItem( rItem );
CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
//check the file name again
4-06fflush() followed by fclose() is redundantTakeshi Abe Change-Id: Iacb9332635cb6afa90ec1a72e96388b3b5b7b56c Reviewed-on: https://gerrit.libreoffice.org/52420 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-03-18Use for-range loops in hwpfilter, i18n*, idl* and ioJulien Nabet Change-Id: I980464162b73ed9ee0a09acbca1b9050af8d1027 Reviewed-on: https://gerrit.libreoffice.org/51492 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> 2018-03-05Make LibreOffice buildable on Haiku.Kacper Kasper * Obviously VCL wiring is missing, but most components do build. Change-Id: Ie853ada1423a8f4c2b647be59cd47a7730c42978 Reviewed-on: https://gerrit.libreoffice.org/50293 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> 2018-01-19SAL_W32 is just an alias for _WIN32Stephan Bergmann ...so consistently use the latter instead of the former Change-Id: I144d5e7c472632f93b2258461510346bc85892d9 Reviewed-on: https://gerrit.libreoffice.org/48135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2018-01-12More loplugin:cstylecast: idlcStephan Bergmann auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I1cb9e69b8138cb5bb63f18231018f166b67b3072 2017-09-11clang-tidy modernize-use-emplace in hwpfilter..lotuswordproNoel Grandin Change-Id: Ic11634ca28396fd156390c511087bae03bd5fb70 Reviewed-on: https://gerrit.libreoffice.org/42156 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-06-25loplugin:oncevar in helpcompiler..jvmfwkNoel Grandin Change-Id: Ia9b20a8ca95684cbeb21e3425972c43ba50df3cd Reviewed-on: https://gerrit.libreoffice.org/39187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-01-09New loplugin:externvar: idlcStephan Bergmann Change-Id: I7b892efd6a5267c228c4cf17e80fac82628fbb64 2016-11-02loplugin:oncevar in helpcompiler..reportdesignNoel Grandin Change-Id: I2dc57931fb230953c285aeb18f57c0a41fedafcb Reviewed-on: https://gerrit.libreoffice.org/30463 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> 2016-05-27Get rid of unnecessary directory levels $D/inc/$DTor Lillqvist Change-Id: Ibf313b8948a493043006ebf3a8281487c1f67b48 Reviewed-on: https://gerrit.libreoffice.org/25532 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> 2016-02-09Formatting changes across all modulesChris Sherlock + Removed comment cruft + Tab formatting in number of files + Some commented out code removed + Tab characters replaced with spaces + Newline cleanup in quite a few files + Tweak header guard #endifs Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc Reviewed-on: https://gerrit.libreoffice.org/22221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> 2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann Change-Id: Ic42387288c96436915956ede2eb510b9c3fbc49b 2015-10-07clang-analyzer-deadcode.DeadStoresStephan Bergmann Change-Id: I9c409cb2d7898ac6f395618cd950385cf036b002 2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann Change-Id: Iacc2cfe28571d7fffc375ad9b7f3b0da735e093f 2014-12-18fdo#39440 reduce scope of local variablesMichael Weghorn This addresses some cppcheck warnings. Change-Id: Ib16e4ecc0e0c43b2c1fb527eb0668a960ae9756e Reviewed-on: https://gerrit.libreoffice.org/13513 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> 2014-12-15add link to mkstemp coverity warning wrt threading fiascoCaolán McNamara Change-Id: Ic8fea32a163ca5e85ac3e2a34d04e4fa1a1943f9 2014-11-06Revert "use the new OUString::fromUtf8 method"Stephan Bergmann This reverts commit 05050cdb23de586870bf479a9df5ced06828d498, not all places that use e.g. OStringToOUString to convert potential UTF-8 are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and some places like e.g. in codemaker are happy with the best-effort effect of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS). 2014-11-06use the new OUString::fromUtf8 methodNoel Grandin Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77 2014-11-05fdo#38835 strip out OUString globalsNoel Grandin they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37 2014-10-29remove unnecessary 'using namespace rtl' declarationsNoel Grandin It turns out that almost none of them were necessary. Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83 Reviewed-on: https://gerrit.libreoffice.org/12133 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com> 2014-05-13Revert "CID#705985 ensure umask for mkstemp"Stephan Bergmann This reverts commit 5f5a981dd6df406b7bbddd88fa0b701b5a8d2246. Coverity warning about mkstemp without umask appears to be bogus (cf. <https://communities.coverity.com/message/6516> "Why are uses of mkstemp 'without securely setting umask first' being flagged?) and calling umask is not MT-safe, see fdo#60338 "FILESAVE: Saved files have incorrect permissions on linux." 2014-02-17idlc: sal_Bool -> boolStephan Bergmann Change-Id: Ibeed903d73eb8b3fce7b8c6021c9107437a8c813