[MDEV-13803] New gcc warns about strings/json_lib.c Created: 2017-09-14  Updated: 2017-09-14  Resolved: 2017-09-14

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

Type: Bug Priority: Major
Reporter: Alexey Botchkov Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
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)
^
```


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