[MDEV-13960] mariadb-10.2.9/storage/mroonga/vendor/groonga/lib/pat.c:773:8: warning: this statement may fall through [-Wimplicit-fallthrough=] Created: 2017-09-29  Updated: 2022-05-09

Status: Open
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.2.9
Fix Version/s: 10.2

Type: Bug Priority: Minor
Reporter: David Binderman Assignee: Kouhei Sutou
Resolution: Unresolved Votes: 0
Labels: cppcheck


 Description   

Source code is

  case GRN_OBJ_KEY_UINT :\
    if (((pat)->obj.header.domain != GRN_DB_TOKYO_GEO_POINT) &&\
        ((pat)->obj.header.domain != GRN_DB_WGS84_GEO_POINT)) {\
      grn_hton((keybuf), (key), (size));\
      break;\
    }\

Suggest move break from inside if to outside.



 Comments   
Comment by Kouhei Sutou [ 2022-05-09 ]

This code is for backward compatibility and this break position is right.

We need to add a /* FALLTHROUGH */ comment.

I'll do it in upstream and update bundled Groonga as MDEV-20544.

Generated at Thu Feb 08 08:09:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.