[PATCH v2 2/4] testsuite/smokey/sched-tp: Fix compile error seen with gcc 16

Florian Bezdeka <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <[email protected]>
Fixes the following compile error:

sched-tp.c: In function ‘run_sched_tp’:
sched-tp.c:233:11: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
  233 |         s = strstr(ref_schedule, schedule);
      |           ^
cc1: all warnings being treated as errors

Signed-off-by: Florian Bezdeka <[email protected]>
---
 testsuite/smokey/sched-tp/sched-tp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuite/smokey/sched-tp/sched-tp.c b/testsuite/smokey/sched-tp/sched-tp.c
index c2c3e41edff266ff9aec9a09f884ffaf3e2a9308..dc30e75a8764d61af018a9ba66648c55fe1570ba 100644
--- a/testsuite/smokey/sched-tp/sched-tp.c
+++ b/testsuite/smokey/sched-tp/sched-tp.c
@@ -122,8 +122,8 @@ static int run_sched_tp(struct smokey_test *t, int argc, char *const argv[])
 {
 	union sched_config *p;
 	int ret, n, policies;
+	const char *s;
 	size_t len;
-	char *s;
 
 	ret = cobalt_corectl(_CC_COBALT_GET_POLICIES, &policies, sizeof(policies));
 	if (ret || (policies & _CC_COBALT_SCHED_TP) == 0)

-- 
2.54.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.