Skip to content

Commit 9825f62

Browse files
authored
Merge pull request #10168 from dhalbert/9.2.x-fix-ejected-init
usb_msc_flash.c: restore initialization of `ejected` array
2 parents f16a86e + 416535a commit 9825f62

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

supervisor/shared/usb/usb_msc_flash.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@
2626
#define LUN_COUNT 1
2727
#endif
2828

29-
static bool ejected[LUN_COUNT];
30-
static bool locked[LUN_COUNT];
29+
// The ellipsis range in the designated initializer of `ejected` is not standard C,
30+
// but it works in both gcc and clang.
31+
static bool ejected[LUN_COUNT] = { [0 ... (LUN_COUNT - 1)] = true};
32+
static bool locked[LUN_COUNT] = {false};
3133

3234
#include "tusb.h"
3335

0 commit comments

Comments
 (0)