cdefs: Drop access attribute for _FORTIFY_SOURCE=3 (BZ #31383)
When passed a pointer to a zero-sized struct, the access attribute
without the third argument misleads -Wstringop-overflow diagnostics to
think that a function is writing 1 byte into the zero-sized structs.
The attribute doesn't add that much value in this context, so drop it
completely for _FORTIFY_SOURCE=3.
The master branch has been updated by Siddhesh Poyarekar <email address hidden>:
https:/ /sourceware. org/git/ gitweb. cgi?p=glibc. git;h=bf9688e62 3262c5fa9f91e4d e0e84db45025076 f
commit bf9688e623262c5 fa9f91e4de0e84d b45025076f
Author: Siddhesh Poyarekar <email address hidden>
Date: Thu Feb 15 07:40:56 2024 -0500
cdefs: Drop access attribute for _FORTIFY_SOURCE=3 (BZ #31383)
When passed a pointer to a zero-sized struct, the access attribute
without the third argument misleads -Wstringop-overflow diagnostics to
think that a function is writing 1 byte into the zero-sized structs.
The attribute doesn't add that much value in this context, so drop it
completely for _FORTIFY_SOURCE=3.
Resolves: BZ #31383
Signed-off-by: Siddhesh Poyarekar <email address hidden>
Reviewed-by: Adhemerval Zanella <email address hidden>