diff options
| author | jvoisin | 2023-08-20 20:50:31 +0200 |
|---|---|---|
| committer | jvoisin | 2023-08-20 21:09:05 +0200 |
| commit | bfbaa577f6fc46ebb965724e0f261e79e26ec9fb (patch) | |
| tree | 65e422e5f76c71d250dcdb5bd1537ea4c560fae4 /include/strings.h | |
| parent | d6afda7207b7a8a144923ab5813d8a0816813907 (diff) | |
Make use of __diagnose_as_builtin
Diffstat (limited to 'include/strings.h')
| -rw-r--r-- | include/strings.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/strings.h b/include/strings.h index 3b6b765..530572a 100644 --- a/include/strings.h +++ b/include/strings.h | |||
| @@ -33,6 +33,7 @@ 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 | __diagnose_as_builtin(__builtin_bcopy, 1, 2, 3) | ||
| 36 | _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, | 37 | _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, |
| 37 | void * _FORTIFY_POS0 __d, size_t __n) | 38 | void * _FORTIFY_POS0 __d, size_t __n) |
| 38 | { | 39 | { |
| @@ -45,6 +46,7 @@ _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, | |||
| 45 | } | 46 | } |
| 46 | 47 | ||
| 47 | __access(write_only, 1, 2) | 48 | __access(write_only, 1, 2) |
| 49 | __diagnose_as_builtin(__builtin_bzero, 1, 2) | ||
| 48 | _FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n) | 50 | _FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n) |
| 49 | { | 51 | { |
| 50 | size_t __b = __bos(__s, 0); | 52 | size_t __b = __bos(__s, 0); |
