Commit 30945d80f89bb36c15d96c5cba6bdf0b0783fc1c

Martin Mitáš 2024-02-01T22:16:22

md_is_link_label: Fix warning about potentially uninitialized variable... ... when build with gcc 13.2.0 in release build.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/md4c.c b/src/md4c.c
index cb44e3d..3038863 100644
--- a/src/md4c.c
+++ b/src/md4c.c
@@ -1936,6 +1936,8 @@ md_is_link_label(MD_CTX* ctx, const MD_LINE* lines, MD_SIZE n_lines, OFF beg,
     MD_SIZE line_index = 0;
     int len = 0;
 
+    *p_beg_line_index = 0;
+
     if(CH(off) != _T('['))
         return FALSE;
     off++;