Project

General

Profile

Bug #9375

svr4pkg: this statement may fall through

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Issues found by gcc 7 build:

    pkginstall: this statement may fall through

    main.c:897:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       usage();
       ^~~~~~~
    main.c:899:2: note: here
      case 1: /* missing package instance */
      ^~~~
    main.c:901:3: error: this statement may fall through [-Werror=implicit-fallthrough=]
       usage();
       ^~~~~~~
    main.c:903:2: note: here
      case 2: /* just right! */
      ^~~~
    cc1: all warnings being treated as errors

    pkgremove: this statement may fall through

    main.c:1311:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
       if (msg)
          ^
    main.c:1313:6: note: here
          case 10:
          ^~~~
    cc1: all warnings being treated as errors

    pkgadm: this statement may fall through

    lock.c: In function 'admin_lock':
    lock.c:398:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
        log_msg(LOG_MSG_ERR, MSG_MISSING_OPERAND, optopt);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    lock.c:400:3: note: here
       case '?':
       ^~~~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk about 1 year ago

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

git commit 26ec61e22ac23931eb9f303692a1df3c4da0626c

commit  26ec61e22ac23931eb9f303692a1df3c4da0626c
Author: Toomas Soome <tsoome@me.com>
Date:   2018-06-11T14:16:16.000Z

    9375 svr4pkg: this statement may fall through
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: C Fraire <cfraire@me.com>
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Ken Mays <kmays2000@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF