summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-03 14:22:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-04 17:36:41 +0000
commit798dbea63a9ef060eb2ddcf69307eb1a666daae7 (patch)
tree0e987725f662d8d0c1471693b0f90a043a79cb74 /sal/osl
parent4af9612f2be9e023e762831207cbdb1d5f25906f (diff)
Change sal/osl/w32/dllentry.c -> .cxx
Change-Id: I55f8bedd9b578053413b5e3404010301d01b7961 Reviewed-on: https://gerrit.libreoffice.org/34861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/w32/dllentry.cxx (renamed from sal/osl/w32/dllentry.c)18
1 files changed, 9 insertions, 9 deletions
diff --git a/sal/osl/w32/dllentry.c b/sal/osl/w32/dllentry.cxx
index 6cb8669a455f..5158979a4313 100644
--- a/sal/osl/w32/dllentry.c
+++ b/sal/osl/w32/dllentry.cxx
@@ -57,14 +57,15 @@ _pRawDllMain()
*/
+extern "C" {
+
static BOOL WINAPI RawDllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved );
BOOL (WINAPI *_pRawDllMain)(HINSTANCE, DWORD, LPVOID) = RawDllMain;
-static BOOL WINAPI RawDllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
-{
- (void)hinstDLL; /* avoid warnings */
- (void)lpvReserved; /* avoid warnings */
+}
+static BOOL WINAPI RawDllMain( HINSTANCE, DWORD fdwReason, LPVOID )
+{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
@@ -184,7 +185,7 @@ static DWORD GetParentProcessId()
static DWORD WINAPI ParentMonitorThreadProc( LPVOID lpParam )
{
- DWORD_PTR dwParentProcessId = (DWORD_PTR)lpParam;
+ DWORD_PTR dwParentProcessId = reinterpret_cast<DWORD_PTR>(lpParam);
HANDLE hParentProcess = OpenProcess( SYNCHRONIZE, FALSE, dwParentProcessId );
@@ -201,10 +202,9 @@ static DWORD WINAPI ParentMonitorThreadProc( LPVOID lpParam )
return 0;
}
-BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
+extern "C"
+BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID )
{
- (void)hinstDLL; /* avoid warning */
- (void)lpvReserved; /* avoid warning */
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
@@ -228,7 +228,7 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
{
// No error check, it works or it does not
// Thread should only be started for headless mode, see desktop/win32/source/officeloader.cxx
- CreateThread( NULL, 0, ParentMonitorThreadProc, (LPVOID)dwParentProcessId, 0, &dwThreadId );
+ CreateThread( nullptr, 0, ParentMonitorThreadProc, reinterpret_cast<LPVOID>(dwParentProcessId), 0, &dwThreadId );
// Note: calling CreateThread in DllMain is discouraged
// but this is only done in the headless mode and in
// that case no other threads should be running at startup