From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id e7930728 for ; Mon, 3 Jun 2019 14:58:33 -0500 (EST) Date: Mon, 3 Jun 2019 14:58:33 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: Initialize the local variable "lastln" in mparse_buf_r(). X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: Log Message: ----------- 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. Modified Files: -------------- mandoc: read.c Revision Data ------------- Index: read.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/read.c,v retrieving revision 1.212 retrieving revision 1.213 diff -Lread.c -Lread.c -u -p -r1.212 -r1.213 --- read.c +++ read.c @@ -157,7 +157,7 @@ mparse_buf_r(struct mparse *curp, struct 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; -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv