Project

General

Profile

Actions

Bug #9375

closed

svr4pkg: this statement may fall through

Added by Toomas Soome over 4 years ago. Updated about 4 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

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

Actions

Also available in: Atom PDF