From 4d1fe42464eb3f394670c9ded39d73ae16fae6dd Mon Sep 17 00:00:00 2001 From: Victoria Mitchell Date: Tue, 15 Mar 2022 15:42:28 -0600 Subject: [PATCH] use const char * for string literals --- api_test/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api_test/main.c b/api_test/main.c index 1051c2904..2e497ce95 100644 --- a/api_test/main.c +++ b/api_test/main.c @@ -1192,7 +1192,7 @@ static void inline_only_opt(test_batch_runner *runner) { cmark_node_free(doc); } -static void check_markdown_plaintext(test_batch_runner *runner, char *markdown) { +static void check_markdown_plaintext(test_batch_runner *runner, const char *markdown) { cmark_node *doc = cmark_parse_document(markdown, strlen(markdown), CMARK_OPT_PRESERVE_WHITESPACE); cmark_node *pg = cmark_node_first_child(doc); INT_EQ(runner, cmark_node_get_type(pg), CMARK_NODE_PARAGRAPH, "markdown '%s' did not produce a paragraph node", markdown); @@ -1228,7 +1228,7 @@ static void preserve_whitespace_opt(test_batch_runner *runner) { check_markdown_plaintext(runner, "\nHello\n"); } -static void check_markdown_attributes_node(test_batch_runner *runner, char *markdown, cmark_node_type expectedType, char *expectedAttributes) { +static void check_markdown_attributes_node(test_batch_runner *runner, const char *markdown, cmark_node_type expectedType, const char *expectedAttributes) { cmark_node *doc = cmark_parse_document(markdown, strlen(markdown), CMARK_OPT_DEFAULT); cmark_node *pg = cmark_node_first_child(doc); INT_EQ(runner, cmark_node_get_type(pg), CMARK_NODE_PARAGRAPH, "markdown '%s' did not produce a paragraph node", markdown);