Skip to content

Commit bcdba88

Browse files
authored
Update autolink.c
``` ../../../../ext/markly/autolink.c: In function ‘postprocess_text’: ../../../../ext/markly/autolink.c:364:31: warning: passing argument 1 of ‘validate_protocol’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 364 | if (validate_protocol("mailto:", data + start + offset + max_rewind, rewind, max_rewind)) { | ^~~~~~~~~ ../../../../ext/markly/commonmark.c: In function ‘S_render_node’: ../../../../ext/markly/autolink.c:299:36: note: expected ‘char *’ but argument is of type ‘const char *’ 299 | static bool validate_protocol(char protocol[], uint8_t *data, size_t rewind, size_t max_rewind) { | ~~~~~^~~~~~~~~~ ```
1 parent 1e23082 commit bcdba88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/autolink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ static cmark_node *match(cmark_syntax_extension *ext, cmark_parser *parser,
296296
// inline was finished in inlines.c.
297297
}
298298

299-
static bool validate_protocol(char protocol[], uint8_t *data, size_t rewind, size_t max_rewind) {
299+
static bool validate_protocol(const char protocol[], uint8_t *data, size_t rewind, size_t max_rewind) {
300300
size_t len = strlen(protocol);
301301

302302
if (len > (max_rewind - rewind)) {

0 commit comments

Comments
 (0)