Changeset 0a761a58 in rtems for testsuites/fstests

Timestamp:
10/12/20 14:41:51 (4 years ago)
Author:
Frank Kühndel <frank.kuehndel@…>
Branches:
master
Children:
2361b2c
Parents:
3972085
git-author:
Frank Kühndel <frank.kuehndel@…> (10/12/20 14:41:51)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/15/20 17:12:15)
Message:

fsdosfsname01: Fix string truncation warning

This patch fixes a compiler warning:

../../../testsuites/fstests/fsdosfsname01/init.c:430:19: warning:
'%s' directive output may be truncated writing up to 6424 bytes into
a region of size 257 [-Wformat-truncation=]

The buffer 'dirname' is exactly large enough so that no truncation
can ever occur. Using the return value of snprintf() is an official
supported way to suppress the warning.

I considered the comment of Joel Sherrill about not replacing snprintf():
https://lists.rtems.org/pipermail/devel/2020-September/062113.html

(No files)

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