Project

General

Profile

Bug #8293

fs.d: misleading-indentation and longjump issues

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-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors from gcc6:

labelit.c: In function 'main':
labelit.c:145:3: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
   if (argc > 1)
   ^~
labelit.c:148:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
    usage();
    ^~~~~
cc1: all warnings being treated as errors
*** Error code 1
dmake: Fatal error: Command failed for target `labelit'
Current working directory /code/illumos-gate/usr/src/cmd/fs.d/hsfs/labelit

setup.c:211:3: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
   if (preen && !debug)
   ^~
setup.c:213:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
    (void) printf(gettext(" (NO WRITE)"));
    ^
cc1: all warnings being treated as errors
*** Error code 1
dmake: Fatal error: Command failed for target `setup.o'
Current working directory /code/illumos-gate/usr/src/cmd/fs.d/udfs/fsck
setup.c: In function 'find_superblock':
setup.c:618:4: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
    if (style < MAX_SB_STYLES)
    ^~
setup.c:620:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
     bflag = 0;
     ^~~~~
cc1: all warnings being treated as errors
*** Error code 1
dmake: Fatal error: Command failed for target `setup.o'
Current working directory /code/illumos-gate/usr/src/cmd/fs.d/ufs/fsck
fsdb.c: In function 'follow_path':
fsdb.c:2567:9: error: this 'else' clause does not guard... [-Werror=misleading-indentation]
         else
         ^~~~
fsdb.c:2569:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
      nfiles--;
      ^~~~~~
cc1: all warnings being treated as errors
*** Error code 1
dmake: Fatal error: Command failed for target `fsdb'
Current working directory /code/illumos-gate/usr/src/cmd/fs.d/ufs/fsdb
fssnap.c: In function 'main':
fssnap.c:109:8: error: variable 'mountpoint' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
  char *mountpoint = NULL;
        ^~~~~~~~~~
fssnap.c:110:6: error: variable 'mountfd' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
  int mountfd = -1;
      ^~~~~~~
fssnap.c:111:8: error: variable 'backpath' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
  char *backpath = NULL;
        ^~~~~~~~
fssnap.c:113:6: error: variable 'delete' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
  int delete = 0;
      ^~~~~~
fssnap.c:114:6: error: variable 'stats' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
  int stats = 0;
      ^~~~~
fssnap.c:115:13: error: variable 'maxsize' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
  u_offset_t maxsize = 0;
             ^~~~~~~
fssnap.c:116:9: error: variable 'chunksize' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
  uint_t chunksize = 0;
         ^~~~~~~~~
fssnap.c:117:6: error: variable 'rawfile' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
  int rawfile = 0;
      ^~~~~~~
fssnap.c:118:6: error: variable 'dounlink' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
  int dounlink = 0;
      ^~~~~~~~
cc1: all warnings being treated as errors
*** Error code 1
dmake: Fatal error: Command failed for target `fssnap.o'
Current working directory /code/illumos-gate/usr/src/cmd/fs.d/ufs/fssnap

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 ac34f4ddd0c6a12bfbb0823bf037f9afc5de4f4b

commit  ac34f4ddd0c6a12bfbb0823bf037f9afc5de4f4b
Author: Toomas Soome <tsoome@me.com>
Date:   2017-06-05T14:08:52.000Z

    8293 fs.d: misleading-indentation and longjump issues
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Also available in: Atom PDF