summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-06-01 14:03:11 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-06-01 14:03:11 -0700
commit41f1e5aaea98011ce650a59a765549fff5f4468a (patch)
treeb3f6050ae7cf5fe75d29ebf86da57991ecc4bb63 /src
parentf1665c73196581a26f9aea3028565253a7b5dbac (diff)
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 && ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'src')
-rw-r--r--src/latex.c4
1 files changed, 2 insertions, 2 deletions
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;
}