summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2025-12-30 11:33:08 +0100
committerJulien Voisin2025-12-30 11:34:48 +0100
commiteec2b5e06bdb01d20f1a1125074a379e0b154d80 (patch)
treefaf6d8ef8a04967044c31ac2c7b600ef8ce9a7ec
parentc4c5fd41124f38a5afee02b8f604ddc21d3b199a (diff)
Change __warning_if into __fortify_warning_if to fix potential conflicts3.0.1
-rw-r--r--include/fortify-headers.h4
-rw-r--r--include/stdlib.h2
-rw-r--r--include/string.h2
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);