Project

General

Profile

Bug #9144

libsqlite: this statement may fall through

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2018-02-20
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Issue found by gcc 7 build:

    ../tool/lemon.c: In function 'parseonetoken':
    ../tool/lemon.c:1914:22: error: this statement may fall through [-Werror=implicit-fallthrough=]
           psp->gp->nrule = 0;
           ~~~~~~~~~~~~~~~^~~
    ../tool/lemon.c:1916:5: note: here
         case WAITING_FOR_DECL_OR_RULE:
         ^~~~

    ../src/select.c: In function 'multiSelect':
    ../src/select.c:1335:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
           if( p->pOrderBy==0 ){
             ^
    ../src/select.c:1352:5: note: here
         case TK_EXCEPT:
         ^~~~

    ../src/vdbe.c:2202:12: error: this statement may fall through [-Werror=implicit-fallthrough=]
             rc = SQLITE_OK;
    ../src/vdbe.c:2205:7: note: here
           case SQLITE_OK: {
           ^~~~

    ../src/tokenize.c: In function 'sqliteRunParser':
    ../src/tokenize.c:445:23: error: this statement may fall through [-Werror=implicit-fallthrough=]
             pParse->zTail = &zSql[i];
             ~~~~~~~~~~~~~~^~~~~~~~~~
    ../src/tokenize.c:448:7: note: here
           default: {
           ^~~~~~~

    ../src/insert.c: In function 'sqliteGenerateConstraintChecks':
    ../src/insert.c:724:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
             onError = OE_Abort;
    ../src/insert.c:727:7: note: here
           case OE_Rollback:
           ^~~~

    ../src/vdbeaux.c: In function 'sqliteVdbeReset':
    ../src/vdbeaux.c:859:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
             if( !p->undoTransOnError ){
               ^
    ../src/vdbeaux.c:869:7: note: here
           case OE_Rollback: {
           ^~~~

    ../src/expr.c: In function 'sqliteExprResolveIds':
    ../src/expr.c:647:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
           if( pExpr->token.z[0]=='\'' ) break;
             ^
    ../src/expr.c:652:5: note: here
         case TK_ID: {
         ^~~~
    ../src/expr.c: In function 'sqliteExprCheck':
    ../src/expr.c:829:23: error: this statement may fall through [-Werror=implicit-fallthrough=]
         case TK_FUNCTION: {
                           ^
    ../src/expr.c:894:5: note: here
         default: {
         ^~~~~~~
    ../src/expr.c: In function 'sqliteExprCode':
    ../src/expr.c:1078:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
           if( pParse->db->file_format>=4 && sqliteExprType(pExpr)==SQLITE_SO_TEXT ){
             ^
    ../src/expr.c:1083:5: note: here
         case TK_AND:
         ^~~~
    ../src/expr.c:1112:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
           if( pExpr->pLeft->op==TK_FLOAT || pExpr->pLeft->op==TK_INTEGER ){
             ^
    ../src/expr.c:1127:5: note: here
         case TK_BITNOT:
         ^~~~
    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 88e1588bca8b2374cfe26f7f5b377c59710c6a4b

commit  88e1588bca8b2374cfe26f7f5b377c59710c6a4b
Author: Toomas Soome <tsoome@me.com>
Date:   2018-03-10T23:02:26.000Z

    9144 libsqlite: this statement may fall through
    Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Approved by: Joshua M. Clulow <josh@sysmgr.org>

Also available in: Atom PDF