Project

General

Profile

Bug #9032

sgs: this statement may fall through

Added by Toomas Soome almost 2 years ago. Updated almost 2 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Issue revealed by gcc 7:

    ../common/unifdef.c: In function 'getlin':
    ../common/unifdef.c:520:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
         if (expandtabs) {
            ^
    ../common/unifdef.c:527:4: note: here
        default:
        ^~~~~~~

    ../common/parser.y:899:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
         c = usescape(c=gch());
         ~~^~~~~~~~~~~~~~~~~~~
    ../common/parser.y:900:4: note: here
        default:
        ^~~~~~~
    cc1: all warnings being treated as errors

    ../common/y2.c: In function 'gettok':
    ../common/y2.c:1184:20: error: this statement may fall through [-Werror=implicit-fallthrough=]
       default: reserve = 1;
                ~~~~~~~~^~~
    ../common/y2.c:1187:2: note: here
      default:
      ^~~~~~~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk almost 2 years ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit 1e8199757379047b30cc13c6aed3a0d25c7a035a

commit  1e8199757379047b30cc13c6aed3a0d25c7a035a
Author: Toomas Soome <tsoome@me.com>
Date:   2018-02-07T16:41:55.000Z

    9032 sgs: this statement may fall through
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF