]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/qtest: fix discarded const qualifier warning
authorMatthew Penney <matt@matthewpenney.net>
Thu, 14 May 2026 19:19:18 +0000 (19:19 +0000)
committerFabiano Rosas <farosas@suse.de>
Mon, 18 May 2026 15:15:42 +0000 (12:15 -0300)
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>
tests/qtest/libqtest.c

index bf9284b9a1317bc5342d614d1b224d914c9d4b8f..b1e06ea364ecb33b7b3c19dd582d77f7e939fe91 100644 (file)
@@ -2146,7 +2146,7 @@ bool mkimg(const char *file, const char *fmt, unsigned size_mb)
 bool qtest_verbose(const char *domain)
 {
     const char *log = getenv("QTEST_LOG");
-    char *found;
+    const char *found;
 
     assert(domain);