]> git.ipfire.org Git - thirdparty/glibc.git/commit
string.h: fix __fortified_attr_access macro call [BZ #29162]
authorSergei Trofimovich <slyich@gmail.com>
Mon, 23 May 2022 08:26:43 +0000 (13:56 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 23 May 2022 08:30:31 +0000 (14:00 +0530)
commit478cd506eaa5bbc81e3de6593a5064fa5f36fea9
tree298465969e8a1ef87c2e43d90504e86bca9f9f49
parent2b128a7d30f5f808c5246034f71d249010521f1b
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:

    /<<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.

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 <slyich@gmail.com>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit 5a5f94af0542f9a35aaa7992c18eb4e2403a29b9)
string/bits/string_fortified.h