Skip to content

Commit 53696ea

Browse files
committed
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]>
1 parent 1b9fc01 commit 53696ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/winansi.c

+1-1
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)