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/blocks.c | |
parent | 6403a37913828f69de52ebabf33499ced848641d (diff) |
Cast void pointers explicitly
Needed for C++ compatibility.
Diffstat (limited to 'src/blocks.c')
-rw-r--r-- | src/blocks.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/blocks.c b/src/blocks.c index dd6278b..f0560ad 100644 --- a/src/blocks.c +++ b/src/blocks.c @@ -20,7 +20,7 @@ static node_block* make_block(int tag, int start_line, int start_column) { node_block* e; - e = calloc(1, sizeof(*e)); + e = (node_block *)calloc(1, sizeof(*e)); if(e != NULL) { e->tag = tag; e->open = true; @@ -344,7 +344,7 @@ static int parse_list_marker(chunk *input, int pos, struct ListData ** dataptr) if (!isspace(peek_at(input, pos))) { return 0; } - data = calloc(1, sizeof(*data)); + data = (struct ListData *)calloc(1, sizeof(*data)); if(data == NULL) { return 0; } else { @@ -369,7 +369,7 @@ static int parse_list_marker(chunk *input, int pos, struct ListData ** dataptr) if (!isspace(peek_at(input, pos))) { return 0; } - data = calloc(1, sizeof(*data)); + data = (struct ListData *)calloc(1, sizeof(*data)); if(data == NULL) { return 0; } else { @@ -440,7 +440,7 @@ extern node_block *cmark_parse_document(const unsigned char *buffer, size_t len) node_block *document; while (buffer < end) { - const unsigned char *eol = memchr(buffer, '\n', end - buffer); + const unsigned char *eol = (unsigned char *)memchr(buffer, '\n', end - buffer); offset = eol ? (eol - buffer) + 1 : eol - buffer; cmark_process_line(parser, buffer, offset); buffer += offset; |