[Libreoffice-commits] core.git: sal/cppunittester
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 30 10:18:13 UTC 2021
sal/cppunittester/cppunittester.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 486e694ba3b029e32eb6647f70dd03298de50f50
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Sep 30 09:58:12 2021 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Sep 30 12:17:38 2021 +0200
loplugin:cstylecast (clang-cl)
Change-Id: I2c68832a23d80dbe208212ce36b14b21b5312f5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122850
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index 4c24815c3b7b..7982982c5305 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -498,7 +498,7 @@ void printStack( CONTEXT* ctx )
DWORD disp;
char buffer[sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR)];
char module[MaxNameLen];
- PSYMBOL_INFO pSymbol = (PSYMBOL_INFO)buffer;
+ PSYMBOL_INFO pSymbol = reinterpret_cast<PSYMBOL_INFO>(buffer);
memset( &stack, 0, sizeof( STACKFRAME64 ) );
@@ -545,7 +545,7 @@ void printStack( CONTEXT* ctx )
//get symbol name for address
pSymbol->SizeOfStruct = sizeof(SYMBOL_INFO);
pSymbol->MaxNameLen = MAX_SYM_NAME;
- SymFromAddr(process, ( ULONG64 )stack.AddrPC.Offset, &displacement, pSymbol);
+ SymFromAddr(process, static_cast< ULONG64 >(stack.AddrPC.Offset), &displacement, pSymbol);
//try to get line
if (SymGetLineFromAddr64(process, stack.AddrPC.Offset, &disp, line.get()))
@@ -559,7 +559,7 @@ void printStack( CONTEXT* ctx )
hModule = NULL;
lstrcpyA(module,"");
GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
- (LPCTSTR)(stack.AddrPC.Offset), &hModule);
+ reinterpret_cast<LPCTSTR>(stack.AddrPC.Offset), &hModule);
//at least print module name
if(hModule != NULL)GetModuleFileNameA(hModule,module,MaxNameLen);
More information about the Libreoffice-commits
mailing list