From 05baf9cfe90c25b02652489c6dd75810600ead5e Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 28 Oct 2025 23:16:05 +0100 Subject: Fix possible cast-mismatch spotted by `-Werror=cast-qual` --- 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 b5c8bc0..a8f76cc 100644 --- a/include/fortify-headers.h +++ b/include/fortify-headers.h @@ -134,8 +134,8 @@ * since gcc seems to like to generate code that relies on dst == src */ #define __fh_overlap(a, len_a, b, 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))) \ + ((const char*)(a) < (const char*)(b) && (const char*)(b) < ((const char*)(a) + (__fh_size_t)(len_a))) \ + || ((const char*)(b) < (const char*)(a) && (const char*)(a) < ((const char*)(b) + (__fh_size_t)(len_b))) \ ) /* -- cgit v1.3