On 5/15/2026 10:06 AM, Cédric Le Goater wrote:
> A recent change in glibc 2.42.9000 [1] changes the return type of
> strstr() and other string functions to be 'const char *' when the
> input is a 'const char *'. This breaks the build in :
> 
> ../tests/qtest/libqtest.c: In function ‘qtest_verbose’:
> ../tests/qtest/libqtest.c:2175:15: error: assignment discards ‘const’ 
> qualifier from pointer target type [-Werror=discarded-qualifiers]
>  2175 |         found = strstr(log, domain);
> 
> Fix this by changing the type of the variable that store the result to
> 'const char *'.
> 
> [1] 
> https://sourceware.org/git/?p=glibc.git;a=commit;h=cd748a63ab1a7ae846175c532a3daab341c62690
> 
> Fixes: f606321be88c ("tests/qtest: Individual verbose switches")
> Signed-off-by: Cédric Le Goater <[email protected]>
> ---
>  tests/qtest/libqtest.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Pierrick Bouvier <[email protected]>

Reply via email to