From f72cdbda8b5d3500c59e13bf1badc3e34a8cf192 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 28 Sep 2023 14:18:54 -0300 Subject: string: Suppress clang confstr -Wignored-attributes on strlen clang warns that the alias will be always resolve to __strlen even if weak definition of __GI_strlen is overridden, which is really the intention. --- string/strlen.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'string/strlen.c') diff --git a/string/strlen.c b/string/strlen.c index a0378c500e..a89bacff56 100644 --- a/string/strlen.c +++ b/string/strlen.c @@ -48,5 +48,10 @@ __strlen (const char *str) } #ifndef STRLEN weak_alias (__strlen, strlen) +/* clang warns that the alias will be always resolve to __strlen even if weak + definition of __GI_strlen is overridden, which is really the intention. */ +DIAG_PUSH_NEEDS_COMMENT_CLANG; +DIAG_IGNORE_NEEDS_COMMENT_CLANG (16, "-Wignored-attributes"); libc_hidden_builtin_def (strlen) +DIAG_POP_NEEDS_COMMENT_CLANG; #endif -- cgit 1.4.1