From 1829598c6e4e29da89d73624e461aaffd983fde3 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 23 Jun 2019 17:04:58 -0700 Subject: Do not cast away constness Fix most compiler warnings caused by building Perl extensions with -Wcast-qual. This is realized by changing the type of multiple T * arguments into const T * and by changing a few (T *) casts into (const T *). --- hv_macro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hv_macro.h') diff --git a/hv_macro.h b/hv_macro.h index 3f75cdb860..c052653c35 100644 --- a/hv_macro.h +++ b/hv_macro.h @@ -30,7 +30,7 @@ */ #ifndef U8TO16_LE - #define _shifted_octet(type,ptr,idx,shift) (((type)(((U8*)(ptr))[(idx)]))<<(shift)) + #define _shifted_octet(type,ptr,idx,shift) (((type)(((const U8*)(ptr))[(idx)]))<<(shift)) #if defined(USE_UNALIGNED_PTR_DEREF) && (BYTEORDER == 0x1234 || BYTEORDER == 0x12345678) #define U8TO16_LE(ptr) (*((const U16*)(ptr))) #define U8TO32_LE(ptr) (*((const U32*)(ptr))) -- cgit v1.2.1