Commit Graph

1 Commits

Author SHA1 Message Date
Siddhesh Poyarekar
bf9688e623 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 <siddhesh@sourceware.org>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2024-02-28 08:35:10 -05:00