Project

General

Profile

Bug #9396

devfsadm: 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:

    ../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

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 902eb9290a2193855c11e0290bad20b8e5ff7c03

commit  902eb9290a2193855c11e0290bad20b8e5ff7c03
Author: Toomas Soome <tsoome@me.com>
Date:   2018-04-23T16:15:39.000Z

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

Also available in: Atom PDF