From 459a65b7f831df2ed8b1ffaab3124324421e8c97 Mon Sep 17 00:00:00 2001 From: Kirill Yukhin <kyukhin@tarantool.org> Date: Tue, 6 Oct 2020 07:25:05 +0300 Subject: [PATCH] Remove C99 extension usage from C++ file 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 61cf5e1b8d..36fbcefc50 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 -- GitLab