From 19bf6c9672970e77835eb322b91dcf049d1fa73a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 10 Feb 2024 19:02:17 +0100 Subject: [PATCH] tests: fix compiler warning on empty snprintf format This fixes the following warning: test-core-dir.cpp:178:36: warning: zero-length gnu_printf format string [-Wformat-zero-length] --- tests/unit/core/test-core-dir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/core/test-core-dir.cpp b/tests/unit/core/test-core-dir.cpp index eee3093c5..e296e5823 100644 --- a/tests/unit/core/test-core-dir.cpp +++ b/tests/unit/core/test-core-dir.cpp @@ -175,7 +175,7 @@ TEST(CoreDir, RemoveTrailingSeparators) dir_remove_trailing_separators (NULL); - snprintf (path, sizeof (path), ""); + path[0] = '\0'; dir_remove_trailing_separators (path); STRCMP_EQUAL("", path);