Re: [hackers] [sbase][PATCH] paste: fix warning on indentation in parallel()

From: Laslo Hunhold <dev_AT_frign.de>
Date: Tue, 27 Dec 2016 15:03:33 +0100

On Mon, 26 Dec 2016 16:22:36 -0800
Robert Karl <robertkarljr_AT_gmail.com> wrote:

Hey Robert,

> _Bug_
> Got the following error after cloning and running make:
>
> paste.c: In function ‘parallel’:
> paste.c:70:4: warning: this ‘else’ clause does not guard...
> [-Wmisleading-indentation] else
> ^~~~
> paste.c:72:5: note: ...this statement, but the latter is misleadingly
> indented as if it is guarded by the ‘else’ last++;
> ^~~~
> This patch preserves the same functionality and just adjusts
> indentation to squelch the warning.
>
> _Test plan_
> Used the following 'script' to convince myself output looked correct
> for inputs where the latter arguments to paste had fewer lines.
>
> make && printf "1\n2\n" > two.txt && printf "" > zero.txt
> && ./paste -d, two.txt zero.txt

good catch! I applied your patch. This probably was an artefact from
the rewrite last year.
Thanks for your contribution and well-formed patch-description.

Cheers

Laslo

-- 
Laslo Hunhold <dev_AT_frign.de>
Received on Tue Dec 27 2016 - 15:03:33 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 27 2016 - 15:16:10 CET