diff --git a/packages/react-native/React/CoreModules/RCTPlatform.mm b/packages/react-native/React/CoreModules/RCTPlatform.mm index 2aa4e28be8e75b..09060d5e201687 100644 --- a/packages/react-native/React/CoreModules/RCTPlatform.mm +++ b/packages/react-native/React/CoreModules/RCTPlatform.mm @@ -31,10 +31,11 @@ return @"tv"; case UIUserInterfaceIdiomCarPlay: return @"carplay"; -#if TARGET_OS_VISION case UIUserInterfaceIdiomVision: return @"vision"; -#endif + case UIUserInterfaceIdiomMac: + return @"mac"; + case UIUserInterfaceIdiomUnspecified: default: return @"unknown"; } diff --git a/packages/react-native/ReactCommon/react/renderer/css/CSSSyntaxParser.h b/packages/react-native/ReactCommon/react/renderer/css/CSSSyntaxParser.h index 811518aeb75bbb..6fc07250925897 100644 --- a/packages/react-native/ReactCommon/react/renderer/css/CSSSyntaxParser.h +++ b/packages/react-native/ReactCommon/react/renderer/css/CSSSyntaxParser.h @@ -277,7 +277,14 @@ struct CSSComponentValueVisitorDispatcher { return {}; } +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wswitch-enum" +#endif switch (parser.peek().type()) { +#ifdef __clang__ +#pragma clang diagnostic pop +#endif case CSSTokenType::Function: if (auto ret = visitFunction(visitors...)) { return *ret; diff --git a/packages/react-native/ReactCommon/yoga/yoga/style/StyleLength.h b/packages/react-native/ReactCommon/yoga/yoga/style/StyleLength.h index 01e69718b2bc2c..8099ce7df4e45e 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/style/StyleLength.h +++ b/packages/react-native/ReactCommon/yoga/yoga/style/StyleLength.h @@ -74,7 +74,14 @@ class StyleLength { } constexpr FloatOptional resolve(float referenceLength) { +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wswitch-enum" +#endif switch (unit_) { +#ifdef __clang__ +#pragma clang diagnostic pop +#endif case Unit::Point: return value_; case Unit::Percent: diff --git a/packages/react-native/ReactCommon/yoga/yoga/style/StyleSizeLength.h b/packages/react-native/ReactCommon/yoga/yoga/style/StyleSizeLength.h index 8dc4f2401320ad..fc4d371e421bf2 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/style/StyleSizeLength.h +++ b/packages/react-native/ReactCommon/yoga/yoga/style/StyleSizeLength.h @@ -99,7 +99,14 @@ class StyleSizeLength { } constexpr FloatOptional resolve(float referenceLength) { +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wswitch-enum" +#endif switch (unit_) { +#ifdef __clang__ +#pragma clang diagnostic pop +#endif case Unit::Point: return value_; case Unit::Percent: