Commit c8c96e89 authored by Alexandre Julliard's avatar Alexandre Julliard

include: Add casts to avoid printf format warnings with 'long' types.

parent ae2693e2
...@@ -545,7 +545,7 @@ void winetest_wait_child_process( HANDLE process ) ...@@ -545,7 +545,7 @@ void winetest_wait_child_process( HANDLE process )
winetest_ok( 0, "Timed out waiting for the child process\n" ); winetest_ok( 0, "Timed out waiting for the child process\n" );
else if (ret != WAIT_OBJECT_0) else if (ret != WAIT_OBJECT_0)
winetest_ok( 0, "Could not wait for the child process: %d le=%u\n", winetest_ok( 0, "Could not wait for the child process: %d le=%u\n",
ret, GetLastError() ); (UINT)ret, (UINT)GetLastError() );
else else
{ {
DWORD exit_code; DWORD exit_code;
...@@ -553,12 +553,12 @@ void winetest_wait_child_process( HANDLE process ) ...@@ -553,12 +553,12 @@ void winetest_wait_child_process( HANDLE process )
if (exit_code > 255) if (exit_code > 255)
{ {
DWORD pid = GetProcessId( process ); DWORD pid = GetProcessId( process );
winetest_printf( "unhandled exception %08x in child process %04x\n", exit_code, pid ); winetest_printf( "unhandled exception %08x in child process %04x\n", (UINT)exit_code, (UINT)pid );
InterlockedIncrement( &failures ); InterlockedIncrement( &failures );
} }
else if (exit_code) else if (exit_code)
{ {
winetest_printf( "%u failures in child process\n", exit_code ); winetest_printf( "%u failures in child process\n", (UINT)exit_code );
while (exit_code-- > 0) while (exit_code-- > 0)
InterlockedIncrement(&failures); InterlockedIncrement(&failures);
} }
...@@ -615,14 +615,14 @@ static int run_test( const char *name ) ...@@ -615,14 +615,14 @@ static int run_test( const char *name )
{ {
if (muted_todo_successes || muted_skipped || muted_traces) if (muted_todo_successes || muted_skipped || muted_traces)
printf( "%04x:%s:%s Silenced %d todos, %d skips and %d traces.\n", printf( "%04x:%s:%s Silenced %d todos, %d skips and %d traces.\n",
GetCurrentProcessId(), test->name, winetest_elapsed(), (UINT)GetCurrentProcessId(), test->name, winetest_elapsed(),
muted_todo_successes, muted_skipped, muted_traces); (UINT)muted_todo_successes, (UINT)muted_skipped, (UINT)muted_traces);
printf( "%04x:%s:%s %d tests executed (%d marked as todo, %d %s), %d skipped.\n", printf( "%04x:%s:%s %d tests executed (%d marked as todo, %d %s), %d skipped.\n",
GetCurrentProcessId(), test->name, winetest_elapsed(), (UINT)GetCurrentProcessId(), test->name, winetest_elapsed(),
successes + failures + todo_successes + todo_failures, (UINT)(successes + failures + todo_successes + todo_failures),
todo_successes, failures + todo_failures, (UINT)todo_successes, (UINT)(failures + todo_failures),
(failures + todo_failures != 1) ? "failures" : "failure", (failures + todo_failures != 1) ? "failures" : "failure",
skipped ); (UINT)skipped );
} }
status = (failures + todo_failures < 255) ? failures + todo_failures : 255; status = (failures + todo_failures < 255) ? failures + todo_failures : 255;
return status; return status;
...@@ -646,8 +646,8 @@ static LONG CALLBACK exc_filter( EXCEPTION_POINTERS *ptrs ) ...@@ -646,8 +646,8 @@ static LONG CALLBACK exc_filter( EXCEPTION_POINTERS *ptrs )
printf( "%s:%d: this is the last test seen before the exception\n", printf( "%s:%d: this is the last test seen before the exception\n",
data->current_file, data->current_line ); data->current_file, data->current_line );
printf( "%04x:%s:%s unhandled exception %08x at %p\n", printf( "%04x:%s:%s unhandled exception %08x at %p\n",
GetCurrentProcessId(), current_test->name, winetest_elapsed(), (UINT)GetCurrentProcessId(), current_test->name, winetest_elapsed(),
ptrs->ExceptionRecord->ExceptionCode, ptrs->ExceptionRecord->ExceptionAddress ); (UINT)ptrs->ExceptionRecord->ExceptionCode, ptrs->ExceptionRecord->ExceptionAddress );
fflush( stdout ); fflush( stdout );
return EXCEPTION_EXECUTE_HANDLER; return EXCEPTION_EXECUTE_HANDLER;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment