From owner-freebsd-current@FreeBSD.ORG Sat Oct 26 23:07:50 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 69A9C917; Sat, 26 Oct 2013 23:07:50 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2DE5928BC; Sat, 26 Oct 2013 23:07:50 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 751D9359308; Sun, 27 Oct 2013 01:07:47 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 48C75CB4E; Sun, 27 Oct 2013 01:07:47 +0200 (CEST) Date: Sun, 27 Oct 2013 01:07:47 +0200 From: Jilles Tjoelker To: dt71@gmx.com Subject: Re: [PATCH] contrib/groff Queisce -Wdangling else Message-ID: <20131026230746.GA1223@stack.nl> References: <1382799852.32760.2.camel@localhost> <526C2E5D.2080008@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <526C2E5D.2080008@gmx.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "freebsd-current@freebsd.org" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Oct 2013 23:07:50 -0000 On Sat, Oct 26, 2013 at 11:04:29PM +0200, dt71@gmx.com wrote: > Sean Bruno wrote, On 10/26/2013 17:04: > Index: contrib/groff/src/roff/troff/node.cpp > =================================================================== > --- contrib/groff/src/roff/troff/node.cpp (revision 257159) > +++ contrib/groff/src/roff/troff/node.cpp (working copy) > @@ -4600,17 +4600,18 @@ > } > else { > hunits rem = x - w*i; > - if (rem > H0) > + if (rem > H0) { > if (n->overlaps_horizontally()) { > if (out->is_on()) > n->tprint(out); > out->right(rem - w); > + } else { > + out->right(rem); > } > - else > - out->right(rem); > while (--i >= 0) > if (out->is_on()) > n->tprint(out); > + } > } > } > >There is no(intended) functional change. This part indeed looks wrong. The while loop was not under the if (rem > H0) but now is. The closing brace should be added before instead of after the while loop. Also, putting braces around out->right(rem); is not needed. I recommend making sure the object files do not change due to patches like these. -- Jilles Tjoelker