diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-06-10 12:44:57 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-06-10 14:03:33 +0200 |
commit | 094560c29fed9b0b58505717c4e6694ad9ff8a69 (patch) | |
tree | 40c1a253fdc35d171f474f9e4262a4e4b611b417 /sal/osl/w32 | |
parent | 44feea1957f6f3ff28917625223e610fe2807c49 (diff) |
mingw64: casting to pointer from narrower integer fixes in sal
Change-Id: I63321e33f92223be47c7ee25dbf03fe3032991d6
Diffstat (limited to 'sal/osl/w32')
-rw-r--r-- | sal/osl/w32/dllentry.c | 8 | ||||
-rw-r--r-- | sal/osl/w32/thread.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sal/osl/w32/dllentry.c b/sal/osl/w32/dllentry.c index 407135683430..39c6c6137d63 100644 --- a/sal/osl/w32/dllentry.c +++ b/sal/osl/w32/dllentry.c @@ -98,7 +98,7 @@ __do_global_dtors (void) void __do_global_ctors (void) { - unsigned long nptrs = (unsigned long) __CTOR_LIST__[0]; + sal_uIntPtr nptrs = (sal_uIntPtr) __CTOR_LIST__[0]; unsigned i; /* @@ -106,7 +106,7 @@ __do_global_ctors (void) * is terminated with a null entry. Otherwise the first entry was * the number of pointers in the list. */ - if (nptrs == (unsigned long)-1) + if (nptrs == (sal_uIntPtr)-1) { for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++) ; @@ -264,7 +264,7 @@ static DWORD GetParentProcessId() static DWORD WINAPI ParentMonitorThreadProc( LPVOID lpParam ) { - DWORD dwParentProcessId = (DWORD)lpParam; + DWORD_PTR dwParentProcessId = (DWORD_PTR)lpParam; HANDLE hParentProcess = OpenProcess( SYNCHRONIZE, FALSE, dwParentProcessId ); if ( IsValidHandle( hParentProcess ) ) @@ -300,7 +300,7 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) { DWORD dwThreadId = 0; - DWORD dwParentProcessId = (DWORD)atol( szBuffer ); + DWORD_PTR dwParentProcessId = (DWORD_PTR)atol( szBuffer ); if ( dwParentProcessId && GetParentProcessId() == dwParentProcessId ) { diff --git a/sal/osl/w32/thread.c b/sal/osl/w32/thread.c index 87632851bcd8..d4dbc7f8f9f9 100644 --- a/sal/osl/w32/thread.c +++ b/sal/osl/w32/thread.c @@ -565,14 +565,14 @@ DWORD g_dwTLSTextEncodingIndex = (DWORD)-1; rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding(void) { - DWORD dwEncoding; + DWORD_PTR dwEncoding; rtl_TextEncoding _encoding; BOOL gotACP; if ( (DWORD)-1 == g_dwTLSTextEncodingIndex ) g_dwTLSTextEncodingIndex = TlsAlloc(); - dwEncoding = (DWORD)TlsGetValue( g_dwTLSTextEncodingIndex ); + dwEncoding = (DWORD_PTR)TlsGetValue( g_dwTLSTextEncodingIndex ); _encoding = LOWORD(dwEncoding); gotACP = HIWORD(dwEncoding); @@ -586,7 +586,7 @@ rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding(void) else _encoding = rtl_getTextEncodingFromWindowsCodePage( GetACP() ); - TlsSetValue( g_dwTLSTextEncodingIndex, (LPVOID)MAKELONG( _encoding, TRUE ) ); + TlsSetValue( g_dwTLSTextEncodingIndex, (LPVOID)(DWORD_PTR)MAKELONG( _encoding, TRUE ) ); } return _encoding; @@ -599,7 +599,7 @@ rtl_TextEncoding SAL_CALL osl_setThreadTextEncoding( rtl_TextEncoding Encoding ) { rtl_TextEncoding oldEncoding = osl_getThreadTextEncoding(); - TlsSetValue( g_dwTLSTextEncodingIndex, (LPVOID)MAKELONG( Encoding, TRUE) ); + TlsSetValue( g_dwTLSTextEncodingIndex, (LPVOID)(DWORD_PTR)MAKELONG( Encoding, TRUE) ); return oldEncoding; } |