8198 acct: misleading-indentation

Review Request #493 — Created May 10, 2017 and submitted

tsoome
illumos-gate
8198
339464f...
general
devtolin.c: In function 'devtolin':
devtolin.c:106:4: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
  } else
    ^~~~
devtolin.c:115:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
   return("?");
   ^~~~~~
cc1: all warnings being treated as errors


tsoome
marcel
  1. 
      
  2. usr/src/cmd/acct/lib/devtolin.c (Diff revision 2)
     
     

    Parens are not needed here.

  3. usr/src/cmd/acct/lib/devtolin.c (Diff revision 2)
     
     

    Since you moved (okay, it was never there, but still) the return ("?"); line out of the else arm, then this line could be removed to save one level of indentation for the following if.

  4. usr/src/cmd/acct/lib/devtolin.c (Diff revision 2)
     
     

    The typecast is not needed here.

  5. 
      
marcel
  1. Ship It!
  2. 
      
rm
  1. Thanks for the clean up here. The else if bracketing was terrible.

  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...