Date: Sun, 27 Oct 2013 01:07:47 +0200 From: Jilles Tjoelker <jilles@stack.nl> To: dt71@gmx.com Cc: "freebsd-current@freebsd.org" <freebsd-current@freebsd.org> Subject: Re: [PATCH] contrib/groff Queisce -Wdangling else Message-ID: <20131026230746.GA1223@stack.nl> In-Reply-To: <526C2E5D.2080008@gmx.com> References: <1382799852.32760.2.camel@localhost> <526C2E5D.2080008@gmx.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131026230746.GA1223>
