summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-12-10 13:37:05 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-12-10 13:37:05 -0800
commit5af77f3c1d7f34f252a897094936ac4d162adf4b (patch)
tree1a547a15be670468584f4bbe8f2ff088d0d8d7de /src
parent6873b63029c6bf88a909dd85184d0aef34391cf5 (diff)
parentdf5236d73fd9aa5c890b36fff5d5a2796253bd45 (diff)
Merge pull request #95 from kainjow/master
Fix warnings about dropping const qualifier
Diffstat (limited to 'src')
-rw-r--r--src/commonmark.c4
-rwxr-xr-xsrc/houdini_html_u.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/commonmark.c b/src/commonmark.c
index 5c08589..cbf99c1 100644
--- a/src/commonmark.c
+++ b/src/commonmark.c
@@ -368,9 +368,9 @@ static int S_render_node(cmark_renderer *renderer, cmark_node *node,
if (entering) {
LIT("<");
if (strncmp(cmark_node_get_url(node), "mailto:", 7) == 0) {
- LIT((char *)cmark_node_get_url(node) + 7);
+ LIT((const char *)cmark_node_get_url(node) + 7);
} else {
- LIT((char *)cmark_node_get_url(node));
+ LIT((const char *)cmark_node_get_url(node));
}
LIT(">");
// return signal to skip contents of node...
diff --git a/src/houdini_html_u.c b/src/houdini_html_u.c
index a2d927b..2f92544 100755
--- a/src/houdini_html_u.c
+++ b/src/houdini_html_u.c
@@ -9,12 +9,12 @@
/* Binary tree lookup code for entities added by JGM */
-static unsigned char *S_lookup(int i, int low, int hi, const unsigned char *s,
+static const unsigned char *S_lookup(int i, int low, int hi, const unsigned char *s,
int len) {
int j;
- int cmp = strncmp((char *)s, (char *)cmark_entities[i].entity, len);
+ int cmp = strncmp((const char *)s, (const char *)cmark_entities[i].entity, len);
if (cmp == 0 && cmark_entities[i].entity[len] == 0) {
- return (unsigned char *)cmark_entities[i].bytes;
+ return (const unsigned char *)cmark_entities[i].bytes;
} else if (cmp < 0 && i > low) {
j = i - ((i - low) / 2);
if (j == i)
@@ -30,7 +30,7 @@ static unsigned char *S_lookup(int i, int low, int hi, const unsigned char *s,
}
}
-static unsigned char *S_lookup_entity(const unsigned char *s, int len) {
+static const unsigned char *S_lookup_entity(const unsigned char *s, int len) {
return S_lookup(CMARK_NUM_ENTITIES / 2, 0, CMARK_NUM_ENTITIES - 1, s, len);
}