vmg/redcarpet — pull request #355 by robin850 (2014-03-08 17:51:13+00:00)
Title: Remove a compiler warning

Hello,

In 7b48ac95, the `bufcstr` prototype has been changed. This lead to a warning since bufgrow is meant to change the allocated size to the given buffer but the latter is a const. Here's the warning:

~~~
compiling ../../../../ext/redcarpet/buffer.c
../../../../ext/redcarpet/buffer.c: In function ‘bufcstr’:
../../../../ext/redcarpet/buffer.c:104:2: warning: passing argument 1 of ‘bufgrow’ discards ‘const’ qualifier from pointer target type [enabled by default]
if (buf->size + 1 <= buf->asize || bufgrow(buf, buf->size + 1) == 0) {
^
../../../../ext/redcarpet/buffer.c:53:1: note: expected ‘struct buf *’ but argument is of type ‘const struct buf *’
bufgrow(struct buf *buf, size_t neosz)
^
~~~

@mattr- : Could you check if you still get a warning with this patch please ? :-)

Have a nice day.