From 8083f7109f8173679f179e805c579cf1a0f5c6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 17 Feb 2020 08:39:29 +0100 Subject: test/core: avoid compiler warning about zero length format string --- core/buffer-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/buffer-test.c b/core/buffer-test.c index cb3f1d9..dfdb466 100644 --- a/core/buffer-test.c +++ b/core/buffer-test.c @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) { ok(buffer_printf(&buf, "%d\n", 42) && compare0(&buf, "42\n"), "Set formatted overwrite"); buffer_clear(&buf); - ok(buffer_printf(&buf, "") && compare0(&buf, ""), "Set formatted empty string"); + ok(buffer_printf(&buf, "%s", "") && compare0(&buf, ""), "Set formatted empty string"); buffer_clear(&buf); bool append = true; @@ -79,7 +79,7 @@ int main(int argc, char *argv[]) { append = true; for (int i = 1; i <= 10; i++) - append &= buffer_appendf(&buf, ""); + append &= buffer_appendf(&buf, "%s", ""); ok(append && compare0(&buf, ""), "Append formatted empty string"); buffer_clear(&buf); } -- cgit v1.2.3