8320 regcmp: misleading-indentation

Review Request #556 — Created June 4, 2017 and submitted

tsoome
illumos-gate
8320
e522a88...
general
regcmp.c: In function 'main':
regcmp.c:112:4: error: this 'while' clause does not guard... [-Werror=misleading-indentation]
    while (((*name++ = c = getc(iobuf)) != ' ') &&
    ^~~~~
regcmp.c:114:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'while'
     *--name = '\0';
     ^
cc1: all warnings being treated as errors


tsoome
igork
  1. Ship It!
  2. 
      
rm
  1. Hmm, I guess cstyle complains about the trailing semicolon on the while loop, that's what changed it right?
    1. Yes, it wants the statement on separate line. Of course the idea is to make it more visible to avoid mistakenly placed semicolons, but in this code they (ab)use this logic a lot...

  2. 
      
gwr
  1. If not for the cstyle changes, this would be a white-space only change, right?

    1. Yes, no functional changes here.

  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...