Skip to content

Commit 5f0a77e

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 73ddf9b commit 5f0a77e

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
@@ -550,7 +550,7 @@ static HANDLE swap_osfhnd(int fd, HANDLE new_handle)
550550
typedef struct _OBJECT_NAME_INFORMATION
551551
{
552552
UNICODE_STRING Name;
553-
WCHAR NameBuffer[0];
553+
WCHAR NameBuffer[FLEX_ARRAY];
554554
} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
555555

556556
#define ObjectNameInformation 1

0 commit comments

Comments
 (0)