diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-09-24 15:41:53 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-09-24 17:22:05 +0200 |
commit | 928b1b04adc1cd49cc5d00069084e03675a320f3 (patch) | |
tree | 8710687a4a66a628bd12c5482d7d93cc27f8996a /bridges | |
parent | ec709a8d5e808b970a8930a389c0a5a6f61fe8c7 (diff) |
loplugin:external (clang-cl)
Including:
* expanding STDAPI to its definition (as per
<https://msdn.microsoft.com/library/ms686631(vs.85).aspx> "STDAPI"), to add
__declspec(dllexport) into its middle, in
extensions/source/activex/so_activex.cxx; as discussed in the comments at
<https://gerrit.libreoffice.org/#/c/60691/> "Get rid of Windows .def files in
setup_native, use __declspec(dllexport)", having a function both listed in a
.def file EXPORTS and marking it dllexport is OK, and the latter helps the
heuristics of loplugin:external; however, the relevant functions in
extensions/source/activex/so_activex.cxx probably don't even need to be
exported in the first place?
* follow-up loplugin:salcall in sal/osl/w32/file-impl.hxx
Change-Id: Ida6e17eba19cfa3d7e5c72dda57409005c0a0191
Reviewed-on: https://gerrit.libreoffice.org/60938
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/cpp_uno/msvc_win32_x86-64/call.hxx | 32 | ||||
-rw-r--r-- | bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx | 3 | ||||
-rw-r--r-- | bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx | 10 |
3 files changed, 39 insertions, 6 deletions
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/call.hxx b/bridges/source/cpp_uno/msvc_win32_x86-64/call.hxx new file mode 100644 index 000000000000..668fb523edbd --- /dev/null +++ b/bridges/source/cpp_uno/msvc_win32_x86-64/call.hxx @@ -0,0 +1,32 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_MSVC_WIN32_X86_64_CALL_HXX +#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_MSVC_WIN32_X86_64_CALL_HXX + +#include <sal/config.h> + +#include <sal/types.h> +#include <typelib/typeclass.h> + +extern "C" typelib_TypeClass cpp_vtable_call(sal_Int64 nOffsetAndIndex, void** pStack); + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx index 216f261d6d55..3abbfaf9b7dd 100644 --- a/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx +++ b/bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx @@ -30,6 +30,7 @@ #include <types.hxx> #include <vtablefactory.hxx> +#include "call.hxx" #include "mscx.hxx" using namespace ::com::sun::star::uno; @@ -382,7 +383,7 @@ extern "C" char privateSnippetExecutor; // - Loads functionIndex and vtableOffset into scratch registers // - Jumps to privateSnippetExecutor -unsigned char * codeSnippet( +static unsigned char * codeSnippet( unsigned char * code, CPPU_CURRENT_NAMESPACE::RegParamKind param_kind[4], sal_Int32 nFunctionIndex, diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx index b1e14fbdf234..27879b066a59 100644 --- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx +++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx @@ -262,7 +262,7 @@ using namespace ::osl; namespace CPPU_CURRENT_NAMESPACE { - int mscx_getRTTI_len(OUString const & rUNOname); + static int mscx_getRTTI_len(OUString const & rUNOname); static inline OUString toUNOname( @@ -425,7 +425,7 @@ RTTInfos::RTTInfos() throw () { } -void * __cdecl copyConstruct( +static void * __cdecl copyConstruct( void * pExcThis, void * pSource, typelib_TypeDescription * pTD ) throw () @@ -434,7 +434,7 @@ void * __cdecl copyConstruct( return pExcThis; } -void * __cdecl destruct( +static void * __cdecl destruct( void * pExcThis, typelib_TypeDescription * pTD ) throw () { @@ -444,7 +444,7 @@ void * __cdecl destruct( const int codeSnippetSize = 40; -void GenerateConstructorTrampoline( +static void GenerateConstructorTrampoline( unsigned char * code, typelib_TypeDescription * pTD ) throw () { @@ -464,7 +464,7 @@ void GenerateConstructorTrampoline( assert( p < code + codeSnippetSize ); } -void GenerateDestructorTrampoline( +static void GenerateDestructorTrampoline( unsigned char * code, typelib_TypeDescription * pTD ) throw () { |