Commit Graph

1082 Commits

Author SHA1 Message Date
bff4c13475 Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY code
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12 17:52:26 +02:00
2957be02c5 Fix typos
Change-Id: I776c517ba87838c0c3391f79010a30fa7fe2abd3
Reviewed-on: https://gerrit.libreoffice.org/18939
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-10-02 08:54:51 +00:00
592b43acb6 bridges: fix build with --enable-assert-always-abort
Change-Id: I6079481046ca3f7d66975d41fccc15b862a3223b
2015-09-30 21:16:21 +02:00
f290e30e95 Fix typo
Change-Id: I81e897153281a70756ffd442f9384751c025c016
2015-09-13 11:09:49 +02:00
81d62c5f48 cppcheck: Mismatching allocation and deallocation
+ Typo: excecptionTypeSizeArray->exceptionTypeSizeArray

Change-Id: I6fac3bea1eba094e87717d20a08ec7cf6151e2df
2015-09-13 09:42:01 +02:00
1aad95eb96 Actually fix uno bridge on MSVC 14.0
VC runtime was substantially refactored on MSVC 14.0. Among other,
_tiddata structure defined in crt/src/mtdll.h was replaced with
__vcrt_getptd defined in crt/src/vcruntime/vcruntime_internal.h.

All members before

  unsigned long      _NLG_dwCode

were removed, so that the approach to access the member

  void *      _tpxcptinfoptrs; /* ptr to exception info pointers */

with __pxcptinfoptrs() and compute the offset to the _curexception
member of _tiddata doesn't work on MSVC 14.0.

As of MSVC 14.0 __vcrt_getptd symbol isn't exported but Microsoft
have introduced methods to access current exception, current exception
context and processing throw (the later can be accessed through C++17
std::unhandled_exceptions() that was made available in MSVC 14.0):

* __current_exception()
* __current_exception_context()
* __processing_throw() aka std::unhandled_exceptions()

Make use of __current_exception() which we can hope will be maintained
going forward.

