Project

General

Profile

Bug #9358

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

issue found by gcc 7 build:

    svccfg_xml.c:1620:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       for (p = pgs; *p; ++p) {
       ^~~
    svccfg_xml.c:1629:2: note: here
      default: /* smf state transition tokens */
      ^~~~~~~

    svcprop.c:388:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
        die(gettext("Invalid snapshot name.\n"));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    svcprop.c:391:3: note: here
       case SCF_ERROR_NOT_FOUND:
       ^~~~
    svcprop.c: In function 'do_wait':
    svcprop.c:817:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
          die(emsg_not_found);
          ^~~~~~~~~~~~~~~~~~~
    svcprop.c:821:5: note: here
         default:
         ^~~~~~~
    svcprop.c:847:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
         die(emsg_not_found);
         ^~~~~~~~~~~~~~~~~~~
    svcprop.c:851:4: note: here
        default:
        ^~~~~~~
    svcprop.c:868:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
          die(emsg_not_found);
          ^~~~~~~~~~~~~~~~~~~
    svcprop.c:872:5: note: here
         default:
         ^~~~~~~
    svcprop.c:896:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
         die(emsg_not_found);
         ^~~~~~~~~~~~~~~~~~~
    svcprop.c:898:4: note: here
        default:
        ^~~~~~~
    svcprop.c:917:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
          die(emsg_not_found);
          ^~~~~~~~~~~~~~~~~~~
    svcprop.c:921:5: note: here
         default:
         ^~~~~~~

    svcs.c:1885:27: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define argserr(progname) print_usage(progname, stderr, B_TRUE)
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    svcs.c:3500:5: note: in expansion of macro 'argserr'
         argserr(progname);
         ^~~~~~~
    svcs.c:3504:3: note: here
       case 'd':
       ^~~~
    svcs.c:1885:27: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define argserr(progname) print_usage(progname, stderr, B_TRUE)
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    svcs.c:3611:4: note: in expansion of macro 'argserr'
        argserr(progname);
        ^~~~~~~
    svcs.c:3614:3: 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 a5f0d1fc79d4435b41cb64c37207978b97d8146b

commit  a5f0d1fc79d4435b41cb64c37207978b97d8146b
Author: Toomas Soome <tsoome@me.com>
Date:   2018-05-16T10:02:40.000Z

    9358 svc: this statement may fall through
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Jason King <jason.king@joyent.com>
    Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>

Also available in: Atom PDF