Project

General

Profile

Bug #9313

cmd/fs.d: this statement may fall through

Added by Toomas Soome over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2018-03-19
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Issues found by gcc 7 build:

    hsfs/labelit: this statement may fall through

    labelit.c: In function 'updatelabel':
    labelit.c:53:39: error: this statement may fall through [-Werror=implicit-fa
llthrough=]
     #define PUTSECTOR(buf, secno, nosec) (putdisk(buf, (secno)*ISO_SECTOR_SIZE,
 \
                                          ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~
      (nosec)*ISO_SECTOR_SIZE))
      ~~~~~~~~~~~~~~~~~~~~~~~~~
    labelit.c:332:3: note: in expansion of macro 'PUTSECTOR'
       PUTSECTOR(unix_buf, unix_pvd_sec_no, 1);
       ^~~~~~~~~
    labelit.c:337:2: note: here
      case 1:
      ^~~~
    cc1: all warnings being treated as errors

    udfs/fsck: this statement may fall through

    pass1.c:170:4: error: this statement may fall through [-Werror=implicit-fall
through=]
        ckinode(fp);
        ^~~~~~~~~~~
    pass1.c:171:3: note: here
       default:
       ^~~~~~~
    cc1: all warnings being treated as errors

    ufs/mkfs: this statement may fall through

    mkfs.c:925:3: error: this statement may fall through [-Werror=implicit-fallt
hrough=]
       usage();
       ^~~~~~~
    mkfs.c:927:2: note: here
      case 15:
      ^~~~
    cc1: all warnings being treated as errors

    ufs/fsdb: this statement may fall through

    fsdb.c:414:7: error: this statement may fall through [-Werror=implicit-fallt
hrough=]
        if (isnumber(optarg)) {
           ^
    fsdb.c:426:3: note: here
       case 'o':
       ^~~~
    cc1: all warnings being treated as errors

    newfs: this statement may fall through

    newfs.c:865:5: error: this statement may fall through [-Werror=implicit-fall
through=]
         fatal(gettext(
         ^~~~~~~~~~~~~~
             "%s: I/O error accessing VTOC"), name);
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    newfs.c:868:4: note: here
        case VT_EINVAL:
        ^~~~
    newfs.c:869:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
         fatal(gettext(
         ^~~~~~~~~~~~~~
             "%s: Invalid field in VTOC"), name);
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    newfs.c:872:4: note: here
        default:
        ^~~~~~~
    cc1: all warnings being treated as errors

    autofs: this statement may fall through

    autod_nfs.c:4293:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
       ping_server = 1;
       ~~~~~~~~~~~~^~~
    autod_nfs.c:4294:2: note: here
      case SERVER_ADDR:
      ^~~~
    cc1: all warnings being treated as errors

    smbutil: this statement may fall through

    smbutil.c:156:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
        help();
        ^~~~~~
    smbutil.c:158:3: note: here
       case 'v':
       ^~~~
    cc1: all warnings being treated as errors

    ff: this statement may fall through

    ff.c:355:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       exit(1);
       ^~~~~~~
    ff.c:356:2: note: here
      case -1:
      ^~~~
    ff.c:358:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       exit(2);
       ^~~~~~~
    ff.c:359:2: note: here
      default:
      ^~~~~~~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk over 1 year ago

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

git commit f45bbb216955f393ea71539b44815a06ed8fc19e

commit  f45bbb216955f393ea71539b44815a06ed8fc19e
Author: Toomas Soome <tsoome@me.com>
Date:   2018-03-25T18:16:19.000Z

    9313 cmd/fs.d: this statement may fall through
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: C Fraire <cfraire@me.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom PDF