[PATCH] Fix stringop-overflow warning in test-strncat.

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu Mar 2 10:23:14 GMT 2023


Hi Stefan,

> In all werror cases, the call to strnlen (.., SIZE_MAX) is inlined.
> Therefore this patch just marks the do_one_test function as noinline.

LGTM

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>

Cheers,
Wilco

 static void
+__attribute__((noinline))
 do_one_test (impl_t *impl, CHAR *dst, const CHAR *src, size_t n)
 {
   size_t k = STRLEN (dst);

OK


More information about the Libc-alpha mailing list