Project

General

Profile

Bug #9131

regexp.h: this statement may fall through

Added by Toomas Soome over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
system data
Start date:
2018-02-19
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Issue found by gcc 7 build. The regexp.h is providing the function "stub" which does produce warnings like:

    In file included from sed1.c:36:0:
    /code/illumos-gate/proto/root_i386/usr/include/regexp.h: In function 'compile':
    sed.h:50:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define ERROR(c) regerr(c)
                      ^~~~~~~~~
    /code/illumos-gate/proto/root_i386/usr/include/regexp.h:278:5: note: in expansion of macro 'ERROR'
         ERROR(36);
         ^~~~~
    In file included from sed1.c:37:0:
    /code/illumos-gate/proto/root_i386/usr/include/regexp.h:280:4: note: here
        case 'n':
        ^~~~
    In file included from sed1.c:36:0:
    sed.h:50:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
     #define ERROR(c) regerr(c)
                      ^~~~~~~~~
    /code/illumos-gate/proto/root_i386/usr/include/regexp.h:137:11: note: in expansion of macro 'ERROR'
        } else ERROR(36);
               ^~~~~
    In file included from sed1.c:37:0:
    /code/illumos-gate/proto/root_i386/usr/include/regexp.h:138:3: note: here
       case '*':
       ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/regexp.h:285:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
         if (c >= '1' && c <= '9') {
            ^
    /code/illumos-gate/proto/root_i386/usr/include/regexp.h:295:3: note: here
       defchar:
       ^~~~~~~
    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 7f24fc96855e7e749ca4e15ffdce8ea80fc94dbf

commit  7f24fc96855e7e749ca4e15ffdce8ea80fc94dbf
Author: Toomas Soome <tsoome@me.com>
Date:   2018-04-01T21:48:01.000Z

    9131 regexp.h: this statement may fall through
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom PDF