From bd42514af052510b9ab564e5835842243bc4502f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 5 May 2018 17:47:25 +0200 Subject: [PATCH] ldr: Fix printf format string for size_t %z should be used for size_t, otherwise the wrong value may be printed. Fixes two -Wformat warnings. --- stratosphere/loader/source/ldr_debug_monitor.cpp | 2 +- stratosphere/loader/source/ldr_shell.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stratosphere/loader/source/ldr_debug_monitor.cpp b/stratosphere/loader/source/ldr_debug_monitor.cpp index 905eef1fc..26088a173 100644 --- a/stratosphere/loader/source/ldr_debug_monitor.cpp +++ b/stratosphere/loader/source/ldr_debug_monitor.cpp @@ -26,7 +26,7 @@ Result DebugMonitorService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 } std::tuple DebugMonitorService::add_title_to_launch_queue(u64 tid, InPointer args) { - fprintf(stderr, "Add to launch queue: %p, %X\n", args.pointer, args.num_elements); + fprintf(stderr, "Add to launch queue: %p, %zX\n", args.pointer, args.num_elements); return {LaunchQueue::add(tid, args.pointer, args.num_elements)}; } diff --git a/stratosphere/loader/source/ldr_shell.cpp b/stratosphere/loader/source/ldr_shell.cpp index 2b48bcb97..50c9f44ae 100644 --- a/stratosphere/loader/source/ldr_shell.cpp +++ b/stratosphere/loader/source/ldr_shell.cpp @@ -20,7 +20,7 @@ Result ShellService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id } std::tuple ShellService::add_title_to_launch_queue(u64 tid, InPointer args) { - fprintf(stderr, "Add to launch queue: %p, %X\n", args.pointer, args.num_elements); + fprintf(stderr, "Add to launch queue: %p, %zX\n", args.pointer, args.num_elements); return {LaunchQueue::add(tid, args.pointer, args.num_elements)}; }