Hi
On Thu, May 14, 2026 at 11:20 PM Matthew Penney <[email protected]> wrote:
>
> 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 <[email protected]>
Fixes f606321be8 ("tests/qtest: Individual verbose switches")
Reviewed-by: Marc-André Lureau <[email protected]>
> ---
> tests/qtest/libqtest.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
> index bf9284b9a1..b1e06ea364 100644
> --- a/tests/qtest/libqtest.c
> +++ b/tests/qtest/libqtest.c
> @@ -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);
>
> --
> 2.54.0
>
>
>
--
Marc-André Lureau