7876 libast: misleading-indentation errors

Review Request #364 — Created Feb. 15, 2017 and submitted

tsoome
illumos-gate
7876
0237891...
general

7876 libast: misleading-indentation errors

../common/misc/magic.c: In function 'cklang':
../common/misc/magic.c:1127:7: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if (s > mp->fbuf)
^~
../common/misc/magic.c:1148:8: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (!mp->idtab)
^~
cc1: all warnings being treated as errors



gwr
  1. Is there anything in these changes that would affect functionality?
    If not, I'd just turn off the error, as this is 3rd party code.

  2. 
      
marcel
  1. 
      
  2. usr/src/lib/libast/common/sfio/sfpool.c (Diff revision 1)
     
     

    Why do we need a change here, but not below?

    BTW, the bugreport does not contains a complain about this file. Why?

  3. 
      
yuripv
  1. Should we really "fix" libast which is part of ksh nightmare? If we (eventually, 20 years later) update the entire mess to a new version, these "fixes" won't be helpful.

    1. I think we should. Because hiding behind -Wno-xxx also does hide bugs, and we have plenty of those and thats not cool. About helpful - well, we do have version control, and rolling back the change before the update should not be the rocket science. "maybe we want to update" can not be excuse for having crappy code around.

  2. 
      
tsoome
tsoome
gwr
  1. Ship It!
  2. 
      
yuripv
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...