From 8f2bcb5ca5f5c3c6751948208d0284cedef931ef Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 3 Jun 2019 19:58:02 +0000 Subject: Initialize the local variable "lastln" in mparse_buf_r(). While there is no bug, it logically makes sense given the meaning of the variable that lastln is NULL as long as firstln is NULL. Michal Nowak reported that gcc 4.4.4 and 7.4.0 on illumos throw -Wuninitialized false positives. --- read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/read.c b/read.c index 76c4308e..4de97901 100644 --- a/read.c +++ b/read.c @@ -157,7 +157,7 @@ mparse_buf_r(struct mparse *curp, struct buf blk, size_t i, int start) ln.sz = 256; ln.buf = mandoc_malloc(ln.sz); ln.next = NULL; - firstln = loop = NULL; + firstln = lastln = loop = NULL; lnn = curp->line; pos = 0; inloop = 0; -- cgit