summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)AuthorFilesLines
2016-07-19clang-tidy performance-unnecessary-value-param in salStephan Bergmann1-1/+1
Change-Id: I2931871fc80f52b79d070961a3709117d0a8fd3a
2016-07-15new loplugin unnecessary overrideNoel Grandin1-5/+0
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb Reviewed-on: https://gerrit.libreoffice.org/27135 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-13Remove __cplusplus-checks from apparently-C++-only filesStephan Bergmann1-4/+0
Change-Id: I87e9ce45cf945e75e8140a9d4608da8abcddada6 Reviewed-on: https://gerrit.libreoffice.org/27187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-13sal: fix remaining loplugin:cppunitassertequals warningsMiklos Vajna12-80/+80
Change-Id: I9f9b647ed73e06a5e926eff8f95dda92fec134c0 Reviewed-on: https://gerrit.libreoffice.org/27177 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-11loplugin:salbool: Better heuristic to determine code shared between C and C++Stephan Bergmann1-1/+1
Change-Id: I09c9c57d5adeb665cc2508fad9727085a3289bfb
2016-07-08loplugin:redundantcast: redundant static_casts in salStephan Bergmann1-5/+4
Change-Id: I2641f16530ec7f1087c217a74aeb39b5c3a8aba5
2016-07-08CppunitTest_sal_rtl_ostring: fix loplugin:cppunitassertequals warningsMiklos Vajna1-26/+26
Change-Id: Ie5168b9844dadd042bcbd825e8f48030ac1ef91c Reviewed-on: https://gerrit.libreoffice.org/27032 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-06Silence loplugin:staticmethods under --disable-debugStephan Bergmann1-0/+4
...after 0d3f9667bbc7b1a22d33dc92a2028fc712495a8e "AllocatorTraits::size can be static after all" Change-Id: I7fb2558c322dd7d92f3a3bda9a93a1b3da575d2e
2016-07-05Clarify calculation precedence tdf#39440Muhammet Kara1-9/+9
Use parentheses to clarify the code. Change-Id: I864dc6dacadb5b9ba9dca8e0abd9fa4e6db1eddc Reviewed-on: https://gerrit.libreoffice.org/25677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-07-01cppunittester: always print execution time of each testMichael Stahl1-6/+3
Not much point in disabling this by default, nobody but the author will find it. Change-Id: I637b214644d2cc7bc70b8bca4f214955355ea951
2016-07-01CppunitTest_sal_rtl_ostringbuffer: fix loplugin:cppunitassertequals warningsMiklos Vajna1-78/+78
Change-Id: I1b7710556f179f35694c05e209854bbcb152041f Reviewed-on: https://gerrit.libreoffice.org/26842 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-29move #includes to top of fileNoel Grandin2-3/+8
instead of being randomly embedded somewhere deep inside the CXX code. Found with: git grep -nP '^#include' -- *.cxx | sort -g -k 2 -t : Change-Id: I9ee432d3b665ecb6ec600bd51cc4b735a1b1127a Reviewed-on: https://gerrit.libreoffice.org/26764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-06-28AllocatorTraits::size can be static after allStephan Bergmann1-2/+2
Change-Id: If9ce8a094af878497e980cdcfaf11604d613e5b8
2016-06-27unit tests for stringToDouble() separator without digitsEike Rathke1-0/+35
Change-Id: I85cfe8123a6ef1c3a1aa1b1085e2961055dfa907
2016-06-27stringToDouble() do not parse separator without digit as 0.0Eike Rathke1-0/+13
Occurred in CSV import without "detect special numbers" activated for data like ,., where the . dot resulted in a numeric cell value 0 Change-Id: Ie715d7a8ed02196b59968a92919ad286b3bedf64
2016-06-27comfort the unhappy compilerEike Rathke1-4/+4
Change-Id: I376040a22b17037893704afbce2b651f8cf2c074
2016-06-27stringToDouble() fix broken reverse logic for NaN and INFEike Rathke2-1/+29
... and do not test up to three characters if the string is shorter.. Change-Id: I52b74cbde10c14c991cc8c68760c87c1e08ab7e4
2016-06-24clang-analyzer-deadcode.DeadStoresStephan Bergmann1-4/+4
Change-Id: Idb7996e9063955dbb8126243670bdc30bd8dd97a
2016-06-24CppunitTest_sal_rtl_digest: fix loplugin:cppunitassertequals warningsMiklos Vajna1-22/+22
Change-Id: Ic23ba93667f5de4b2cdb7868f9e3fc8cf8bacbd3 Reviewed-on: https://gerrit.libreoffice.org/26626 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-23tdf#99589 - tolower / toupper - dangerous to Turks ...Gökhan Gurbetoğlu1-1/+2
Change-Id: I8b0fe9354232a7b60f3605fa6f90f6741f7bf683 Reviewed-on: https://gerrit.libreoffice.org/26537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-20switch to EHs on windowsMarkus Mohrhard4-58/+3
This seems to be a good idea based on several discussions in the project. In the end catching SEH exceptions is just going to cause strange platform dependent bahavior. This patch is based on on http://thread.gmane.org/gmane.comp.documentfoundation.libreoffice.scm/39102/focus=55516 and includes some additional cleanup of the sal signal code. Change-Id: Iedc998e37e6495afec445eccb60fa1c2b1a7defd Reviewed-on: https://gerrit.libreoffice.org/26497 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-19loplugin:salbool: Implicit conversions from non-Boolean fundamental typesStephan Bergmann3-86/+153
Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
2016-06-18move the code for tdf#99410 to the sal init windows codeMarkus Mohrhard1-0/+6
Change-Id: I4ead30fa1736a3a99fb3379e89367934c8df2809 Reviewed-on: https://gerrit.libreoffice.org/26444 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-17Revert "fdo#38913: Prevent invalid parameter handler crashes"Stephan Bergmann1-28/+0
This reverts commit a82e532ce006c54b2740de74d1da5d11307da7c1. That hack should no longer be necessary now that the root cause for tdf#38913 has probably been found and fixed with b5876bfcb69a65c87d602bae687b3c0634c0a1e7 "passing a NULL pointer to fileno is not allowed". Conflicts: sal/osl/w32/salinit.cxx Change-Id: Id3a3d3163945acc9b5d5e74a8d357dfa2ce63f37 Reviewed-on: https://gerrit.libreoffice.org/26411 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-17CppunitTest_sal_rtl_cipher: fix loplugin:cppunitassertequals warningsMiklos Vajna2-20/+20
Change-Id: I94e79ae616d5cb9287e69544e283ce4d288a19ef Reviewed-on: https://gerrit.libreoffice.org/26401 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-09CppunitTest_sal_osl_old_test_file: fix loplugin:cppunitassertequals warningsMiklos Vajna7-39/+39
Also in: - CppunitTest_sal_osl_security - CppunitTest_sal_rtl_crc32 - CppunitTest_sal_osl_thread - CppunitTest_sal_rtl_locale - CppunitTest_sal_rtl_process - CppunitTest_sal_rtl_random Change-Id: I853457f4ddc387728ea4fa201c278c361369a591 Reviewed-on: https://gerrit.libreoffice.org/26085 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-07Replace VALID_CONVERSION macro with functionStephan Bergmann1-10/+32
...to avoid bogus -Werror=unused-result from trunk GCC in the macro expansion. Change-Id: I227a0edfb22255c31d285609761dbefb4e50e09a Reviewed-on: https://gerrit.libreoffice.org/26004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-03fix 32bit linux buildCaolán McNamara1-3/+3
Change-Id: Ib42627c04b2c06e34f2dd108f8a04eaea916488a
2016-06-03CppunitTest_sal_osl_file: fix loplugin:cppunitassertequals warningsMiklos Vajna1-270/+270
Change-Id: Ib0594ba236284aa69d180fb72ce60435b679ea05 Reviewed-on: https://gerrit.libreoffice.org/25852 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-03Teach loplugin:stringconstant about RTL_CONSTASCII_STRINGPARAMStephan Bergmann1-41/+12
Change-Id: I8ff0e104aad045f3835dc8facc760a8339b1d088
2016-05-30tdf#100021 - format argument issue in process.cxxRichard PALO1-1/+1
avoid warning whether pid_t is long or int Change-Id: I533175b53166cb233169902d277906f5ce979421 Signed-off-by: Richard PALO <richard@NetBSD.org> Reviewed-on: https://gerrit.libreoffice.org/25593 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-05-25SAL_FALLTRHOUGH in Windows-only codeStephan Bergmann2-0/+4
Change-Id: If35da46c209746a86687e1c3f60f72f2f08aa681
2016-05-22Convert oslCheckMode to scoped enumNoel Grandin1-13/+13
Change-Id: I7cd31d5624682bf7bd021586769593499d2481af Reviewed-on: https://gerrit.libreoffice.org/25204 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-22Convert AllocMode to scoped enumNoel Grandin3-12/+12
Change-Id: I642d7546059f1af993ab15eb3948949109df05c4 Reviewed-on: https://gerrit.libreoffice.org/25203 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18limit scanf string field widthJochen Nitschke1-2/+2
Change-Id: I9070bae914d923171b6eaf8209de00922dc87be7 Reviewed-on: https://gerrit.libreoffice.org/25052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-05-16get breakpad signal handler working on windowsMarkus Mohrhard1-2/+12
The LibreOffice signal handler overwrites the breakpad signal handler. Just store the old handler and call that handler before we do any work in our own handler. Our own handler implementation is just insane as we are even trying to take the SolarMutex which can easily deadlock. Change-Id: I2401bba18701115561d00c7fc11138ead2a48205 Reviewed-on: https://gerrit.libreoffice.org/25022 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-16fix typoMarkus Mohrhard1-1/+1
Change-Id: Icfc4b73d5664c205ad642c660af5227f403d20ff Reviewed-on: https://gerrit.libreoffice.org/25021 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-05-12-Werror,-Wimplicit-fallthroughTor Lillqvist1-6/+6
Fix "fallthrough annotation in unreachable code". Clang is clever enough to know that code after assert(false) is unreachable in a non-NDEBUG build. Seriously, micro-optimisation of the case that should never be reached? Change-Id: I10d7ae60895437be52c27aa93539d17e0f091ac4
2016-05-11sal: -Werror,-Wimplicit-fallthroughMichael Stahl1-2/+2
Change-Id: Id8262e735b9f95d8b476a4939c362648e2a4328a
2016-05-10Add SAL_FALLTHROUGH, where apparently appropriateStephan Bergmann3-0/+16
Change-Id: Ib67f7cb71255a32810f09a6b7e528f024bbef9df
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann3-10/+8
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-05clang-tidy modernize-loop-convert in oox to saxNoel Grandin2-17/+17
Change-Id: If0d87b6679765fc6d1f9300c6972845cf3742b9c Reviewed-on: https://gerrit.libreoffice.org/24674 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-02sal_Bool -> boolStephan Bergmann1-2/+2
Change-Id: I6e86cb7ffbd8c8cbf3cccaef656cf7b7e755e24f
2016-04-26update loplugin stylepolice to check local pointers varsNoel Grandin1-9/+1
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1 Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-22Avoid reserved identifiersStephan Bergmann1-5/+5
Change-Id: I0164df28e2d05f4f73bd640d3ca3cc3220b57df6
2016-04-22Is __OPENTRANSPORTPROVIDERS__ (still) neededStephan Bergmann1-1/+0
...to be set before including Carbon/Carbon.h? Was originally introduced with c34f2e30bbad1a6b92308d0daabe413bd1bc161b "INTEGRATION: CWS pj51: #i61959# patch applied", but might just be cargo cult these days. Change-Id: I20cdc938d28e075614f6711a06ab785700833aff Reviewed-on: https://gerrit.libreoffice.org/24293 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-21Remove redundant checksStephan Bergmann1-2/+0
(that started to cause loplugin:salbool after 13758a3d154e8e450fdfe8bcdeb6b3a03996c53a "SourceManager::isMacroArgExpansion has only one param in older Clang") Change-Id: Ibbdf4552d81385cf952e2d47d1fe23daf78824b5
2016-04-21new plugin stylepoliceNoel Grandin1-12/+12
check for local variables which follow our member field naming convention, which is highly confusing Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann18-111/+111
Change-Id: I6c656f991999791469015500aff1905fdb16ba65
2016-04-18clean-up: unused using declarations and includesJochen Nitschke4-8/+0
Searched source for using declarations. Checked if those symbols reappear in the source file, even in comments or dead code but not in #include statements. If they don't reappear, remove the declaration. Remove includes whose symbol got removed. Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0 Reviewed-on: https://gerrit.libreoffice.org/24148 Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>