From 44c9b73801c1e02e95b533a3cb498ab8c532e98b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 28 Feb 2023 11:02:18 +0400 Subject: [PATCH] tests: fix -Wwrite-strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Signed-off-by: David Gibson --- tests/path_offset.c | 4 ++-- tests/utilfdt_test.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/path_offset.c b/tests/path_offset.c index 82527d4..8e657af 100644 --- a/tests/path_offset.c +++ b/tests/path_offset.c @@ -41,7 +41,7 @@ static int check_subnode(void *fdt, int parent, const char *name) return offset; } -static void check_path_offset(void *fdt, char *path, int offset) +static void check_path_offset(void *fdt, const char *path, int offset) { int rc; @@ -56,7 +56,7 @@ static void check_path_offset(void *fdt, char *path, int offset) " %d instead of %d", path, rc, offset); } -static void check_path_offset_namelen(void *fdt, char *path, int namelen, +static void check_path_offset_namelen(void *fdt, const char *path, int namelen, int offset) { int rc; diff --git a/tests/utilfdt_test.c b/tests/utilfdt_test.c index ba6462f..f62341c 100644 --- a/tests/utilfdt_test.c +++ b/tests/utilfdt_test.c @@ -50,7 +50,7 @@ static void checkfail(const char *fmt) * \param expected_size The size (in bytes) that we expect (ignored for * strings) */ -static void check_sizes(char *modifier, int expected_size) +static void check_sizes(const char *modifier, int expected_size) { char fmt[10], *ptr;