diff options
| author | jvoisin | 2023-07-09 18:50:30 +0200 |
|---|---|---|
| committer | jvoisin | 2023-07-09 18:50:30 +0200 |
| commit | b333df29dcfabcd4ad0cf630fdb648eaa38ec1c7 (patch) | |
| tree | 3b7168b33afb3cd68ee50bcdc86e5e5e21136d28 /include/fortify-headers.h | |
| parent | 190e386fe8666a1250e8aedce73bf8e32ab8c0fd (diff) | |
Add some `format` annotations
Diffstat (limited to 'include/fortify-headers.h')
| -rw-r--r-- | include/fortify-headers.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/fortify-headers.h b/include/fortify-headers.h index 08b8dd3..24af881 100644 --- a/include/fortify-headers.h +++ b/include/fortify-headers.h | |||
| @@ -60,6 +60,12 @@ | |||
| 60 | #define __access(...) | 60 | #define __access(...) |
| 61 | #endif | 61 | #endif |
| 62 | 62 | ||
| 63 | #if defined __has_attribute && __has_attribute (format) | ||
| 64 | #define __format(...) __attribute__ ((format (__VA_ARGS__))) | ||
| 65 | #else | ||
| 66 | #define __format(...) | ||
| 67 | #endif | ||
| 68 | |||
| 63 | 69 | ||
| 64 | /* TODO(jvoisin) Figure a nice way to make use of __builtin_mul_overflow while ignoring the result. */ | 70 | /* TODO(jvoisin) Figure a nice way to make use of __builtin_mul_overflow while ignoring the result. */ |
| 65 | /* TODO(jvoisin) Make use of C23's stdckdint header: https://gustedt.gitlabpages.inria.fr/c23-library/#stdckdint */ | 71 | /* TODO(jvoisin) Make use of C23's stdckdint header: https://gustedt.gitlabpages.inria.fr/c23-library/#stdckdint */ |
