Skip to content

Commit 41616ef

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c097b95 commit 41616ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/winansi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ static HANDLE swap_osfhnd(int fd, HANDLE new_handle)
546546
typedef struct _OBJECT_NAME_INFORMATION
547547
{
548548
UNICODE_STRING Name;
549-
WCHAR NameBuffer[0];
549+
WCHAR NameBuffer[FLEX_ARRAY];
550550
} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
551551

552552
#define ObjectNameInformation 1

0 commit comments

Comments
 (0)