summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-09-30 10:09:07 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-09-30 14:50:31 +0200
commit631b3887ab417678cc993ef68c0fd7f86ac56c86 (patch)
treecbcb52a5db57bb209487932c52e3110229cda289 /sal
parent8148a46c7878158c4b701e2a5c374129e6ffdffc (diff)
-Werror,-Wformat (clang-cl)
> sal/cppunittester/cppunittester.cxx(553,115): error: format specifies type 'unsigned int' but the argument has type 'ULONG64' (aka 'unsigned long long') [-Werror,-Wformat] > printf("\tat %s in %s: line: %lu: address: 0x%0X\n", pSymbol->Name, line->FileName, line->LineNumber, pSymbol->Address); > ~~~ ^~~~~~~~~~~~~~~~ > %0llX > sal/cppunittester/cppunittester.cxx(558,64): error: format specifies type 'unsigned int' but the argument has type 'ULONG64' (aka 'unsigned long long') [-Werror,-Wformat] > printf("\tat %s, address 0x%0X.\n", pSymbol->Name, pSymbol->Address); > ~~~ ^~~~~~~~~~~~~~~~ > %0llX > sal/cppunittester/cppunittester.cxx(576,50): error: format specifies type 'unsigned int' but the argument has type 'DWORD' (aka 'unsigned long') [-Werror,-Wformat] > printf("*** Exception 0x%x occurred ***\n\n",ex->ExceptionRecord->ExceptionCode); > ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > %lx ...but where SYMBOL_INFO::Address is documented to be of type ULONG64, which in turn is documented to be a typedef for unsigned __int64, for which there is the MSVC-extension I64 format specifier Change-Id: Ibed1d3fa49ac6fd988174c6041071292fc66dd3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122872 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/cppunittester/cppunittester.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index 1e1d5e65f59e..3ec11a3ffc3a 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -550,12 +550,12 @@ static void printStack( CONTEXT* ctx )
//try to get line
if (SymGetLineFromAddr64(process, stack.AddrPC.Offset, &disp, line.get()))
{
- printf("\tat %s in %s: line: %lu: address: 0x%0X\n", pSymbol->Name, line->FileName, line->LineNumber, pSymbol->Address);
+ printf("\tat %s in %s: line: %lu: address: 0x%0I64X\n", pSymbol->Name, line->FileName, line->LineNumber, pSymbol->Address);
}
else
{
//failed to get line
- printf("\tat %s, address 0x%0X.\n", pSymbol->Name, pSymbol->Address);
+ printf("\tat %s, address 0x%0I64X.\n", pSymbol->Name, pSymbol->Address);
hModule = NULL;
lstrcpyA(module,"");
GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
@@ -573,7 +573,7 @@ static void printStack( CONTEXT* ctx )
static LONG WINAPI ExpFilter(EXCEPTION_POINTERS* ex)
{
// we only want this active on the Jenkins tinderboxes
- printf("*** Exception 0x%x occurred ***\n\n",ex->ExceptionRecord->ExceptionCode);
+ printf("*** Exception 0x%lx occurred ***\n\n",ex->ExceptionRecord->ExceptionCode);
printStack(ex->ContextRecord);
return EXCEPTION_EXECUTE_HANDLER;
}