commit 60da4fb049eb1168331d0754e34519af3627a2e8
Author:     Robert Karl <robertkar...@gmail.com>
AuthorDate: Mon Dec 26 16:22:36 2016 -0800
Commit:     Laslo Hunhold <d...@frign.de>
CommitDate: Tue Dec 27 15:02:15 2016 +0100

    paste: fix warning on indentation in parallel()
    
    _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

diff --git a/paste.c b/paste.c
index 77fc090..1d4e9f6 100644
--- a/paste.c
+++ b/paste.c
@@ -69,7 +69,7 @@ nextline:
                                putchar('\n');
                        else
                                efputrune(&d, stdout, "<stdout>");
-                               last++;
+                       last++;
                }
        }
        if (last != -1)

Reply via email to