diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-03-17 07:58:41 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-03-17 07:58:41 +0200 |
commit | c7ba92372b8e21c42eb5df20f080c941fc84a144 (patch) | |
tree | 7e74d58b0a47b556a1b411ed0ad14e38384d6991 /strings | |
parent | 023d9867327c0c5dfe95173c0731940fe6df74ab (diff) | |
parent | 097e2f9d0aa0dc7f1c4a7cff52260944db28e3c8 (diff) | |
download | mariadb-git-c7ba92372b8e21c42eb5df20f080c941fc84a144.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'strings')
-rw-r--r-- | strings/json_lib.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/strings/json_lib.c b/strings/json_lib.c index 1e9c947a85d..42bec2c3f79 100644 --- a/strings/json_lib.c +++ b/strings/json_lib.c @@ -1885,7 +1885,15 @@ static enum json_types smart_read_value(json_engine_t *je, *value_len= (int) ((char *) je->s.c_str - *value); } - return (enum json_types)je->value_type; + compile_time_assert((int) JSON_VALUE_OBJECT == (int) JSV_OBJECT); + compile_time_assert((int) JSON_VALUE_ARRAY == (int) JSV_ARRAY); + compile_time_assert((int) JSON_VALUE_STRING == (int) JSV_STRING); + compile_time_assert((int) JSON_VALUE_NUMBER == (int) JSV_NUMBER); + compile_time_assert((int) JSON_VALUE_TRUE == (int) JSV_TRUE); + compile_time_assert((int) JSON_VALUE_FALSE == (int) JSV_FALSE); + compile_time_assert((int) JSON_VALUE_NULL == (int) JSV_NULL); + + return (enum json_types) je->value_type; err_return: return JSV_BAD_JSON; |