From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [tarantool-patches] Re: [PATCH v5 3/9] box: manage format fields with JSON tree class References: <0ff5601b664e42d70d71be658b4ba45fe1237564.1543229303.git.kshcherbatov@tarantool.org> <20181129190757.oyu7kom6drgacd3j@esperanza> <5133fc03-e2ed-0bea-d3d1-47b4b60121e9@tarantool.org> <20181204160922.m5bse7haiiunyvpf@esperanza> From: Kirill Shcherbatov Message-ID: <5e6feb50-b891-d5b9-e17b-8ebfd0abee6f@tarantool.org> Date: Tue, 4 Dec 2018 19:32:56 +0300 MIME-Version: 1.0 In-Reply-To: <20181204160922.m5bse7haiiunyvpf@esperanza> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit To: Vladimir Davydov Cc: tarantool-patches@freelists.org, Kostya Osipov List-ID: > 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;