aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorNico Elbers <nico.b.elbers@gmail.com>2024-08-29 15:01:29 +0200
committerAndrew Kelley <andrew@ziglang.org>2024-09-01 00:45:31 -0700
commitcad65307b757d4dfcbae018dbdb4c2a98b87b7e3 (patch)
tree34c8619654309b73de4691ace819884722faad56 /lib/std/debug.zig
parent52fc0469079d061c7482f5708557c35b389cd800 (diff)
downloadzig-cad65307b757d4dfcbae018dbdb4c2a98b87b7e3.tar.gz
zig-cad65307b757d4dfcbae018dbdb4c2a98b87b7e3.zip
std: make debug.dumpStackPointerAddr compile
Very simply add the format specifier to the print statement. Since debug.print is hard coded I couldn't come up with a reasonalble way to add a test, and since this function is simple enough I doubt it's useful. fixes one part of #21094
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index 554788f4fd..fd6676504f 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -1347,7 +1347,7 @@ pub fn dumpStackPointerAddr(prefix: []const u8) void {
const sp = asm (""
: [argc] "={rsp}" (-> usize),
);
- std.debug.print("{} sp = 0x{x}\n", .{ prefix, sp });
+ std.debug.print("{s} sp = 0x{x}\n", .{ prefix, sp });
}
test "manage resources correctly" {