vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 600df36713b74fe7c38da8e9d474f19874476681 parent 18277c494b8d18e47544976d2b378920c776c924 Author: Marc André Tanner <mat@brain-dump.org> Date: Mon, 17 Feb 2020 08:39:29 +0100 test/core: avoid compiler warning about zero length format string Diffstat:
| M | core/buffer-test.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git 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); }