diff options
| -rw-r--r-- | include/fortify-headers.h | 4 | ||||
| -rw-r--r-- | include/stdlib.h | 2 | ||||
| -rw-r--r-- | include/string.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/fortify-headers.h b/include/fortify-headers.h index b0bee87..c32d5fb 100644 --- a/include/fortify-headers.h +++ b/include/fortify-headers.h | |||
| @@ -74,9 +74,9 @@ | |||
| 74 | #endif | 74 | #endif |
| 75 | 75 | ||
| 76 | #if __has_attribute (__diagnose_if) | 76 | #if __has_attribute (__diagnose_if) |
| 77 | #define __warning_if(cond, msg) __attribute__ ((__diagnose_if (cond, msg, "warning"))) | 77 | #define __fortify_warning_if(cond, msg) __attribute__ ((__diagnose_if (cond, msg, "warning"))) |
| 78 | #else | 78 | #else |
| 79 | #define __warning_if(cond, msg) | 79 | #define __fortify_warning_if(cond, msg) |
| 80 | #endif | 80 | #endif |
| 81 | 81 | ||
| 82 | #endif | 82 | #endif |
diff --git a/include/stdlib.h b/include/stdlib.h index aeed102..0336d56 100644 --- a/include/stdlib.h +++ b/include/stdlib.h | |||
| @@ -39,7 +39,7 @@ extern "C" { | |||
| 39 | /* FIXME clang */ | 39 | /* FIXME clang */ |
| 40 | #if (defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)) && !defined(__clang__) | 40 | #if (defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)) && !defined(__clang__) |
| 41 | #undef realpath | 41 | #undef realpath |
| 42 | __warning_if(__p == NULL, "'realpath' called with path set to `NULL`; did you invert the arguments?") | 42 | __fortify_warning_if(__p == NULL, "'realpath' called with path set to `NULL`; did you invert the arguments?") |
| 43 | _FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r) | 43 | _FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r) |
| 44 | { | 44 | { |
| 45 | #ifndef PATH_MAX | 45 | #ifndef PATH_MAX |
diff --git a/include/string.h b/include/string.h index 8f0167f..7987d17 100644 --- a/include/string.h +++ b/include/string.h | |||
| @@ -71,7 +71,7 @@ _FORTIFY_FN(memmove) void *memmove(void * _FORTIFY_POS0 __d, | |||
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | __fortify_access(write_only, 1, 3) | 73 | __fortify_access(write_only, 1, 3) |
| 74 | __warning_if(__c != 0 && __n == 0, "'memset' will set `0` bytes; did you invert the arguments?") | 74 | __fortify_warning_if(__c != 0 && __n == 0, "'memset' will set `0` bytes; did you invert the arguments?") |
| 75 | _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) |
| 76 | { | 76 | { |
| 77 | size_t __b = __bos(__d, 0); | 77 | size_t __b = __bos(__d, 0); |
