From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [94.100.177.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6FAB0446439 for ; Tue, 6 Oct 2020 12:59:45 +0300 (MSK) From: Kirill Yukhin Date: Tue, 6 Oct 2020 12:59:35 +0300 Message-Id: In-Reply-To: References: In-Reply-To: References: Subject: [Tarantool-patches] [PATCH 1/2] Remove C99 extension usage from C++ file List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: gorcunov@gmail.com, avtikhon@tarantool.org Cc: tarantool-patches@dev.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