public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] string.h: fix __fortified_attr_access macro call [BZ #29162]
@ 2022-05-20 15:06 Sergei Trofimovich
  2022-05-23  3:50 ` Siddhesh Poyarekar
  2022-05-23  7:19 ` Siddhesh Poyarekar
  0 siblings, 2 replies; 8+ messages in thread
From: Sergei Trofimovich @ 2022-05-20 15:06 UTC (permalink / raw)
  To: libc-alpha; +Cc: Siddhesh Poyarekar, Sergei Trofimovich

From: Sergei Trofimovich <slyich@gmail.com>

commit e938c0274 "Don't add access size hints to fortifiable functions"
converted a few '__attr_access ((...))' into '__fortified_attr_access (...)'
calls.

But one of conversions had double parentheses of '__fortified_attr_access (...)'.

Noticed as a gnat6 build failure:

    /<<NIX>>-glibc-2.34-210-dev/include/bits/string_fortified.h:110:50: error: macro "__fortified_attr_access" requires 3 arguments, but only 1 given

The change fixes parentheses.

Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
---
 string/bits/string_fortified.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/string/bits/string_fortified.h b/string/bits/string_fortified.h
index f4a5dfc2e5..149ebbb08b 100644
--- a/string/bits/string_fortified.h
+++ b/string/bits/string_fortified.h
@@ -107,7 +107,7 @@ __NTH (stpncpy (char *__dest, const char *__src, size_t __n))
 # else
 extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
 			    size_t __destlen) __THROW
-  __fortified_attr_access ((__write_only__, 1, 3))
+  __fortified_attr_access (__write_only__, 1, 3)
   __attr_access ((__read_only__, 2));
 extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src,
 					       size_t __n), stpncpy);
-- 
2.36.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-23  8:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 15:06 [PATCH] string.h: fix __fortified_attr_access macro call [BZ #29162] Sergei Trofimovich
2022-05-23  3:50 ` Siddhesh Poyarekar
2022-05-23  6:54   ` Sergei Trofimovich
2022-05-23  6:55     ` Siddhesh Poyarekar
2022-05-23  7:19 ` Siddhesh Poyarekar
2022-05-23  7:23   ` Siddhesh Poyarekar
2022-05-23  8:24   ` Sergei Trofimovich
2022-05-23  8:31     ` Siddhesh Poyarekar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).