This looks OK to me. The code is never executed but it shouldn't have a warning either.
What compiler spotted this? Poke Sebastian or Christian to push it to 5 and master. I am not going to be able to do that today. On Thu, Jul 30, 2020 at 7:47 AM Aschref Ben-Thabet < [email protected]> wrote: > From: Aschref Ben Thabet <[email protected]> > > --- > testsuites/psxtests/psxhdrs/string/strncat.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/testsuites/psxtests/psxhdrs/string/strncat.c > b/testsuites/psxtests/psxhdrs/string/strncat.c > index 730a56cfa6..d872be3408 100644 > --- a/testsuites/psxtests/psxhdrs/string/strncat.c > +++ b/testsuites/psxtests/psxhdrs/string/strncat.c > @@ -45,7 +45,7 @@ > char buffer[SIZE] = "computer"; > char *result; > > - result = strncat( buffer, " program", 3 ); > + result = strncat( buffer, " program", sizeof( buffer ) - 1 ); > > return ( result != NULL ); > } > -- > 2.26.2 > > _______________________________________________ > devel mailing list > [email protected] > http://lists.rtems.org/mailman/listinfo/devel >
_______________________________________________ devel mailing list [email protected] http://lists.rtems.org/mailman/listinfo/devel