Change-Id: Ibfffa5fba62d6928328ac976cb1b24937277363e
Reviewed-on: https://gerrit.libreoffice.org/18475
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
2015-09-12 09:17:15 +00:00
b9bf1123f3 Fix x86-64 bridge on MSVC 14.0
Change-Id: I6729a5028351a8a1c3d2b2d2f4bc7ab73e0730f2
Reviewed-on: https://gerrit.libreoffice.org/18213
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-09-02 13:25:05 +00:00
f51994efcd cppcheck: noExplicitConstructor
Change-Id: I4bdbcd9debdf6a385d3b6f199b71b09d7e27b0fa
Reviewed-on: https://gerrit.libreoffice.org/17810
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-17 20:14:32 +00:00
31344e41de cppcheck: various msvc_win32_intel fixes
Change-Id: Iaa9e6e255596bbc47224688a465c31de3c88f78f
Reviewed-on: https://gerrit.libreoffice.org/17808
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-08-17 20:14:12 +00:00
1f99f4a9c8 bridges: mips64: Fix build failure in new codes.
Change-Id: I17fe0fb0ce9341a638b2687e7690777a8de7fa01
Reviewed-on: https://gerrit.libreoffice.org/16980
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-13 09:49:14 +00:00
291e760b7f bridges: mips64: Update call frame information.
Change-Id: I00bf0eaa69b3276b1baf18f4fa191ceaf1bc2f18
Reviewed-on: https://gerrit.libreoffice.org/16944
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-11 19:56:03 +00:00
e8ac3b5bd9 ppc64: using a fp register also consumes a gp register slot
Change-Id: Idf6f40081f4598c0fa9d1e10bdc208eae49e4cd1
Reviewed-on: https://gerrit.libreoffice.org/16936
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-10 19:47:40 +00:00
fe14c55f00 ppc64: simplify this a little
Change-Id: I8166f65625d389a604750852d6d5a4fee25a88fa
Reviewed-on: https://gerrit.libreoffice.org/16935
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-07-10 19:46:58 +00:00
55b09bd09d bridges: Add support for linux mips64.
Change-Id: I71fd2f7d8bfd1b1511dec91f23b61b9f55d21472
Reviewed-on: https://gerrit.libreoffice.org/16845
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-07-10 06:57:41 +00:00
ffa8892c5a Fix typos
Change-Id: I75b4ad61785bf0ba1cb07735d938c0977356b8cc
Reviewed-on: https://gerrit.libreoffice.org/16705
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2015-07-04 10:23:17 +00:00
c1e12b15e5 Use declarations from cxxabi.h
Change-Id: Ie9bf973e87bf571e19ba036dac3a41054eaed568
Reviewed-on: https://gerrit.libreoffice.org/16520
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-06-26 19:22:43 +00:00
3a68a7dcf4 Remove workarounds for no longer supported GCC 4.6
In bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx, the #if also covered
Clang, which actually needs these declarations (for now; the right fix will
probably be to #include <cxxabi.h>).

Change-Id: I1eebd59e2371f3498d740ab78244927358c4f23f
2015-06-26 17:31:14 +02:00
2a65bf32ec Revert "Typo: iff->if"
This reverts commit cf92da3d6e1de14756efe3f1ee79f393a2f3787d.

iff can mean "if and only if" so not a typo
2015-06-23 20:42:27 +02:00
cf92da3d6e Typo: iff->if
Change-Id: I3fc60856b5a56e71d70b55c89323be074bdec3b3
2015-06-23 20:30:11 +02:00
04834f4ad1 MSVC 64-bit: In queryInterface optimization, copy hidden ret val addr
...to location where privateSnippetExecutor will pick it up to return it from
RAX.

Change-Id: I59b8db1a12177a3c4da4c810770bee4ace295115
2015-06-22 16:49:52 +02:00
f378e723d2 Fix typos
Change-Id: I528752dfabeb31d14c350f79819b521537ab9b56
Reviewed-on: https://gerrit.libreoffice.org/16300
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:14:55 +00:00
6780db685e loplugin:cstylecast: deal with those that are (technically) const_cast
Change-Id: I73626dd83aed5a226b67b5b18049ca82c86f9b3b
2015-06-02 11:25:30 +02:00
fe7fa0baff ppc64: do not use asm block to retrieve args
Some versions of gcc clobber one of the registries that are used to pass
arguments in the function's prologue, like:

Dump of assembler code for function (anonymous namespace)::privateSnippetExecutor():
510     {
   0x00003fffaffe8454 <+0>:     mflr    r0
   0x00003fffaffe8458 <+4>:     std     r0,16(r1)
   0x00003fffaffe845c <+8>:     std     r29,-24(r1)
   0x00003fffaffe8460 <+12>:    std     r30,-16(r1)
   0x00003fffaffe8464 <+16>:    std     r31,-8(r1)
   0x00003fffaffe8468 <+20>:    stdu    r1,-352(r1)
   0x00003fffaffe846c <+24>:    mr      r31,r1
=> 0x00003fffaffe8470 <+28>:    ld      r8,-28688(r13)
   0x00003fffaffe8474 <+32>:    std     r8,312(r31)
   0x00003fffaffe8478 <+36>:    li      r8,0

Reading the registries through variables makes gcc aware that they are
used, so it does not touch them. It has got no negative effect on
performance, as it produces the same object code as the current asm
block.

Change-Id: I3b99b0aa9944f9f33de9a42508e9d4dd23cec5e0
2015-04-28 08:46:05 +02:00
6ff2d84ade Various #include <sal/log.hxx> fixups
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx>
(and don't make use of it themselves), but many other files happen to depend on
it.  Cleaned up some, but something like

  grep -FwL sal/log.hxx $(git grep -Elw \
    'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF') -- \*.cxx)

shows lots more files that potentially need fixing before the include can be
removed from rtl/string.hxx and rtl/ustring.hxx.

Change-Id: Ibf033363e83d37851776f392dc0b077381cd8b90
2015-04-22 09:57:47 +02:00
71b809959b remove unnecessary use of void in function declarations
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
2015-04-15 11:47:12 +02:00
93b4ec39e2 loplugin:cstylecast, loplugin:redundantcast
Change-Id: If5d839b05c1babecc84b76d2bcdf47009d0f713c
2015-04-07 10:46:18 +02:00
f4796210b4 loplugin:redundantcast
Change-Id: I43264a975febf0d62271ab4e7d8cc96246956124
2015-04-02 19:20:26 +02:00
fb088cdd8d Replace remaining getCppuType et al with cppu::UnoType
Change-Id: I37d1a939c1a98f77152ed90dfb201446101f3157
2015-04-01 08:35:33 +02:00
9f2e07aadb bridges: acquire is not a member of rtl::OUString
Change-Id: Ie95f74966ff951b2b3161efeb073f0648c09ff3b
2015-03-31 20:43:58 +02:00
96f5b780f0 Use OUString::unacquired
found with

  git grep -E '\* *\<reinterpret_cast\>[^>]+\<OUString\>'

Change-Id: I9306d4ad8e3b1664f54cb7df86f2d79bfd3c6cb9
2015-03-31 17:45:27 +02:00
26655d0909 Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: I19b86fba87df57c4c65c658d051b664c527214eb
2015-03-31 13:12:15 +02:00
72927f810a Turn macros into functions
Change-Id: I390fc815c32fa0eeeabf4d80a17bc4deedad2d2c
2015-03-30 16:47:25 +02:00
66f0c17d24 loplugin:cstylecast
Change-Id: I7fd4ec85eac0693ae6a61ba0b854dd6091bdc6ef
2015-03-29 14:48:05 +02:00
6a6991ed2e Clean up C-style casts from pointers to void
Change-Id: I5c0372bce2564e58c78daf544cfcb106387c6894
2015-03-28 19:09:17 +01:00
4a8d478ff2 loplugin:cstylecast (gcc3_linux_intel)
Change-Id: I89c3c2c63c1c1b7478d94c713341db1cd24f0ab8
2015-03-13 18:21:35 +01:00
03736d673a Fix MI RTTI (as needed by -fsanitize=vptr)
Change-Id: Idbde54c641531b34f397d07c5f929870c3a82371
2015-02-24 16:52:29 +01:00
834afd885b Adapt gcc3_solaris_intel bridge to GCC 4.7
...similarly to 0fdbb5b0eabbaa571f3747fda12a56c938cba474 "Make
cpp_uno/gcc3_linux_x86-64 bridge work with GCC 4.7"

Change-Id: Idcafcb07678d02446172d7fde30631a342f6437e
2015-02-19 14:36:39 +01:00
2b55846a33 loplugin:deletedspecial
Change-Id: Ifac86f4d7e637e9fdbce7e60f6d383e7dca69508
2015-02-07 12:35:56 +01:00
4d6a509efe convert all remaining BOOST_STATIC_ASSERT to static_assert
and we can include a few less headers

Change-Id: Id742849ff4c1c37a2b861aa3d6ab823f00ea87f8
2015-02-05 22:21:49 +00:00
b154f4cf2e add back typedef (regression from fe480d8136b204c8dc6c68916cce7e816f8b9c48)
Change-Id: Ia367fcd3b204b9dd96f5fa6d3a52d0895bd9c0c9
2015-02-02 05:39:38 -08:00
331faca18e Extract loplugin:redundantcast from loplugin:cstylecast
Change-Id: I08f17dd9cc092206083ff41bbbc178e0322e86d0
2015-01-29 22:21:04 +01:00
ab2d0ff4d7 loplugin:cstylecast (Mac OS X)
Change-Id: Ia8f2c9f1c1c284708a2cbde379197ec6ba58742f
2015-01-29 22:21:04 +01:00
5d3ce204d5 rhbz#1186897: bridges: oops, fix s390 bridge build
Change-Id: I5f2393b13729ab43ad2cfd4a3f960a507e3e608b
2015-01-29 21:48:14 +01:00
51f82a58a7 fix enable-assert-always-abort build
Change-Id: Icbab4d030877f978babfc51f984fb4793b60f681
2015-01-28 20:28:03 +00:00
4e3da621fe Some more loplugin:cstylecast clean-up
Change-Id: I132d22e2af3cf673c17d8964f690d48990834884
2015-01-28 13:50:37 +01:00
fe480d8136 remove unused typedefs
found with some minor modifications to find/find-unused-defines.sh

Change-Id: I18cc479adedc7a0dada68a4aeef08300e62631dd
Reviewed-on: https://gerrit.libreoffice.org/14194
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-01-28 06:19:49 +00:00
59e928b010 loplugin:cstylecast (MACOSX)
Change-Id: Iaefde6a2fbe1b37f31435217c9f57d611d255b11
2015-01-22 19:36:50 +01:00
7cb5b21174 loplugin:cstylecast
Change-Id: Ib8575109cfe0339f2d8b56741d3ad2a538ecf164
2015-01-21 12:29:36 +01:00
93afb9ad7f Some more loplugin:cstylecast: bridges
Change-Id: Ic224abf67acb212ee20ccf9eb81b5ed5edf851b9
2015-01-20 09:06:45 +01:00
8b9968a262 fdo#72755: Only use double mmap as fallback
...when write+exec mmap fails (due to SELinux deny_execmem).  This avoids the
tmp file creation in environments that don't need it and which in turn have
problems of their own with that tmp file business.

An alternative would be to first check whether SELinux deny_execmem is enforced
and only then try double mmap first.  An advantage could be that it might avoid
false SELinux alerts in that case.  The disadvantage would be the overhead of
introducing a conditional dependency on libselinux here.  And given that for one
deny_execmem typically appears to be off by default (as at least both
contemporary GNOME desktop and OpenJDK malfunction when it is enabled), and for
another I guess deny_execmem could still change its value between the time of
checking for it and the time of requesting a write+exec mmap, that just does not
seem worth it.

Change-Id: I3560803139b630557b6219d3db52945c7e0cdcd2
2015-01-16 13:43:01 +01:00