Project

General

Profile

Bug #9309

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

issue found by gcc 7 build:

    ../../../common/mdb/mdb_io.c:906:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
       n = (ushort_t)VA_ARG(ap, uint_t);
         ^
    ../../../common/mdb/mdb_io.c:908:2: note: here
      default:
      ^~~~~~~

    ../../../common/mdb/mdb_main.c:232:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
         terminate(1);
         ^~~~~~~~~~~~
    ../../../common/mdb/mdb_main.c:235:4: note: here
        case 'r':
        ^~~~

    ../../../common/modules/idm/idm.c:2671:4: error: this statement may fall through [-Werror=implicit-fallthrough=]
        mdb_printf("%s|%s (%d)\n\t%9s %s (%d)\n",
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            ts_string, state_name, sar->sar_state,
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            "New State", new_state_name, sar->sar_new_state);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../../common/modules/idm/idm.c:2674:3: note: here
       default:
       ^~~~~~~

    ../../kmdb/kmdb_dpi_isadep.c:53:9: error: this statement may fall through [-Werr
    or=implicit-fallthrough=]
       errno = EACCES;
    ../../kmdb/kmdb_dpi_isadep.c:54: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 b1da084b97cda9a2d087205b95c45a54ad654453

commit  b1da084b97cda9a2d087205b95c45a54ad654453
Author: Toomas Soome <tsoome@me.com>
Date:   2018-05-15T15:12:44.000Z

    9309 mdb: this statement may fall through
    Reviewed by: C Fraire <cfraire@me.com>
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF