diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2020-02-17 08:39:29 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-02-17 08:39:29 +0100 |
| commit | 8083f7109f8173679f179e805c579cf1a0f5c6d2 (patch) | |
| tree | 341532ae5c1a59e71cd7c13e3913d0b331d1697b /core/buffer-test.c | |
| parent | cf74cbeff856b1b3e23dd5df107bb9409ed424c8 (diff) | |
| download | vis-8083f7109f8173679f179e805c579cf1a0f5c6d2.tar.gz vis-8083f7109f8173679f179e805c579cf1a0f5c6d2.tar.xz | |
test/core: avoid compiler warning about zero length format string
Diffstat (limited to 'core/buffer-test.c')
| -rw-r--r-- | core/buffer-test.c | 4 |
1 files 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); } |
