From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2206) id BF0493856241; Mon, 23 May 2022 08:41:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF0493856241 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Siddhesh Poyarekar To: glibc-cvs@sourceware.org Subject: [glibc/release/2.34/master] string.h: fix __fortified_attr_access macro call [BZ #29162] X-Act-Checkin: glibc X-Git-Author: Sergei Trofimovich X-Git-Refname: refs/heads/release/2.34/master X-Git-Oldrev: b2585cae2854d7d2868fb2e51e2796042c5e0679 X-Git-Newrev: 14770f3e0462721b317f138197e1fbf4db542c94 Message-Id: <20220523084113.BF0493856241@sourceware.org> Date: Mon, 23 May 2022 08:41:13 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2022 08:41:13 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=14770f3e0462721b317f138197e1fbf4db542c94 commit 14770f3e0462721b317f138197e1fbf4db542c94 Author: Sergei Trofimovich Date: Mon May 23 13:56:43 2022 +0530 string.h: fix __fortified_attr_access macro call [BZ #29162] 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: /<>-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. This is seen when using compilers that do not support __builtin___stpncpy_chk, e.g. gcc older than 4.7, clang older than 2.6 or some compiler not derived from gcc or clang. Signed-off-by: Sergei Trofimovich Reviewed-by: Siddhesh Poyarekar (cherry picked from commit 5a5f94af0542f9a35aaa7992c18eb4e2403a29b9) Diff: --- 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 218006c9ba..4e66e0bd1e 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);