aboutsummaryrefslogtreecommitdiff
path: root/string/Makefile
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-12-23 05:12:02 +0800
committerH.J. Lu <hjl.tools@gmail.com>2024-12-23 06:28:55 +0800
commit31c47126f4b5203eb5f72bb9dc8ceb09cacb4574 (patch)
tree30eea4636d6980d7ad7c13f8ff48926d582689e3 /string/Makefile
parentcb74bafbb51ba291676ab7ed3b690a47ffebc567 (diff)
downloadglibc-31c47126f4b5203eb5f72bb9dc8ceb09cacb4574.tar.xz
glibc-31c47126f4b5203eb5f72bb9dc8ceb09cacb4574.zip
string: Suppress Clang warnings on tester.c
Add a configure check for -Wno-fortify-source to suppress Clang warnings on string/tester.c, like: tester.c:385:10: error: 'strncat' size argument is too large; destination buffer has size 50, but size argument is 99 [-Werror,-Wfortify-source] 385 | check (strncat (one, "lmn", 99) == one, 1); /* Returned value. */ Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'string/Makefile')
-rw-r--r--string/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/string/Makefile b/string/Makefile
index 1dff405c27..ac70d63404 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -252,8 +252,11 @@ endif
include ../Rules
-CFLAGS-inl-tester.c += -fno-builtin
-CFLAGS-noinl-tester.c += -fno-builtin
+CFLAGS-tester.c += $(test-config-cflags-wno-fortify-source)
+CFLAGS-inl-tester.c += -fno-builtin \
+ $(test-config-cflags-wno-fortify-source)
+CFLAGS-noinl-tester.c += -fno-builtin \
+ $(test-config-cflags-wno-fortify-source)
CFLAGS-tst-strlen.c += -fno-builtin
CFLAGS-stratcliff.c += -fno-builtin
CFLAGS-test-ffs.c += -fno-builtin