Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13803

New gcc warns about strings/json_lib.c

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2
    • Fix Version/s: 10.2.9
    • Component/s: Compiling
    • Labels:
      None

      Description

      /mariadb/10.2-ext/strings/json_lib.c:1450:58: warning: ?: using integer constants in boolean context, the expression will always evaluate to ‘true’ [-Wint-in-bool-context]
      if (state->paths[p_c].steps[state->cur_depth].type &
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      (je->state == JST_OBJ_START) ? JSON_PATH_KEY : JSON_PATH_ARRAY)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
      /mariadb/10.2-ext/strings/json_lib.c: In function ‘json_path_setup’:
      /mariadb/10.2-ext/strings/json_lib.c:1141:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
      state= PS_KEY;
      ~~~~^~~~~~~
      /mariadb/10.2-ext/strings/json_lib.c:1148:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
      double_wildcard= JSON_PATH_KEY_NULL;
      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      /mariadb/10.2-ext/strings/json_lib.c:1155:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
      state= PS_AR;
      ~~~~^~~~~~
      /mariadb/10.2-ext/strings/json_lib.c: In function ‘json_get_path_next’:
      /mariadb/10.2-ext/strings/json_lib.c:1704:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
      if (je->s.error)
      ^
      ```

        Attachments

          Activity

            People

            Assignee:
            holyfoot Alexey Botchkov
            Reporter:
            holyfoot Alexey Botchkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: