diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-04-17 14:29:57 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-04-17 15:26:38 +0000 |
commit | 860bf13dbd2e9ad0a87b75defcab2cc3c9c771f3 (patch) | |
tree | 8809dd0e6a240ca419a227abfb8248727dafb952 /src/3rdparty | |
parent | dea94de304e92f162ed0f1d4a30f03717a19b198 (diff) |
Fix compilation errors and warnings on INTEGRITY in md4c 3rdparty
Change-Id: Ic27801f790b533f0a16099501fbe8a3ffe941d02
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/md4c/md4c.c | 14 |
1 files changed, 11 insertions, 3 deletions
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 <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -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; } |