summaryrefslogtreecommitdiff
path: root/sal
AgeCommit message (Collapse)Author
2017-02-23There's no way to create an oslVolumeDeviceHandle for unxStephan Bergmann
...so the functions operating on them can all just return osl_File_E_INVAL. (The way to create an oslVolumeDeviceHandle is via osl_getVolumeInformation storing it into oslVolumeInfo.pDeviceHandle. But the unx implementation of osl_getVolumeInformation never sets that, so it'll stay at the null value that callers must initialize it to.) Change-Id: Ibabd89e8f9de0892a0e815d30b6397f869e7df70
2017-02-23Silence -Werror=format-overflowStephan Bergmann
Change-Id: I09abf54d67d0033ff3f8d61498ab094745c2081b
2017-02-23-Werror=format-truncationStephan Bergmann
Change-Id: I1b27289724389018bd4048573e8c8e4cf28eb983
2017-02-21Kill bitrot Emscripten experimentKhaled Hosny
Change-Id: I1cd5331157e684afb01e6555168ce646194c6ff2 Reviewed-on: https://gerrit.libreoffice.org/34493 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2017-02-21loplugin:subtlezeroinit: salStephan Bergmann
Change-Id: I70e79b6fd36c3ccff9e6906f46cecaa0f19c5a7f
2017-02-20silence coverity#1202740 Bad bit shift operationCaolán McNamara
Change-Id: I88c38a1a7eae0d1e2011c40983490efef1ff6438
2017-02-16remove unused Exist from oslCheckMode enumNoel Grandin
Change-Id: I1ad187342444c5e92b61578d2a67cce2ae5ac428
2017-02-13Fix typosAndrea Gelmini
Change-Id: Iaf6bbe81f519d49b82f624282d786c8cc18d641c Reviewed-on: https://gerrit.libreoffice.org/34199 Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com> Tested-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-02-10Remove MinGW supportStephan Bergmann
In OOo times, there'd originally been efforts to allow building on Windows with MinGW. Later, in LO times, this has been shifted to an attempt of cross- compiling for Windows on Linux. That attempt can be considered abandoned, and the relevant code rotting. Due to this heritage, there are now three kinds of MinGW-specific code in LO: * Code from the original OOo native Windows effort that is no longer relevant for the LO cross-compilation effort, but has never been removed properly. * Code from the original OOo native Windows effort that is re-purposed for the LO cross-compilation effort. * Code that has been added specifially for the LO cross-compilation effort. All three kinds of code are removed. (An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing --with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.) Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568 Reviewed-on: https://gerrit.libreoffice.org/34127 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-10-Werror=unused-parameterStephan Bergmann
Change-Id: I63e466f8a1e2fbbf1b1bd84f491b37026909b1eb
2017-02-09-Werror,-Wunused-macrosStephan Bergmann
Change-Id: I06a6b6fa51fe437661610a4a678cd2d410bb1e4c
2017-02-09Dummy implementations of backtrace/backtrace_symbols on Android, tooStephan Bergmann
pt#2 Change-Id: I5cc280613879786bd723019d630edb5a920419b9
2017-02-09Some clean upStephan Bergmann
No more need to call sal_detail_log_report from sal_detail_log, now that it is called from SAL_DETAIL_LOG_STREAM since b3a11c8f4f307bbbb597c9c6e7e61ee93e794873 "tdf#91872: Make SAL_INFO and friends more efficient". Change-Id: Idb6cf7a4814abe29d5ba68591f39b4279267bc9b
2017-02-09Fold sal_detail_log_backtrace into sal_detail_logStephan Bergmann
...the latter is LO-privately exported from sal, so it should be OK to add one more parameter to it. Change-Id: If6bf3458433aac2cc8b4e0cbd1602306051a777b Reviewed-on: https://gerrit.libreoffice.org/34080 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-09Dummy implementations of backtrace/backtrace_symbols on Android, tooStephan Bergmann
Change-Id: Ibbab23a9332c3475ab6ce5654999f040e936acfb
2017-02-09Proper -Werror,-Wunused-parameter fix for C codeStephan Bergmann
Change-Id: I2ebd350c3c39f848f5a39fa120154dc449173434
2017-02-09-Werror,-Wunused-parameterStephan Bergmann
Change-Id: I1a52e05994d6a31aa5e65bc3357f48258fb6f049
2017-02-09Implement SAL_DEBUG_BACKTRACE for LinuxStephan Bergmann
...by using glibc's backtrace_symbols(3). If this is ever implemented for other platforms, backtrace_symbols' interface may turn out to be awkward; but just use it directly for now. Also, the output from backtrace_symbols isn't too useful in itself, as for non-exported symbols it only prints soname+offset, but some addr2line postprocessing can turn that into something half-way decent. Change-Id: I58cc7912aa7d8031729fc116a82a409c1c16977a
2017-02-08Solaris C++ 5.2 compiler is no longer relevantStephan Bergmann
Change-Id: I520a58438e156661d3e01a899e97ee33d9f19102
2017-02-07Clean up C-style interface nonsenseStephan Bergmann
Change-Id: Ie9a1e106f5270fd307d211fa334449c698acf25d Reviewed-on: https://gerrit.libreoffice.org/34010 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-07loplugin:useuniqueptr (clang-cl)Stephan Bergmann
Change-Id: Ic5daf83e77ebe4dcac1c6eba8e7dab1cc0368046
2017-02-03TyposJulien Nabet
Change-Id: Ic54695e86b4b462419fa7d5ded7b1ddb19ee8ed5 Reviewed-on: https://gerrit.libreoffice.org/33904 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-03tdf#91872: Make SAL_INFO and friends more efficientArnold Dumas
Change-Id: I8a5b1665660b0679439f07d3924bb90cb4c4075c Reviewed-on: https://gerrit.libreoffice.org/33848 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01loplugin:useuniqueptr extend to check local varsNoel Grandin
just the simple and obvious case for now, of a local var being allocated and deleted inside a single local block, and the delete happening at the end of the block Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625 Reviewed-on: https://gerrit.libreoffice.org/33749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01Support signal handlers registered with SA_SIGINFOStephan Bergmann
...as is the case for external/breakpad's google_breakpad::ExceptionHandler::SignalHandler (though that one appears to be careful to check that its additional arguments are not garbage, cf. the "Sometime, Breakpad runs inside a process where some other buggy code..." comment in workdir/UnpackedTarball/breakpad/src/client/linux/handler/exception_handler.cc). Seen when JunitTest_framework_complex run under ASan/UBSan happened to trigger an assert, > soffice.bin: vcl/source/app/dbggui.cxx:47: void ImplDbgTestSolarMutex(): Assertion `ImplGetSVData()->mpDefInst->CheckYieldMutex() && "SolarMutex not locked"' failed. > sal/osl/unx/signal.cxx:349:13: runtime error: call to function google_breakpad::ExceptionHandler::SignalHandler(int, siginfo_t*, void*) through pointer to incorrect function type 'void (*)(int)' > (instdir/program/libsofficeapp.so+0xb7eab0): note: google_breakpad::ExceptionHandler::SignalHandler(int, siginfo_t*, void*) defined here > #0 0x7f6cefc21693 in (anonymous namespace)::callSystemHandler(int) sal/osl/unx/signal.cxx:349:13 > #1 0x7f6cefc1f3e1 in (anonymous namespace)::signalHandlerFunction(int) sal/osl/unx/signal.cxx:422:9 > #2 0x7f6cedbc95bf (/lib64/libpthread.so.0+0x115bf) > #3 0x7f6ced20491e in __libc_signal_restore_set /usr/src/debug/glibc-2.24-33-ge9e69e4/signal/../sysdeps/unix/sysv/linux/nptl-signals.h:79 > #4 0x7f6ced20491e in __GI_raise /usr/src/debug/glibc-2.24-33-ge9e69e4/signal/../sysdeps/unix/sysv/linux/raise.c:55 > #5 0x7f6ced206519 in __GI_abort /usr/src/debug/glibc-2.24-33-ge9e69e4/stdlib/abort.c:89 > #6 0x7f6ced1fcda6 in __assert_fail_base /usr/src/debug/glibc-2.24-33-ge9e69e4/assert/assert.c:92 > #7 0x7f6ced1fce51 in __GI___assert_fail /usr/src/debug/glibc-2.24-33-ge9e69e4/assert/assert.c:101 > #8 0x7f6cb60cdad5 in ImplDbgTestSolarMutex() vcl/source/app/dbggui.cxx:47:5 > #9 0x7f6cbd337fb9 in DbgTestSolarMutex() tools/source/debug/debug.cxx:74:9 > #10 0x7f6cb3c98abf in vcl::Window::ReleaseGraphics(bool) vcl/source/window/window.cxx:900:5 ... Change-Id: I2625541e0b9e50f9723e61e0cbff0e6c77d0fb9f
2017-01-31Work around GCC -Wunused-resultStephan Bergmann
(cf. <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425> "(void) cast doesn't suppress __attribute__((warn_unused_result))"). Interestingly, this only occurs with GCC 7, look like <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70365> "warn_unused_result doesn't warn when the result is a class with a destructor" is fixed now. Change-Id: I7b4a066d0bf59080e47404d718917b5f38a98832
2017-01-27sal: add SAL_NO_ASSERT_DIALOGS variable to redirect...Michael Stahl
... the dialogs that pop up on assert() and abort() to stderr, which should work better in CI builds. Change-Id: I80ec95bae6cc21b8ac27f68ca93aa6c6cce707f4
2017-01-25loplugin: unnecessary destructor oox..saxNoel Grandin
Change-Id: Ie12bfabc92bce04d702f3e77aa5896366e49245e Reviewed-on: https://gerrit.libreoffice.org/33509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-22coverity#1399029 silence Out-of-bounds readCaolán McNamara
Change-Id: I025e416a6a162316d82cfbde9fbfcb0a45e888d5
2017-01-20tweak high/low bit so we're always shifting with an unsigned numberCaolán McNamara
Change-Id: Ic1c3f1f8aa6a16befb348652b0f5c3f82f47e0e7
2017-01-17replace #ifdef SOLARIS with #ifdef __sunMichael Stahl
Check for a macro that is defined by the compiler, we don't really need one defined by the build system. Change-Id: Iccb8e3198396881395c97a6b81690ebe64b7e9d2
2017-01-15FreeBSD PPC: Missing patchPedro Giffuni
Submitted by: Curtis Hamilton (cherry picked from commit 55ffac651c9996916680cdc05b32eb1b091a5ccf) Change-Id: I160ff9369a563d58469682ed96e25c792184708c
2017-01-11loplugin:stringconstant: handle OStringBuffer::appendStephan Bergmann
Change-Id: I283da52c0ee2b63c19e31e9a61ab24997c037a6a
2017-01-11loplugin:externvar (clang-cl)Stephan Bergmann
Change-Id: I81877e46cf95dcc7de16b797fca33658036bf9e8
2017-01-11Some loplugin:conststringvar/stringconstant improvements: salStephan Bergmann
Change-Id: I8b5d81c2b51f846a24fd1f7f9cdd831f1ea54ea5
2017-01-10fix windows buildNoel Grandin
VS2013 does not like stack-allocated arrays with runtime size Change-Id: I58bd3a9feb6e2bef1b4a4f775669e5e3e03de5f7 Reviewed-on: https://gerrit.libreoffice.org/32922 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-10New loplugin:conststringvar: salStephan Bergmann
Change-Id: Ia66415ff9ee67958e84cfff7eda082cdbfc9b9b9
2017-01-10rename SAL_DEBUG_TRACE to SAL_DEBUG_BACKTRACENoel Grandin
since "trace" is such a generic term, this makes it easier to actually find the feature when you need it. And add feature to limit stack depth of the reported backtrace. Change-Id: Iab3e4ceb2e8480e7b5e2b920eb6c5d7631e21c43 Reviewed-on: https://gerrit.libreoffice.org/31752 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-09New loplugin:externvar: salStephan Bergmann
Change-Id: Iefc33784f21e7a0b88c8d6308618926e38ab8554
2017-01-05Replace side-effect--only uses of makeStringAndClear() with setLength(0)Stephan Bergmann
Change-Id: Iaf8011f1bd6a10b324653899b7f51458f7d0b68a
2017-01-01ofz#358 SJIS_84 table mnLeadEnd is out by oneCaolán McNamara
sjis 82 and 83 correctly denote the last index available while 84 reports one past the last available index 0x84BE is the last value to map, not 0x84BF Change-Id: Idcadc2d554ee59586f6e2f2775301fe69c94d55a
2016-12-30cleanup tailing backslashesJochen Nitschke
Change-Id: Idb4bfc97e7d758c58118742affd9a9345c7a99f2 Reviewed-on: https://gerrit.libreoffice.org/32491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-23tdf#97283: Merge sal rtl tests to one makefileMatúš Kukan
Change-Id: I1b78276e08feef9b6f49e5abe002391c50a8d2cc Reviewed-on: https://gerrit.libreoffice.org/32143 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Matúš Kukan <matus@libreoffice.org>
2016-12-23tdf#97283: Merge sal osl tests to one makefileMatúš Kukan
Leave sal_osl_security alone because it does not use CPPUNIT_PLUGIN_IMPLEMENT. Change-Id: Iced8bb80c3ae661d371c087d7178a373ffd802e0 Reviewed-on: https://gerrit.libreoffice.org/32142 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Matúš Kukan <matus@libreoffice.org>
2016-12-20Don't malloc between for and execStephan Bergmann
...at least macOS doesn't like that; change from OSL_TRACE (effectively doing nothing unless running a debug build with SAL_LOG=+INFO) to SAL_INFO (calling std::stringstream -> malloc in debug builds, regardless of SAL_LOG env var) in a005fbeddc4e615cfff56a9bd84355f8d42c1c8c "OSL_TRACE->SAL in framework..sal" made the mistake obvious. Change-Id: I43d35524a0861998a1ef58c6f448085a2fb01cd5
2016-12-20keep salinit for non-DESKTOP but not for ANDROID/IOSCaolán McNamara
Change-Id: I6b97345c9d927d1ae1d89f85611c2b5de7b5f0d4
2016-12-20salinit for non-DESKTOP tooCaolán McNamara
Change-Id: Icb368b676199038bf8588b42ef50a2796468d185 Reviewed-on: https://gerrit.libreoffice.org/32228 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-20bootstrap building with --disable-dynloading on standard linuxCaolán McNamara
Change-Id: I5baf70f0053612cba8b74f54aff11ce25cdeb95a Reviewed-on: https://gerrit.libreoffice.org/32202 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-20add an option to pipe log output to fileMarkus Mohrhard
The target file and the option are controlled by SAL_LOG_FILE. The variable should contain the target file in a system dependent notation. Change-Id: Ie1ce9c39740c8b7a989e5af222be21a3e3142084 Reviewed-on: https://gerrit.libreoffice.org/32176 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-12-19this textenc hack is for android and disable-dynamic-loadingCaolán McNamara
Change-Id: If2191161e82fc1e05b1442ae4b3b729cc1b8994d Reviewed-on: https://gerrit.libreoffice.org/32038 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>