From a31cbc91bf9c4ebcc98f36d58aa71aeeb443afab Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Tue, 23 Aug 2022 12:40:28 -0500 Subject: [PATCH] =?UTF-8?q?fix(core):=20ldml:=20remove=200-length=20arrays?= =?UTF-8?q?=20=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - need a pragma to suppress this on MSVC #7098 --- core/src/kmx/kmx_plus.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/core/src/kmx/kmx_plus.h b/core/src/kmx/kmx_plus.h index c095a259f7..3d538fd43b 100644 --- a/core/src/kmx/kmx_plus.h +++ b/core/src/kmx/kmx_plus.h @@ -14,6 +14,14 @@ namespace km { namespace kbp { namespace kmx { +/** + * Using C99 flexible array initializers: entries[] + * https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-levels-2-and-4-c4200 + */ +#if defined(_WIN32) +#pragma warning ( disable : 4200 ) +#endif + struct COMP_KMXPLUS_HEADER { KMX_DWORD ident; // 0000 Section name KMX_DWORD size; // 0004 Section length @@ -123,6 +131,14 @@ struct COMP_KMXPLUS_VKEY { static_assert(sizeof(struct COMP_KMXPLUS_VKEY) == LDML_LENGTH_VKEY, "mismatched size of section vkey"); +/** + * See above + */ +#if defined(_WIN32) +#pragma warning ( default : 4200 ) +#endif + + /** * @brief Validate that this data is the named section. *