fortify-headers

standalone fortify-source implementation
git clone git://git.2f30.org/fortify-headers
Log | Files | Refs | README | LICENSE

commit 0932a82adaa80cda3c81100266306baccf05397e
parent 37eb2c9c1d71c2ff21605ecaf46cdd926244d361
Author: sin <sin@2f30.org>
Date:   Sat, 14 Mar 2015 09:45:37 +0000

Explicitly cast pointers to satisfy C++ code

Diffstat:
Minclude/string.h | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/string.h b/include/string.h @@ -25,8 +25,8 @@ extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) void *memcpy(void *dest, const void *src, size_t n) { size_t bos = __builtin_object_size(dest, 0); - char *d = dest; - const char *s = src; + char *d = (char *)dest; + const char *s = (const char *)src; /* trap if pointers are overlapping but not if dest == src. * gcc seems to like to generate code that relies on dest == src */