diff options
| author | jvoisin | 2023-09-22 18:27:54 +0200 |
|---|---|---|
| committer | jvoisin | 2023-09-22 18:30:35 +0200 |
| commit | 75b95fa25df74fcd0498bf59e3524f20f594755d (patch) | |
| tree | 729ba69a2358566f126a8b20f9f30d7a5f7f249c /include/string.h | |
| parent | 8c2352b985b1bf69efb965ba15f5e300eb7e8e12 (diff) | |
Add more __diagnose_as_builtin annotations
Diffstat (limited to 'include/string.h')
| -rw-r--r-- | include/string.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/string.h b/include/string.h index 2735b55..8a440e4 100644 --- a/include/string.h +++ b/include/string.h | |||
| @@ -257,6 +257,9 @@ _FORTIFY_FN(mempcpy) void *mempcpy(void * _FORTIFY_POS0 __d, | |||
| 257 | #undef strlcpy | 257 | #undef strlcpy |
| 258 | __access (read_write, 1) | 258 | __access (read_write, 1) |
| 259 | __access (read_only, 2, 3) | 259 | __access (read_only, 2, 3) |
| 260 | #if __has_builtin(__builtin_strlcat) | ||
| 261 | __diagnose_as_builtin(__builtin_strlcat, 1, 2, 3) | ||
| 262 | #endif | ||
| 260 | _FORTIFY_FN(strlcat) size_t strlcat(char * _FORTIFY_POS0 __d, | 263 | _FORTIFY_FN(strlcat) size_t strlcat(char * _FORTIFY_POS0 __d, |
| 261 | const char *__s, size_t __n) | 264 | const char *__s, size_t __n) |
| 262 | { | 265 | { |
| @@ -269,6 +272,9 @@ _FORTIFY_FN(strlcat) size_t strlcat(char * _FORTIFY_POS0 __d, | |||
| 269 | 272 | ||
| 270 | __access (write_only, 1) | 273 | __access (write_only, 1) |
| 271 | __access (read_only, 2, 3) | 274 | __access (read_only, 2, 3) |
| 275 | #if __has_builtin(__builtin_strlcpy) | ||
| 276 | __diagnose_as_builtin(__builtin_strlcpy, 1, 2, 3) | ||
| 277 | #endif | ||
| 272 | _FORTIFY_FN(strlcpy) size_t strlcpy(char * _FORTIFY_POS0 __d, | 278 | _FORTIFY_FN(strlcpy) size_t strlcpy(char * _FORTIFY_POS0 __d, |
| 273 | const char *__s, size_t __n) | 279 | const char *__s, size_t __n) |
| 274 | { | 280 | { |
