From 860bf13dbd2e9ad0a87b75defcab2cc3c9c771f3 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 17 Apr 2019 14:29:57 +0200 Subject: Fix compilation errors and warnings on INTEGRITY in md4c 3rdparty Change-Id: Ic27801f790b533f0a16099501fbe8a3ffe941d02 Reviewed-by: Shawn Rutledge --- src/3rdparty/md4c/md4c.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/3rdparty/md4c') diff --git a/src/3rdparty/md4c/md4c.c b/src/3rdparty/md4c/md4c.c index 4c0ad5c0fc..13c7bd3433 100644 --- a/src/3rdparty/md4c/md4c.c +++ b/src/3rdparty/md4c/md4c.c @@ -25,6 +25,7 @@ #include "md4c.h" +#include #include #include #include @@ -3375,7 +3376,7 @@ md_resolve_links(MD_CTX* ctx, const MD_LINE* lines, int n_lines) } else { if(closer->end < ctx->size && CH(closer->end) == _T('(')) { /* Might be inline link. */ - OFF inline_link_end = -1; + OFF inline_link_end = UINT_MAX; is_link = md_is_inline_link_spec(ctx, lines, n_lines, closer->end, &inline_link_end, &attr); if(is_link < 0) @@ -4152,11 +4153,14 @@ static int md_process_table_row(MD_CTX* ctx, MD_BLOCKTYPE cell_type, OFF beg, OFF end, const MD_ALIGN* align, int col_count) { - MD_LINE line = { beg, end }; + MD_LINE line; OFF* pipe_offs = NULL; int i, j, n; int ret = 0; + line.beg = beg; + line.end = end; + /* Break the line into table cells by identifying pipe characters who * form the cell boundary. */ MD_CHECK(md_analyze_inlines(ctx, &line, 1, TRUE)); @@ -4243,10 +4247,13 @@ abort: static int md_is_table_row(MD_CTX* ctx, OFF beg, OFF* p_end) { - MD_LINE line = { beg, beg }; + MD_LINE line; int i; int ret = FALSE; + line.beg = beg; + line.end = beg; + /* Find end of line. */ while(line.end < ctx->size && !ISNEWLINE(line.end)) line.end++; @@ -5186,6 +5193,7 @@ md_is_html_block_end_condition(MD_CTX* ctx, OFF beg, OFF* p_end) default: MD_UNREACHABLE(); } + return FALSE; } -- cgit v1.2.3