diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2014-11-15 19:38:09 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2014-11-16 21:15:08 +0100 |
commit | fe80f7b35fc168e0d1bb142a52073c6f0e1e9ef8 (patch) | |
tree | 3973294c8465adab8f74d9f004a4dbae638f6b97 /src/chunk.h | |
parent | 6403a37913828f69de52ebabf33499ced848641d (diff) |
Cast void pointers explicitly
Needed for C++ compatibility.
Diffstat (limited to 'src/chunk.h')
-rw-r--r-- | src/chunk.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/chunk.h b/src/chunk.h index d0ffb92..9dd56b6 100644 --- a/src/chunk.h +++ b/src/chunk.h @@ -51,7 +51,7 @@ static inline void cmark_chunk_trim(cmark_chunk *c) static inline int cmark_chunk_strchr(cmark_chunk *ch, int c, int offset) { - const unsigned char *p = memchr(ch->data + offset, c, ch->len - offset); + const unsigned char *p = (unsigned char *)memchr(ch->data + offset, c, ch->len - offset); return p ? (int)(p - ch->data) : ch->len; } @@ -59,7 +59,7 @@ static inline unsigned char *cmark_chunk_to_cstr(cmark_chunk *c) { unsigned char *str; - str = calloc(c->len + 1, sizeof(*str)); + str = (unsigned char *)calloc(c->len + 1, sizeof(*str)); if(str != NULL) { memcpy(str, c->data, c->len); str[c->len] = 0; |