From f5b32e24741f54ee7b064b05fea2c766aaa1123f Mon Sep 17 00:00:00 2001 From: Ali Volkan ATLI Date: Sat, 14 May 2016 23:11:33 +0300 Subject: Update sds.h Fixing sds.h for building hiredis in cpp project --- sds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sds.h') diff --git a/sds.h b/sds.h index 394f8b5..13be75a 100644 --- a/sds.h +++ b/sds.h @@ -79,7 +79,7 @@ struct __attribute__ ((__packed__)) sdshdr64 { #define SDS_TYPE_64 4 #define SDS_TYPE_MASK 7 #define SDS_TYPE_BITS 3 -#define SDS_HDR_VAR(T,s) struct sdshdr##T *sh = (void*)((s)-(sizeof(struct sdshdr##T))); +#define SDS_HDR_VAR(T,s) struct sdshdr##T *sh = (struct sdshdr##T *)((s)-(sizeof(struct sdshdr##T))); #define SDS_HDR(T,s) ((struct sdshdr##T *)((s)-(sizeof(struct sdshdr##T)))) #define SDS_TYPE_5_LEN(f) ((f)>>SDS_TYPE_BITS) -- cgit v1.2.3