Skip to content

Commit 57c3394

Browse files
authored
[0.81] fix clang-diagnostic-unused-function warning (#15954)
* fix clang-diagnostic-unused-function warning * Change files * formatting
1 parent 62e2f37 commit 57c3394

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "fix clang-diagnostic-unused-function warning",
4+
"packageName": "react-native-windows",
5+
"email": "30809111+acoates-ms@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}

vnext/Microsoft.ReactNative.Cxx/ModuleRegistration.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ struct IsReactTurboModule : std::bool_constant<ReactIsReactTurboModuleImpl(stati
7070
INTERNAL_REACT_RECOMPOSER_4( \
7171
(__VA_ARGS__, INTERNAL_REACT_MODULE_3_ARGS, INTERNAL_REACT_MODULE_2_ARGS, INTERNAL_REACT_MODULE_1_ARG, ))
7272

73-
#define INTERNAL_REACT_MODULE_NO_REGISTRATION_AND_PROVIDER( \
74-
moduleStruct, moduleName, eventEmitterName, isReactTurboModule) \
75-
struct moduleStruct; \
76-
\
77-
constexpr bool ReactIsReactTurboModuleImpl(moduleStruct *) noexcept { return isReactTurboModule; } \
78-
\
79-
template <class TRegistry> \
80-
constexpr void GetReactModuleInfo(moduleStruct *, TRegistry &registry) noexcept { \
81-
registry.RegisterModule( \
82-
moduleName, eventEmitterName, winrt::Microsoft::ReactNative::ReactAttributeId<__COUNTER__>{}); \
73+
#define INTERNAL_REACT_MODULE_NO_REGISTRATION_AND_PROVIDER( \
74+
moduleStruct, moduleName, eventEmitterName, isReactTurboModule) \
75+
struct moduleStruct; \
76+
\
77+
[[maybe_unused]] constexpr bool ReactIsReactTurboModuleImpl(moduleStruct *) noexcept { return isReactTurboModule; } \
78+
\
79+
template <class TRegistry> \
80+
constexpr void GetReactModuleInfo(moduleStruct *, TRegistry &registry) noexcept { \
81+
registry.RegisterModule( \
82+
moduleName, eventEmitterName, winrt::Microsoft::ReactNative::ReactAttributeId<__COUNTER__>{}); \
8383
}
8484

8585
// Another version of REACT_MODULE but does not do auto registration

0 commit comments

Comments
 (0)