summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)Author
2017-06-09clang-tidy readability-non-const-parameterNoel Grandin
Change-Id: I7b2680898dbfc49185fb949349d81f4ac615a470 Reviewed-on: https://gerrit.libreoffice.org/38593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-08Avoid -fsanitize=signed-integer-overflowStephan Bergmann
...in recently introduced basic/qa/basic_coverage/test_string_overflow_safe.vb in CppunitTest_basic_macros Change-Id: Ib33272afa26e90729617cb86ae979c0b35b45f62
2017-06-07tdf#108039: check for nullptr in rtl_uString and OUStringMike Kaganski
rtl_[u]String_newConcat now checks allocation result to return early and avoid SIGSEGV. Other functions are not modified, to keep old behavior relying on allocation success and crashing early on OOM to avoid added overhead in performance-critical places. OUString operator+= now checks rtl_uString_newConcat result and throws std::bad_alloc on failure, to specifically address BASIC problem. It keeps strong exception guarantee of leaving this' state unaltered. Concatenation in BASIC now checks for bad string allocation (previously SIGSEGV was generated). Unit test included. Change-Id: I1513311d3d58eac43b2d2ec9a230e22dff0b4245 Reviewed-on: https://gerrit.libreoffice.org/37965 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-06-07sal: use thread safe local static in getInternMutexJochen Nitschke
Change-Id: Iac7ca87e05228f3a2a187646496869a8b1bff602 Reviewed-on: https://gerrit.libreoffice.org/38436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06add COVERITY_NOEXCEPT_FALSECaolán McNamara
to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-31clang-tidy readability-redundant-control-flowNoel Grandin
Change-Id: I832f7ef0f1bd55e365db7e49823fe8bc30390c04 Reviewed-on: https://gerrit.libreoffice.org/38215 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-30sal,external: remove checks for obsolete VCVER=120Michael Stahl
Change-Id: I4d32b7c4b2e545a8d979bc516f64cfcbf66ecd07
2017-05-30sal,sd: remove deprecated Windows XP socket codeMichael Stahl
Change-Id: I220911496ed2734224b1eb96a929ec8d8bf2a3ef
2017-05-30Make loplugin:redundantcast accept bool(FD_ISSET(...)) againStephan Bergmann
Change-Id: I4e96c55c246cf806f17df31844a00d0e8a5e4f56
2017-05-30teach redundantcast plugin about functional castsNoel Grandin
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-29osl: qa test of %2F - for file URIs this is invalidChris Sherlock
Change-Id: I3871355bb4556b408504ab70194885a2084ad80b Reviewed-on: https://gerrit.libreoffice.org/37859 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-05-29remove some unnecessary OString constructor callsNoel Grandin
Change-Id: I11358f17770cacb2a33011797f4be82dc02340b7 Reviewed-on: https://gerrit.libreoffice.org/38130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-27osl: remove LLA sigs, fix typos and convert to Doxygen commentChris Sherlock
Change-Id: I07311894c25a906d0f3d64f39684851c7b23d672 Reviewed-on: https://gerrit.libreoffice.org/37872 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-27osl: convert to variable == value, not value == variableChris Sherlock
Change-Id: I20e68c135f43d03cf6035eda488c85a2067910e0 Reviewed-on: https://gerrit.libreoffice.org/37864 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20tdf#107968 - double slash handling misleading; add unit testChris Sherlock
Change-Id: Ide52926eff56065e7368615338ea33dcb2f87c62 Reviewed-on: https://gerrit.libreoffice.org/37850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-05-18Revert "Fix typos"Stephan Bergmann
This reverts commit 26a67002fcb9381b54de6cae1aaa37120d49066a. "Iff" is not a typo, see 2a65bf32ec270484dcea4d22d3c93552dc0c24dd "Revert 'Typo: iff->if'".
2017-05-18Fix typosAndrea Gelmini
Only replaced "iff" with "if" Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581 Reviewed-on: https://gerrit.libreoffice.org/37782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-17Fix integer typesStephan Bergmann
Change-Id: Ia2dc32929da789622ed98764944d4e412a296639 Reviewed-on: https://gerrit.libreoffice.org/37723 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-05-17BOOL -> boolStephan Bergmann
Change-Id: Ie1ee8b93753e03326d2a121dcd18a1b6a7038ce3 Reviewed-on: https://gerrit.libreoffice.org/37722 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-05-17wchar_t -> sal_UnicodeStephan Bergmann
Change-Id: I8e4f11225e5020159cfd373bd6c0526541d7cc65 Reviewed-on: https://gerrit.libreoffice.org/37721 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-05-17Remove unused VALIDATEPATH_ALLOW_WILDCARDSStephan Bergmann
Change-Id: Ia006d66df7bf90e6b4da327cd1bcb06968cc72f6 Reviewed-on: https://gerrit.libreoffice.org/37720 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-05-17BOOL -> boolStephan Bergmann
Change-Id: I0cb5f19369ec5f61660a598288fd23700f5d4159 Reviewed-on: https://gerrit.libreoffice.org/37719 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-05-17Remove IsValidFilePath lppError parameter; always nullStephan Bergmann
Change-Id: Ia13c62cdd8ff8b930f82d32310f10fa5279cae81 Reviewed-on: https://gerrit.libreoffice.org/37718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-05-17Remove osl_getFileURLFromSystemPath_Stephan Bergmann
Change-Id: I8dd11b2f4cc9f4f1f622181fe478a4c180eb2af0 Reviewed-on: https://gerrit.libreoffice.org/37717 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-05-17Add some unit tests for rtl_math_StringFormat_GEike Rathke
Change-Id: I010c35905789d2c5f60f7f1c4d9ad4caf60146ee
2017-05-16Extend loplugin:comparisonwithconstant beyond integral typesStephan Bergmann
Change-Id: Id3a8fd5d8b9975d3ae49af0648b39454310495fa
2017-05-16Try to fix loplugin:comparisonwithconstant's rewrite-with-macros issueStephan Bergmann
...that had plagued 2e293a731c1559c9869dfcb32491bc600fc18e4e "new loplugin/rewriter comparisonwithconstant" (in sal/osl/unx/pipe.cxx), and auto-rewrite the remaining occurrences in sal (that the mentioned commit had failed to address, for whatever reason) Change-Id: I3dc3bae8dd92ba8bf576f6e06e7c9ee21f883661
2017-05-15coverity#1408971 Mixing enum typesCaolán McNamara
Change-Id: I30c46f2bd8a0ae059722f60a3103e5c7883d6a2d Reviewed-on: https://gerrit.libreoffice.org/37630 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-14osl: cleanup file_url.cxxChris Sherlock
Change-Id: I636b0a7765be8e6e96e90ff5a004dc452048541a
2017-05-14osl: osl_File.cxx unit test formatting cleanupChris Sherlock
Change-Id: I0e0386834e9cf76cd3c606ae01175aec9cf7e4f1
2017-05-13osl: osl_File.cxx indent fixesChris Sherlock
Change-Id: I4bd6fc88950e8e6fd5648f4a76201c135352e406
2017-05-13osl: final cleanup of sal_File.cxx unit testChris Sherlock
Change-Id: I00201c5456904a537e349fa5e30be223b744fc5e
2017-05-13osl: osl_File.cxx header cleanupChris Sherlock
Change-Id: I9c76e2ef0ee7f28a51c0011ceb7e9e2f45f15ea7
2017-05-13osl: osl_File.cxx qa test - remove osl namespace prefixesChris Sherlock
Change-Id: Iacb82eff69ce5690ad0a054953835863c57dcce0
2017-05-13osl: osl_File.cxx qa file cleanupChris Sherlock
Change-Id: I4973cc0c8445f67cd2b3f6a9d158d6592c190447
2017-05-13osl: file test - space between C comment token and start of commentChris Sherlock
Change-Id: Idf44ed079f04b16f2e8d718358567cfafecbe388
2017-05-13osl: remove commented code from file testChris Sherlock
Change-Id: I85c41a6821e675874e9dae2ab4bfad35b7aebc59
2017-05-13osl: remove extraneous comment cruft from test sourceChris Sherlock
Change-Id: I1a7b5fc62359cd24593fadea1185db7e48c22961
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-07osl: remove comment cruft, whitespace cleanup of thread.cxxChris Sherlock
Change-Id: I4941e02b011b8e630b00d8a14703651d1f956563
2017-05-07osl: remove comment cruft, whitespace cleanup of process.cxxChris Sherlock
Change-Id: I9609306dfe70595e67ee6100ce236e849e7a3eca
2017-05-04Replace all OUString("") with OUString()Arnaud Versini
Change-Id: Ie14c4d76cb61cfbe0410103adfc1afc8ade0f3e0 Reviewed-on: https://gerrit.libreoffice.org/37146 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-03Work around GCC 7 mis-featureStephan Bergmann
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354> "Poor support to silence -Wformat-truncation=1" Change-Id: I486f8a3a12896df3d9506f53bca44a318e23c991
2017-05-03remove empty commentsNoel Grandin
found with: git ls-files | xargs grep -Pzl '/\*\* (\*|\s| )*\*/' Change-Id: I1f47bcb94d5a7b290a6c622c6941195fbb578597 Reviewed-on: https://gerrit.libreoffice.org/37159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-28loplugin:salunicodeliteral: salStephan Bergmann
Change-Id: I1b7c3f8de5b09c96e27aa9124096b00638afb3f3
2017-04-28loplugin:cppunitassertequals: salStephan Bergmann
Change-Id: I6ba9a18a1d227461e023259662635e3008ad7c9b
2017-04-27sal: cppunittester: verify that CPPUNIT_TEST_NAME contains a testMichael Stahl
Fail the test if CPPUNIT_TEST_NAME does not contain at least one existing test, which is much better than silently reporting OK(0). Change-Id: If2137764b24aa52dc35fe2368ee8fe38cb7dbece
2017-04-26loplugin:redundantcast (clang-cl)Stephan Bergmann
Change-Id: I5164bc1bfa1aaae0f648e0384227d92c8b2ff7a3
2017-04-26loplugin:useuniqueptr (clang-cl)Stephan Bergmann
Change-Id: I491fb1fdcc3f5f64e4adb7276217bbdc13a1fa19
2017-04-26-Werror,-Wunused-macros (clang-cl)Stephan Bergmann
Change-Id: I64fa44caecd3f86bd23dc625e72c134659610b1a