[tarantool-patches] Re: [PATCH v5 3/9] box: manage format fields with JSON tree class
Kirill Shcherbatov
kshcherbatov at tarantool.org
Tue Dec 4 19:32:56 MSK 2018
> This patch doesn't compile on my laptop. Please fix.
>
> In file included from /home/vlad/src/tarantool/src/box/tuple.h:38:0,
> from /home/vlad/src/tarantool/src/box/tuple_compare.h:38,
> from /home/vlad/src/tarantool/src/box/tuple_compare.cc:31:
> /home/vlad/src/tarantool/src/box/tuple_format.h: In function ‘tuple_field* tuple_format_field(tuple_format*, uint32_t)’:
> /home/vlad/src/tarantool/src/box/tuple_format.h:207:2: sorry, unimplemented: non-trivial designated initializers not supported
> };
> ^
> /home/vlad/src/tarantool/src/box/tuple_format.h:207:2: error: missing initializer for member ‘json_token::hash’ [-Werror=missing-field-initializers]
> /home/vlad/src/tarantool/src/box/tuple_format.h:207:2: error: missing initializer for member ‘json_token::children’ [-Werror=missing-field-initializers]
> /home/vlad/src/tarantool/src/box/tuple_format.h:207:2: error: missing initializer for member ‘json_token::child_count_max’ [-Werror=missing-field-initializers]
> /home/vlad/src/tarantool/src/box/tuple_format.h:207:2: error: missing initializer for member ‘json_token::child_count’ [-Werror=missing-field-initializers]
> /home/vlad/src/tarantool/src/box/tuple_format.h:207:2: error: missing initializer for member ‘json_token::sibling_idx’ [-Werror=missing-field-initializers]
> /home/vlad/src/tarantool/src/box/tuple_format.h:207:2: error: missing initializer for member ‘json_token::parent’ [-Werror=missing-field-initializers]
> At global scope:
> cc1plus: error: unrecognized command line option ‘-Wno-cast-function-type’ [-Werror]
> cc1plus: error: unrecognized command line option ‘-Wno-format-truncation’ [-Werror]
> cc1plus: all warnings being treated as errors
@@ -201,10 +201,9 @@ static inline struct tuple_field *
tuple_format_field(struct tuple_format *format, uint32_t fieldno)
{
assert(fieldno < tuple_format_field_count(format));
- struct json_token token = {
- .type = JSON_TOKEN_NUM,
- .num = fieldno + TUPLE_INDEX_BASE
- };
+ struct json_token token;
+ token.type = JSON_TOKEN_NUM;
+ token.num = fieldno + TUPLE_INDEX_BASE;
More information about the Tarantool-patches
mailing list