string: Fix tester build with fortify enable with gcc 6
commit784ae968113011ce832b1808d4d42369f5d2e320
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Tue, 25 Jul 2023 15:16:41 +0000 (25 12:16 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 26 Jul 2023 13:45:49 +0000 (26 10:45 -0300)
tree71eeb7adf838ac6c472d955d2e63e6066ce66780
parentdbc4b032dc5c4ef0c46e9de23c46b1698bad4412
string: Fix tester build with fortify enable with gcc 6

When building with fortify enabled, GCC 6 issues an warning the fortify
wrapper might overflow the destination buffer.  However, GCC does not
provide a specific flag to disable the warning (the failure is tied to
-Werror).  So to avoid disable all errors, only enable the check for
GCC 7 or newer.

Checked on i686-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
string/tester.c