Project

General

Profile

Bug #8184

cpio: misleading-indentation

Added by Toomas Soome over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2017-05-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

Building with gcc 6:

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

History

#1

Updated by Electric Monk over 2 years ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit 351716f7f1118c3aed55e44e8a210bd42db87403

commit  351716f7f1118c3aed55e44e8a210bd42db87403
Author: Toomas Soome <tsoome@me.com>
Date:   2017-05-10T14:33:31.000Z

    8184 cpio: misleading-indentation
    Reviewed by: Aurélien Larcher <aurelien.larcher@gmail.com>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF