@samitouri / QOSamiQemu / commits / e68da5b7a2

tests/qtest: fix discarded const qualifier warning

Modern compilers warn that the result of strstr() may discard const qualifiers when assigned to a non-const pointer. Make 'found' a const char * to fix the warning. Signed-off-by: Matthew Penney <matt@matthewpenney.net> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>

Matthew Penney committed May 14, 2026 at 19:19 UTC e68da5b7a2cd8f4635d3b253ac1581552a3df16f
1 file changed +1 -1
tests/qtest/libqtest.c
+1 -1
@@ -2146,7 +2146,7 @@ bool mkimg(const char *file, const char *fmt, unsigned size_mb)
2146 bool qtest_verbose(const char *domain)
2147 {
2148 const char *log = getenv("QTEST_LOG");
2149 - char *found;
2149 + const char *found;
2150
2151 assert(domain);
2152