From: Kirill Yukhin <kyukhin@tarantool.org> To: gorcunov@gmail.com, avtikhon@tarantool.org Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH 1/2] Remove C99 extension usage from C++ file Date: Tue, 6 Oct 2020 12:59:35 +0300 [thread overview] Message-ID: <bc65fe7c10d2092421221993acf939271466ea0e.1601977644.git.kyukhin@tarantool.org> (raw) In-Reply-To: <cover.1601977644.git.kyukhin@tarantool.org> In-Reply-To: <cover.1601977644.git.kyukhin@tarantool.org> File mp_error.cc was using a C99 feature called "designated initializers" which was catched by Clang v12. Remove this usage. --- src/box/mp_error.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/box/mp_error.cc b/src/box/mp_error.cc index 61cf5e1..36fbcef 100644 --- a/src/box/mp_error.cc +++ b/src/box/mp_error.cc @@ -97,6 +97,16 @@ enum { MP_ERROR_MAX, }; +static const char *const mp_error_field_to_json_key[MP_ERROR_MAX] = { + "\"type\": ", + "\"file\": ", + "\"line\": ", + "\"message\": ", + "\"errno\": ", + "\"code\": ", + "\"fields\": ", +}; + /** * The structure is used for storing parameters * during decoding MP_ERROR. @@ -561,16 +571,6 @@ error_unpack_unsafe(const char **data) return err; } -static const char *const mp_error_field_to_json_key[MP_ERROR_MAX] = { - [MP_ERROR_TYPE] = "\"type\": ", - [MP_ERROR_FILE] = "\"file\": ", - [MP_ERROR_LINE] = "\"line\": ", - [MP_ERROR_MESSAGE] = "\"message\": ", - [MP_ERROR_ERRNO] = "\"errno\": ", - [MP_ERROR_CODE] = "\"code\": ", - [MP_ERROR_FIELDS] = "\"fields\": ", -}; - /** * Include this file into self with a few template parameters * to create mp_snprint_error() and mp_fprint_error() functions -- 1.8.3.1
next prev parent reply other threads:[~2020-10-06 9:59 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-06 9:59 [Tarantool-patches] [PATCH 0/2] Replace clang 8 with clang 11 in CI Kirill Yukhin 2020-10-06 9:59 ` Kirill Yukhin [this message] 2020-10-06 10:36 ` [Tarantool-patches] [PATCH 1/2] Remove C99 extension usage from C++ file Cyrill Gorcunov 2020-10-06 9:59 ` [Tarantool-patches] [PATCH 2/2] ci: add replace clang8 with clang11 Kirill Yukhin 2020-10-06 11:21 ` Kirill Yukhin 2020-10-06 12:46 ` Alexander V. Tikhonov 2020-10-06 14:50 ` [Tarantool-patches] [PATCH 0/2] Replace clang 8 with clang 11 in CI Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bc65fe7c10d2092421221993acf939271466ea0e.1601977644.git.kyukhin@tarantool.org \ --to=kyukhin@tarantool.org \ --cc=avtikhon@tarantool.org \ --cc=gorcunov@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 1/2] Remove C99 extension usage from C++ file' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox