From 520e7e4a631cc038b3e867b2255235da35a98ece Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 14 Jun 2024 19:46:14 +0200 Subject: Fix some pointer-arithmetic warnings This should fix the second part of #59 --- include/fortify-headers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/fortify-headers.h b/include/fortify-headers.h index 796fd2d..f7d8af8 100644 --- a/include/fortify-headers.h +++ b/include/fortify-headers.h @@ -141,8 +141,8 @@ * since gcc seems to like to generate code that relies on dst == src */ #define __fh_overlap(a, len_a, b, len_b) \ ( \ - ((a) < (b) && (b) < ((a) + (__fh_size_t)(len_a))) \ - || ((b) < (a) && (a) < ((b) + (__fh_size_t)(len_b))) \ + ((char*)(a) < (char*)(b) && (char*)(b) < ((char*)(a) + (__fh_size_t)(len_a))) \ + || ((char*)(b) < (char*)(a) && (char*)(a) < ((char*)(b) + (__fh_size_t)(len_b))) \ ) /* -- cgit v1.3