summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2016-06-06 11:50:13 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2016-06-06 15:39:06 -0700
commitd4cb8e767ce224d31501c19fb11a220824df9bf8 (patch)
tree8eb23c4bfd277c41bcc9de0360a3e38439a52d18 /src/buffer.c
parentf4264ac96e88ec32cd0d63641207bddcfd6f8ce1 (diff)
msvc: Fix warnings and errors
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c
index e191056..b3e9811 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -50,7 +50,8 @@ void cmark_strbuf_grow(cmark_strbuf *buf, bufsize_t target_size) {
new_size += 1;
new_size = (new_size + 7) & ~7;
- buf->ptr = buf->mem->realloc(buf->asize ? buf->ptr : NULL, new_size);
+ buf->ptr = (unsigned char *)buf->mem->realloc(
+ buf->asize ? buf->ptr : NULL, new_size);
buf->asize = new_size;
}
@@ -146,7 +147,7 @@ unsigned char *cmark_strbuf_detach(cmark_strbuf *buf) {
if (buf->asize == 0) {
/* return an empty string */
- return buf->mem->calloc(1, 1);
+ return (unsigned char *)buf->mem->calloc(1, 1);
}
cmark_strbuf_init(buf->mem, buf, 0);