From 41f1e5aaea98011ce650a59a765549fff5f4468a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 1 Jun 2016 14:03:11 -0700 Subject: Coerce realurllen to int. This is an alternate solution for pull request #132, which introduced a new warning on the comparison: latex.c:191:20: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'bufsize_t' (aka 'int') [-Wsign-compare] if (realurllen == link_text->as.literal.len && ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ --- src/latex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/latex.c b/src/latex.c index 8a66678..db33822 100644 --- a/src/latex.c +++ b/src/latex.c @@ -155,7 +155,7 @@ static link_type get_link_type(cmark_node *node) { size_t title_len, url_len; cmark_node *link_text; char *realurl; - size_t realurllen; + int realurllen; bool isemail = false; if (node->type != CMARK_NODE_LINK) { @@ -169,7 +169,7 @@ static link_type get_link_type(cmark_node *node) { return INTERNAL_LINK; } - url_len = safe_strlen(url); + url_len = (int)safe_strlen(url); if (url_len == 0 || scan_scheme(&url_chunk, 0) == 0) { return NO_LINK; } -- cgit v1.2.3