Changeset 4763ef8 in rtems for testsuites

Timestamp:
10/05/20 14:23:01 (4 years ago)
Author:
Frank Kühndel <frank.kuehndel@…>
Branches:
master
Children:
f3df25b6
Parents:
b434dc1
git-author:
Frank Kühndel <frank.kuehndel@…> (10/05/20 14:23:01)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/12/20 06:43:32)
Message:

psxndbm01 - Fixing string truncation warning

This fixes the following compiler warning:

testsuites/psxtests/psxndbm01/init.c:221:3: warning: 'strncpy' output truncated
before terminating nul copying 5 bytes from a string of the same length

221 | strncpy( test_strings, "Hello", 5 );

|

In addition, the comments from Sebastian Huber on an old version of
such a patch have been taken into account:

1) The use of sizeof() in key.dsize = sizeof( test_strings ); is wrong.

2) There is no need to allocate the string. One can simply use a string

constant.

(See https://lists.rtems.org/pipermail/devel/2020-August/061418.html)

(No files)

Note: See TracChangeset for help on using the changeset viewer.