diff options
| author | jvoisin | 2025-11-14 16:25:52 +0100 |
|---|---|---|
| committer | jvoisin | 2025-11-14 16:56:09 +0100 |
| commit | 611069d07c14bf7ace7a75fa2bc9147db8ac097d (patch) | |
| tree | 03c6f2e57f91bfc945952739c8d47c4d52929bc8 /include/string.h | |
| parent | e9b6cb7e2eb7029902ae92ef43fb905e5072785b (diff) | |
Add __diagnose_if annotations3.0
Diffstat (limited to 'include/string.h')
| -rw-r--r-- | include/string.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/string.h b/include/string.h index cf0be60..987b50c 100644 --- a/include/string.h +++ b/include/string.h | |||
| @@ -71,6 +71,7 @@ _FORTIFY_FN(memmove) void *memmove(void * _FORTIFY_POS0 __d, | |||
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | __access(write_only, 1, 3) | 73 | __access(write_only, 1, 3) |
| 74 | __warning_if(__c != 0 && __n == 0, "'memset' will set `0` bytes; did you invert the arguments?") | ||
| 74 | _FORTIFY_FN(memset) void *memset(void * _FORTIFY_POS0 __d, int __c, size_t __n) | 75 | _FORTIFY_FN(memset) void *memset(void * _FORTIFY_POS0 __d, int __c, size_t __n) |
| 75 | { | 76 | { |
| 76 | size_t __b = __bos(__d, 0); | 77 | size_t __b = __bos(__d, 0); |
