8184 cpio: misleading-indentation

Review Request #479 — Created May 9, 2017 and submitted

tsoome
illumos-gate
8184
fe9b197...
general
cpio.c: In function 'sigint':
cpio.c:6811:10: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
   } else if (unlink(nam_p))
          ^~
cpio.c:6814:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
    *Over_p = '\0';
    ^
cpio.c: In function 'remove_dir':
cpio.c:8158:3: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
   if (strcmp(direct->d_name, ".") == 0 ||
   ^~
cpio.c:8162:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
    if (lstat(direct->d_name, &sbuf) == -1) {
    ^~
cc1: all warnings being treated as errors


alarcher
  1. Ship It!
  2. 
      
igork
  1. Ship It!
  2. 
      
rm
  1. I think that zeroing out the Over_p path makes some amount of sense here in both cases. I'm not sure that the behavior will end up making a ton of sense in the case of nested SIGINTs, but maybe that's fine.

  2. 
      
tsoome
tsoome
Review request changed

Status: Closed (submitted)

Loading...