Age | Commit message (Collapse) | Author |
|
Change-Id: I0ff36c58bf2448bdccc239582ba24b69c7431c6d
Reviewed-on: https://gerrit.libreoffice.org/75921
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Id1b8044126e65e67b2496cf7a4eb86b54ba6c1df
Reviewed-on: https://gerrit.libreoffice.org/75872
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I4b877751818febaec8e64018335dca691a476a43
Reviewed-on: https://gerrit.libreoffice.org/67561
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...and make sure that the generated name is actually short enough to be stored
in a sockaddr_un::sun_path. (oslPipeImpl::m_Name is only used to store such a
name, to be used in osl_closePipe, so just make it of the same size to guarantee
that copying between the two with strcpy will always work.)
Change-Id: I6d1d0c5518e6d09eff129d682a1a334d12201e90
Reviewed-on: https://gerrit.libreoffice.org/66469
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: If1187cbb428d329fa10070662282d7fc3aeaf9de
Reviewed-on: https://gerrit.libreoffice.org/66441
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I8729db064573ac21dfe6b203c5ae244d79ecc4fe
Reviewed-on: https://gerrit.libreoffice.org/66430
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I4a21258c2405bd6e5c539ec0206e28a316c6ce13
Reviewed-on: https://gerrit.libreoffice.org/60835
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
The UnixErrnoString() function returns the symbolic name of an errno
value, like "ENOENT". For now this is local to sal/osl/unx.
If it can't figure out the symbolic name, it returns it as a number
followed by the cleartext description (as from strerror()) in
parentheses.
Rationale why to use this and not strerror(): This is intended to be
used in SAL_INFO() and SAL_WARN(). Such messages are intended to be
read by developers, not end-users. Developers are (or should be)
familiar with symbolic errno names in code anyway. The symbolic names
of errno values are (or should be) instantly recognizable as such,
they all start with E and are in UPPERCASE.
strerror() can be localised although in LibreOffice it apparently
isn't as there allegedly aren't setlocale() calls. But, anyway, the
error strings might be less familiar to a developer than the symbolc
errno names that one uses when coding.
When encountering an unfamiliar error string the developer might want
to add special handling for that error case in the code. They would
need a reverse mapping from error string to errno value, by manually
searching <errno.h>, looking at the comments there, hoping the match
what strerror() produces, to find the corresponding symbolic errno
value.
Change-Id: Idc11595d528e8432a32bf474e6791f4ea7262a1e
Reviewed-on: https://gerrit.libreoffice.org/61931
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
|
|
Change-Id: I8bf3509637cb295847e0dd667c1862269a192bbe
Reviewed-on: https://gerrit.libreoffice.org/61881
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and improve the rewriter so I spend less time fixing formatting
Change-Id: Ic2a6e5e31a5a202d2d02a47d77c484a57a5ec514
Reviewed-on: https://gerrit.libreoffice.org/61676
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...warning about (for now only) functions and variables with external linkage
that likely don't need it.
The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
returns 1, both moving just the struct S2 into an nunnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
namespace { struct S2: S1 { int f() { return 1; } }; }
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
as well as moving just the function f overload into an unnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
namespace { int f(S2 s) { return s.f(); } }
}
int main() { return f(N::S2()); }
would each change the program to return 0 instead.
Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I88c941832a0d682ea4b6028c28edd48cf5df38f7
Reviewed-on: https://gerrit.libreoffice.org/58093
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
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: I7d89b011464ba5d2dd12e04d5fc9f65cb4daebde
|
|
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.
Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791
Reviewed-on: https://gerrit.libreoffice.org/45068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Explanation for each conversion:
- osl_acceptPipe()
- don't worry about an invalid oslPipe sent as function parameter an
error gets flagged in Unix normally, so it might not be a
programming error
- definitely assert on an empty name, that's a definite programming
error and should never, ever occur
- createPipeImpl() allocates and initializes memory for the
oslPipeImpl structure, if it can't do this then something has been
done wrongly
- osl_receivePipe()
- invalid oslPipe sent as function parameter might not be a
programming error, give a warning but don't assert
- osl_sendPipe()
- invalid oslPipe sent as function parameter might not be a
programming error, give a warning but don't assert
- osl_writePipe()
- really just a thin wrapper around osl_sendPipe(), which detects
and handles invalid pipes
- osl_readPipe()
- really just a thin wrapper around osl_receivePipe(), which detects
and handles invalid pipes
Change-Id: I4923265b4c648852743c406b682d43ffb9ac6537
Reviewed-on: https://gerrit.libreoffice.org/40003
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
Change-Id: I70cf54799f08e3bc586d42d6c634eb02a049ea0f
|
|
Change-Id: I0fee8bcddaeea48335e3be05761d2ad2c45020e2
Reviewed-on: https://gerrit.libreoffice.org/39238
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie0339482bf3a9b108e26008526bc5e73b761d27b
Reviewed-on: https://gerrit.libreoffice.org/39223
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I774497c07f682a3923a6317af5804e477540995c
Reviewed-on: https://gerrit.libreoffice.org/39225
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
Change-Id: I9c8933616d36027314c990301e67a54c567429b5
Reviewed-on: https://gerrit.libreoffice.org/39222
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
Change-Id: Id3a8fd5d8b9975d3ae49af0648b39454310495fa
|
|
...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
|
|
run it against sal,cppu,cppuhelper
I had to run this multiple times to catch all the cases in each module,
and it requires some hand-tweaking of the resulting output - clang-tidy
is not very good about cleaning up trailing spaces, and aligning
things nicely.
Change-Id: I00336345f5f036e12422b98d66526509380c497a
Reviewed-on: https://gerrit.libreoffice.org/36194
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I725783d10bc1e6300c480542c536d409433ff532
|
|
Also better error handling if pipe dirs are really not usable.
Change-Id: I1c865b9a9f1f08d2cffd07343494feca585ec75e
Reviewed-on: https://gerrit.libreoffice.org/22727
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
|
|
need it for pipes too, and even if it isn't necessary it can't hurt.
In particular, on FreeBSD 11-CURRENT it seems pipes no longer wake up
from accept when closed in other threads, so let's deal with that before
FreeBSD 11 is released.
Reported by: Matthias Apitz <g u r u a t u n i x a r e a d o t d e>
Patch by: me
Tested by: Matthias Apitz <g u r u a t u n i x a r e a d o t d e>
(cherry picked from commit e18ecd4f644cfbe5d6b871c7ff6c76bd5c220504)
Change-Id: I1b4c0438fbcc2ea53625f235906936fc1403e195
|
|
Change-Id: I1bc6c87fcd6e5e96362623be94c59be216a3b2b8
|
|
ie.
void f(void);
becomes
void f();
I used the following command to make the changes:
git grep -lP '\(\s*void\s*\)' -- *.cxx \
| xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'
and ran it for both .cxx and .hxx files.
Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
|
|
No need to SAL_WARN it, it is a common non-exceptional case (when attempting
to start a second LO instance).
Change-Id: I26f2939d2f5b97ddfcc9e912e578b706567b3912
|
|
Change-Id: I5e370445affbcd32b05588111f74590bf24f39d6
|
|
found with
$ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;'
Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
|
|
|
|
Change-Id: I4f96972255ca99debd53d4302073d1823cc27492
|
|
Change-Id: I37a0003ca321ca788f7885eb9fdea69ed388a35d
|
|
Change-Id: I2e7528cb374d621f148d559c51521013bba62477
|
|
Change-Id: Ie96cf3043b126577087eadae5900489a5eb84bcf
|
|
Change-Id: Ie54d340478412e62b87d66e287fd8a3963e97898
|
|
This addresses some cppcheck warnings.
Change-Id: Id5f90757571e76a2c05a4cbd37020e1f6a6b2033
Reviewed-on: https://gerrit.libreoffice.org/13544
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
|
|
Change-Id: Ifc35c379d5c68fb363ae3507ccb5bff37c8cd9aa
|
|
Change-Id: I39a60d0b775bfe40fa89e8b5d5f7466d0db5d36e
|
|
Change-Id: Ic11f5e0923b8b9d656b74b900f52ff154bb65971
|
|
Change-Id: I0fb87c5658bd02e327df8fdf3e0aa79f20bbc111
|
|
Change-Id: I0c9659379e6120c0bf01b6436d3127b83ad01af1
|