Silence snprintf truncation warnings in printf_test examples
authorDimitry Andric <dim@FreeBSD.org>
Thu, 21 Dec 2023 22:39:15 +0000 (23:39 +0100)
committerDimitry Andric <dim@FreeBSD.org>
Thu, 21 Dec 2023 22:45:52 +0000 (23:45 +0100)
commit69c8025a498450b6bc4cc9e97ba779ed1c2e7f4b
tree16a6a35ba37f5f1fa33948e17d0f190976dd6cdf
parentc794d188222a4d3414233ff9630d47eedc090fbe
Silence snprintf truncation warnings in printf_test examples

Building share/examples/tests with clang 18 results in a few warnings
like:

  share/examples/tests/tests/plain/printf_test.c:67:6: error: 'snprintf' will always be truncated; specified size is 10, but format string expands to at least 17 [-Werror,-Wformat-truncation]
     67 |         if (snprintf(buffer, sizeof(buffer), "0123456789abcdef") != 16)
        |             ^

Since these tests are meant as an example of testing snprintf overflow,
suppress the warnings.

MFC after: 3 days
share/examples/tests/tests/atf/Makefile
share/examples/tests/tests/plain/Makefile
share/examples/tests/tests/tap/Makefile