Project

General

Profile

Bug #9389

isnsd: 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-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

issue found by gcc 7 build:

    xml/data.c: In function 'convert_attr2xml':
    xml/data.c:411:10: error: this statement may fall through [-Werror=implicit-fallthrough=]
         node = child;
         ~~~~~^~~~~~~
    xml/data.c:414:3: note: here
       case 3: /* set content */
       ^~~~

    dseng.c:97:13: error: this statement may fall through [-Werror=implicit-fallthrough=]
        scn_name = &obj->attrs[ATTR_INDEX_ISCSI(
        ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            ISNS_ISCSI_NAME_ATTR_ID)];
            ~~~~~~~~~~~~~~~~~~~~~~~~~
    dseng.c:99:3: note: here
       case OBJ_PORTAL:
       ^~~~

    scn.c:2123:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
        if (scn_dispatched != 0) {
           ^
    scn.c:2126:3: note: here
       case SCN_IGNORE:
       ^~~~

    obj.c:1316:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
       if (tmp->len == 0 && attr->len == 0) {
          ^
    obj.c:1328:2: note: here
      case ISNS_PORTAL_NAME_ATTR_ID:
      ^~~~
    obj.c:1373:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
       if (attr->value.ui != 0) {
          ^
    obj.c:1376:2: note: here
      case ISNS_ENTITY_PROTOCOL_ATTR_ID:
      ^~~~
    obj.c: In function 'extract_attr':
    obj.c:1487:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
       min_len = 0;
       ~~~~~~~~^~~
    obj.c:1488:2: note: here
      case ISNS_PORTAL_NAME_ATTR_ID:
      ^~~~
    obj.c:1492:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
       max_len = 256;
       ~~~~~~~~^~~~~
    obj.c:1493:2: note: here
      case ISNS_ISCSI_NAME_ATTR_ID:
      ^~~~
    obj.c:1536:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
       if (tlv->attr_len != 4) {
          ^
    obj.c:1540:2: note: here
      case ISNS_PG_TAG_ATTR_ID:
      ^~~~
    obj.c:1563:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
       if (flag == 0) {
          ^
    obj.c:1574:2: note: here
      case ISNS_ENTITY_INDEX_ATTR_ID:
      ^~~~
    obj.c: In function 'reg_get_obj':
    obj.c:2370:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
         pg_tag = ntohl(*(uint32_t *)
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
             &(*op)->attr_value[0]);
             ~~~~~~~~~~~~~~~~~~~~~~
    obj.c:2372:4: note: here
        case 0:
        ^~~~

    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 a2b0e4f14941199d75d55b650b6541d56807963e

commit  a2b0e4f14941199d75d55b650b6541d56807963e
Author: Toomas Soome <tsoome@me.com>
Date:   2018-07-09T16:33:58.000Z

    9389 isnsd: this statement may fall through
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>

Also available in: Atom PDF