summaryrefslogtreecommitdiff
path: root/xmlsecurity/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-09-24 15:41:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-09-24 17:22:05 +0200
commit928b1b04adc1cd49cc5d00069084e03675a320f3 (patch)
tree8710687a4a66a628bd12c5482d7d93cc27f8996a /xmlsecurity/source
parentec709a8d5e808b970a8930a389c0a5a6f61fe8c7 (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 'xmlsecurity/source')
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx12
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx8
2 files changed, 12 insertions, 8 deletions
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index cc1ea218d844..2a545ba568b5 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -93,7 +93,7 @@ CertErrorToString const arErrStrings[] =
{ 0x00080000, "CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE"}
};
-void traceTrustStatus(DWORD err)
+static void traceTrustStatus(DWORD err)
{
if (err == 0)
SAL_INFO("xmlsecurity.xmlsec", " " << arErrStrings[0].name);
@@ -281,7 +281,9 @@ static OUString get_system_name(const void *pvSystemStore,
return o3tl::toU(ppwszSystemName);
}
-extern "C" BOOL WINAPI cert_enum_physical_store_callback(const void *,
+extern "C" {
+
+static BOOL WINAPI cert_enum_physical_store_callback(const void *,
DWORD dwFlags,
LPCWSTR pwszStoreName,
PCERT_PHYSICAL_STORE_INFO,
@@ -296,7 +298,7 @@ extern "C" BOOL WINAPI cert_enum_physical_store_callback(const void *,
return TRUE;
}
-extern "C" BOOL WINAPI cert_enum_system_store_callback(const void *pvSystemStore,
+static BOOL WINAPI cert_enum_system_store_callback(const void *pvSystemStore,
DWORD dwFlags,
PCERT_SYSTEM_STORE_INFO,
void *,
@@ -319,6 +321,8 @@ extern "C" BOOL WINAPI cert_enum_system_store_callback(const void *pvSystemStore
return TRUE;
}
+}
+
#endif
//Methods from XSecurityEnvironment
@@ -750,7 +754,7 @@ uno::Reference< XCertificate > SecurityEnvironment_MSCryptImpl::createCertificat
}
-HCERTSTORE getCertStoreForIntermediatCerts(
+static HCERTSTORE getCertStoreForIntermediatCerts(
const uno::Sequence< uno::Reference< css::security::XCertificate > >& seqCerts)
{
HCERTSTORE store = nullptr;
diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
index d88280573f5e..b8783440ea10 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
@@ -55,7 +55,7 @@ using ::com::sun::star::util::DateTime ;
"S" or "CN" (without ""). Do not use spaces at the beginning of the type name.
If the type name is not found then pair.first and pair.second are -1.
*/
-std::pair< sal_Int32, sal_Int32 >
+static std::pair< sal_Int32, sal_Int32 >
findTypeInDN(const OUString& rRawString, const OUString& sTypeName)
{
std::pair< sal_Int32, sal_Int32 > retVal;
@@ -158,7 +158,7 @@ findTypeInDN(const OUString& rRawString, const OUString& sTypeName)
strings for type names. Instead it uses OIDs.
*/
-OUString replaceTagSWithTagST(OUString const & oldDN)
+static OUString replaceTagSWithTagST(OUString const & oldDN)
{
std::pair<sal_Int32, sal_Int32 > pairIndex = findTypeInDN(oldDN, "S");
@@ -480,7 +480,7 @@ X509Certificate_MSCryptImpl* X509Certificate_MSCryptImpl::getImplementation( con
return nullptr ;
}
-OUString findOIDDescription(char const *oid)
+static OUString findOIDDescription(char const *oid)
{
OUString ouOID = OUString::createFromAscii( oid );
for (int i=0; i<nOID; i++)
@@ -495,7 +495,7 @@ OUString findOIDDescription(char const *oid)
return OUString() ;
}
-css::uno::Sequence< sal_Int8 > getThumbprint(const CERT_CONTEXT* pCertContext, DWORD dwPropId)
+static css::uno::Sequence< sal_Int8 > getThumbprint(const CERT_CONTEXT* pCertContext, DWORD dwPropId)
{
if( pCertContext != nullptr )
{