From 416535a1b135d42bf840e99ae493a297c8be42dc Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 22 Mar 2025 15:05:24 -0400 Subject: [PATCH] supervisor/shared/usb/usb_msc_flash.c: restore initialization of `ejected` array --- supervisor/shared/usb/usb_msc_flash.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/supervisor/shared/usb/usb_msc_flash.c b/supervisor/shared/usb/usb_msc_flash.c index 2b92035d97199..c7a8232d228ad 100644 --- a/supervisor/shared/usb/usb_msc_flash.c +++ b/supervisor/shared/usb/usb_msc_flash.c @@ -26,8 +26,10 @@ #define LUN_COUNT 1 #endif -static bool ejected[LUN_COUNT]; -static bool locked[LUN_COUNT]; +// The ellipsis range in the designated initializer of `ejected` is not standard C, +// but it works in both gcc and clang. +static bool ejected[LUN_COUNT] = { [0 ... (LUN_COUNT - 1)] = true}; +static bool locked[LUN_COUNT] = {false}; #include "tusb.h" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy