Project

General

Profile

Actions

Bug #9396

closed

devfsadm: this statement may fall through

Added by Toomas Soome over 5 years ago. Updated over 5 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

issue found by gcc 7 build:

    ../devfsadm.c:6310:14: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
      if (*p_link == '\0') {
                  ^~
    ../devfsadm.c:6310:6: note: did you mean to dereference the pointer?
      if (*p_link == '\0') {
          ^
    ../devfsadm.c: In function 'create_link_common':
    ../devfsadm.c:2802:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
          s_unlink(devlink);
          ^~~~~~~~~~~~~~~~~
    ../devfsadm.c:2803:5: note: here
         default:
         ^~~~~~~

    ../devalloc.c:144:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
       if (execl(MKDEVALLOC, MKDEVALLOC, DA_IS_LABELED, NULL) == -1)
          ^
    ../devalloc.c:146:2: note: here
      default:
      ^~~~~~~

    cc1: all warnings being treated as errors

Actions

Also available in: Atom PDF