[PATCH weston] ivi-layout-test: Fix compilation error

Philippe Normand philn at igalia.com
Thu Mar 8 17:59:53 UTC 2018


tests/ivi-layout-test.c:255:48: error: format not a string literal and
no format arguments [-Werror=format-security]
  snprintf(launcher->exe, sizeof launcher->exe, path);
                                                ^~~~
---
 tests/ivi-layout-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/ivi-layout-test.c b/tests/ivi-layout-test.c
index b8074cf..337269f 100644
--- a/tests/ivi-layout-test.c
+++ b/tests/ivi-layout-test.c
@@ -252,7 +252,7 @@ controller_module_init(struct weston_compositor
*compositor,
 
 	launcher->compositor = compositor;
 	launcher->layout_interface = iface;
-	snprintf(launcher->exe, sizeof launcher->exe, path);
+	snprintf(launcher->exe, sizeof launcher->exe, "%s", path);
 
 	if (wl_global_create(compositor->wl_display,
 			     &weston_test_runner_interface, 1,


More information about the wayland-devel mailing list