winansi: use FLEX_ARRAY to avoid compiler warning

MSVC would complain thusly: C4200: nonstandard extension used: zero-sized array in struct/union Let's just use the `FLEX_ARRAY` constant that we introduced for exactly this type of scenario. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Oct 4, 2019 at 08:09 UTC 41616ef6182271178c63e1caf0d21f12bea2d41e
1 file changed +1 -1
compat/winansi.c
+1 -1
@@ -546,7 +546,7 @@ static HANDLE swap_osfhnd(int fd, HANDLE new_handle)
546 typedef struct _OBJECT_NAME_INFORMATION
547 {
548 UNICODE_STRING Name;
549 - WCHAR NameBuffer[0];
549 + WCHAR NameBuffer[FLEX_ARRAY];
550 } OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
551
552 #define ObjectNameInformation 1