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/strings.h | |
| parent | 8c2352b985b1bf69efb965ba15f5e300eb7e8e12 (diff) | |
Add more __diagnose_as_builtin annotations
Diffstat (limited to 'include/strings.h')
| -rw-r--r-- | include/strings.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/strings.h b/include/strings.h index 8b99ccd..c91715d 100644 --- a/include/strings.h +++ b/include/strings.h | |||
| @@ -33,6 +33,10 @@ extern "C" { | |||
| 33 | #undef bzero | 33 | #undef bzero |
| 34 | __access(write_only, 2, 3) | 34 | __access(write_only, 2, 3) |
| 35 | __access(read_only, 1, 3) | 35 | __access(read_only, 1, 3) |
| 36 | #if __has_builtin(__builtin_bcopy) && !defined(__clang__) | ||
| 37 | // parameter 1 of function '__orig_bcopy' has type 'const void *', but parameter 1 of function '__builtin_bcopy' has type 'void *' | ||
| 38 | __diagnose_as_builtin(__builtin_bcopy, 1, 2, 3) | ||
| 39 | #endif | ||
| 36 | _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, | 40 | _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, |
| 37 | void * _FORTIFY_POS0 __d, size_t __n) | 41 | void * _FORTIFY_POS0 __d, size_t __n) |
| 38 | { | 42 | { |
